security-advisories

Create a repository advisory comment

Changed on

Creates a comment on a repository security advisory.

In order to create a comment, the authenticated user must be an advisory collaborator, security manager, or repository administrator.

post/repos/{owner}/{repo}/security-advisories/{ghsa_id}/comments

Request

  • Base URL
    https://api.github.com
  • URL
    https://api.github.com/repos/{owner}/{repo}/security-advisories/{ghsa_id}/comments
  • Auth
    none declared

Path parameters

ownerstring required

The account owner of the repository. The name is not case sensitive.

repostring required

The name of the repository without the .git extension. The name is not case sensitive.

ghsa_idstring required

The GHSA (GitHub Security Advisory) identifier of the advisory.

Request body

bodystring required

The contents of the comment.

Response

Response

idinteger required

Unique identifier of the advisory comment.

node_idstring required
urlstring uri required

API URL for the advisory comment.

html_urlstring uri required

Web URL for the advisory comment.

bodystring required

Contents of the advisory comment.

created_atstring date-time required
updated_atstring date-time required
advisory_urlstring uri required
author_association'COLLABORATOR' | 'CONTRIBUTOR' | 'FIRST_TIMER' | 'FIRST_TIME_CONTRIBUTOR' | 'MANNEQUIN' | 'MEMBER' | 'NONE' | 'OWNER' required

How the author is associated with the repository.

Example response

{
  "id": 42,
  "url": "https://api.github.com/repos/octocat/Hello-World/security-advisories/GHSA-abcd-1234-5679/comments/1",
  "user": {
    "login": "octocat",
    "id": 1,
    "node_id": "MDQ6VXNlcjE=",
    "avatar_url": "https://github.com/images/error/octocat_happy.gif",
    "gravatar_id": "41d064eb2195891e12d0413f63227ea7",
    "url": "https://api.github.com/users/octocat",
    "html_url": "https://github.com/octocat",
    "followers_url": "https://api.github.com/users/octocat/followers",
    "following_url": "https://api.github.com/users/octocat/following{/other_user}",
    "gists_url": "https://api.github.com/users/octocat/gists{/gist_id}",
    "starred_url": "https://api.github.com/users/octocat/starred{/owner}{/repo}",
    "subscriptions_url": "https://api.github.com/users/octocat/subscriptions",
    "organizations_url": "https://api.github.com/users/octocat/orgs",
    "repos_url": "https://api.github.com/users/octocat/repos",
    "events_url": "https://api.github.com/users/octocat/events{/privacy}",
    "received_events_url": "https://api.github.com/users/octocat/received_events",
    "type": "User",
    "starred_at": "\"2020-07-09T00:17:55Z\"",
    "user_view_type": "public"
  },
  "created_at": "2011-04-14T16:00:49Z",
  "updated_at": "2011-04-14T16:00:49Z",
  "author_association": "OWNER"
}

Changes