Skip to content

Commit b0db9c8

Browse files
committed
Update diff and patch media type docs
1 parent 5319135 commit b0db9c8

3 files changed

Lines changed: 23 additions & 1 deletion

File tree

content/v3/media.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -101,4 +101,20 @@ encoded string. This is the default if nothing is passed.
101101

102102
Return the raw blob data.
103103

104+
## Commits, Commit comparison, and Pull Requests
105+
106+
The Commit, Commit Comparison, and Pull Request resources support
107+
[diff][git-diff] and [patch][git-patch] formats:
108+
109+
### diff
110+
111+
application/vnd.github.VERSION.diff
112+
113+
### patch
114+
115+
application/vnd.github.VERSION.patch
116+
117+
104118
[gfm]:http://github.github.com/github-flavored-markdown/
119+
[git-diff]: http://git-scm.com/docs/git-diff
120+
[git-patch]: http://git-scm.com/docs/git-format-patch

content/v3/pulls.md

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -55,6 +55,8 @@ is `open`.
5555
<%= headers 200 %>
5656
<%= json :full_pull %>
5757

58+
Pass the appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.
59+
5860
## Create a pull request
5961

6062
POST /repos/:owner/:repo/pulls

content/v3/repos/commits.md

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -51,7 +51,9 @@ until
5151
<%= headers 200 %>
5252
<%= json(:full_commit) %>
5353

54-
Note: Diffs with binary data will have no 'patch' property.
54+
Note: Diffs with binary data will have no 'patch' property. Pass the
55+
appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and
56+
patch formats.
5557

5658
## Compare two commits
5759

@@ -60,3 +62,5 @@ Note: Diffs with binary data will have no 'patch' property.
6062
### Response
6163

6264
<%= json :commit_comparison %>
65+
66+
Pass the appropriate [media type](/v3/media/#commits-commit-comparison-and-pull-requests) to fetch diff and patch formats.

0 commit comments

Comments
 (0)