Skip to content

Commit 249beac

Browse files
author
lushirong.77
committed
docs(rest): note when commit comments may be disabled
1 parent c9bd77a commit 249beac

2 files changed

Lines changed: 5 additions & 1 deletion

File tree

content/rest/commits/comments.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,6 @@ category:
1414

1515
## About commit comments
1616

17-
You can create, edit, and view commit comments using the REST API. A commit comment is a comment made on a specific commit. For more information, see [AUTOTITLE](/rest/guides/working-with-comments#commit-comments).
17+
You can create, edit, and view commit comments using the REST API. A commit comment is a comment made on a specific commit. {% ifversion fpt or ghec or ghes > 3.21 %}For repositories that belong to organizations, commit comments can be disabled at the organization or repository level. If commit comments are disabled, people cannot create new commit comments, and requests to create a commit comment may return `403 Forbidden`. For more information, see [AUTOTITLE](/organizations/managing-organization-settings/managing-commit-comments-for-your-organization). {% endif %}For more information, see [AUTOTITLE](/rest/guides/working-with-comments#commit-comments).
1818

1919
<!-- Content after this section is automatically generated -->

content/rest/guides/working-with-comments.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -94,6 +94,10 @@ deal specifically with the way a particular change was implemented within a file
9494
The last type of comments occur specifically on individual commits. For this reason,
9595
they make use of [the endpoint to manage commit comments](/rest/commits#get-a-commit-comment).
9696

97+
{% ifversion fpt or ghec or ghes > 3.21 %}
98+
For repositories that belong to organizations, commit comments can be disabled at the organization or repository level. If commit comments are disabled, people cannot create new commit comments, and requests to create a commit comment may return `403 Forbidden`. For more information, see [AUTOTITLE](/organizations/managing-organization-settings/managing-commit-comments-for-your-organization).
99+
{% endif %}
100+
97101
To retrieve the comments on a commit, you'll want to use the SHA1 of the commit.
98102
In other words, you won't use any identifier related to the Pull Request. Here's an example:
99103

0 commit comments

Comments
 (0)