You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
[Schema Inaccuracy] Comment endpoints of repository security advisories are missing #7365
The description has no operation for comments on repository security advisories, although the API serves them. /repos/{owner}/{repo}/security-advisories/{ghsa_id} has cve and forks sub-paths only, and the REST docs ("Repository security advisories") list no comment endpoints. The web UI's comment box on a draft advisory is the only documented way to comment, which makes it impossible to script, for example, a reporter answering the maintainers from the CLI.
Expected
The description (and so the docs) includes the comment operations the API already answers, tested as a collaborator on a draft repository advisory:
Operation
Result
GET /repos/{owner}/{repo}/security-advisories/{ghsa_id}/comments
200, array of comments
POST /repos/{owner}/{repo}/security-advisories/{ghsa_id}/comments with {"body": "..."}
201, the comment; it appears in the advisory's timeline
PATCH /repos/{owner}/{repo}/security-advisories/{ghsa_id}/comments/{comment_id} with {"body": "..."}
200, the updated comment
Comment fields returned: id (number), node_id (string, prefix RAC_), url, html_url (…/security/advisories/{ghsa_id}#advisory-comment-{id}), advisory_url, body, user (simple user), author_association, created_at, updated_at.
DELETE on a comment was not tried.
Reproduction Steps
As a collaborator on a draft repository security advisory:
gh api repos/OWNER/REPO/security-advisories/GHSA-xxxx-xxxx-xxxx/comments
gh api -X POST repos/OWNER/REPO/security-advisories/GHSA-xxxx-xxxx-xxxx/comments -f body='test'
gh api -X PATCH repos/OWNER/REPO/security-advisories/GHSA-xxxx-xxxx-xxxx/comments/COMMENT_ID -f body='edited'
None of these paths is in descriptions/api.github.com/api.github.com.json on main.
Activity