Are you looking for something? Here is all of the GitHub Docs history in one single commit. Enjoy! 🎉
8 lines
777 B
Markdown
8 lines
777 B
Markdown
{% note %}
|
|
|
|
**Note:** To comment on a specific line in a file, you need to first determine the _position_ of that line in the diff. The GitHub REST API offers the `application/vnd.github.v3.diff` [media type](/v3/media/#commits-commit-comparison-and-pull-requests). To see a pull request diff, add this media type to the `Accept` header of a call to the [single pull request](/v3/pulls/#get-a-pull-request) endpoint.
|
|
|
|
The `position` value equals the number of lines down from the first "@@" hunk header in the file you want to add a comment. The line just below the "@@" line is position 1, the next line is position 2, and so on. The position in the diff continues to increase through lines of whitespace and additional hunks until the beginning of a new file.
|
|
|
|
{% endnote %}
|