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
Copy file name to clipboardExpand all lines: content/index.md
+3Lines changed: 3 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -39,11 +39,14 @@ objects.
39
39
*`[ ]``master_branch` becomes `default_branch`.
40
40
*`[ ]``integrate_branch` on the [repo API](/v3/repos/#get) will no longer be
41
41
returned.
42
+
*`[ ]``merge_commit_sha` on the [pull request API](/v3/pulls/#get-a-single-pull-request)
43
+
will no longer be returned.
42
44
*`[ ]` Use the `private` attribute when creating a private repository,
43
45
instead of setting `public` to false.
44
46
*`[ ]` Use JSON to POST to the "repos/:owner/:repo/forks" endpoint, instead of a query string.
45
47
*`[✓]` <del>User Emails come back [as a hash][v3-email] instead of a string.</del>
46
48
*`[ ]` Remove the unused "bio" field for Users.
49
+
*`[ ]` When listing the contents of a directory in the [Repository Contents API](/v3/repos/contents/#get-contents), fix the `type` value returned for submodules: change the value to `"submodule"` (instead of `"file"`).
Copy file name to clipboardExpand all lines: content/v3/repos/contents.md
+16-4Lines changed: 16 additions & 4 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -30,15 +30,17 @@ ref
30
30
31
31
## Get contents
32
32
33
-
This method returns the contents of any file or directory in a repository.
33
+
This method returns the contents of a file or directory in a repository.
34
34
35
35
GET /repos/:owner/:repo/contents/:path
36
36
37
37
Files and symlinks support [a custom media type](#custom-media-types) for getting the raw content.
38
-
Directories do _not_ support custom media types.
38
+
Directories and submodules do _not_ support custom media types.
39
39
40
-
*Note*: To get a repository's contents recursively, you can [recursively get
41
-
the tree](/v3/git/trees/).
40
+
*Notes*:
41
+
42
+
- To get a repository's contents recursively, you can [recursively get the tree](/v3/git/trees/).
43
+
- This API supports files up to 1 megabyte in size.
42
44
43
45
### Parameters
44
46
@@ -67,6 +69,16 @@ Otherwise, the API responds with a hash describing the symlink itself:
67
69
<%= headers 200 %>
68
70
<%= json :symlink_content %>
69
71
72
+
### Response if content is a submodule
73
+
74
+
<%= headers 200 %>
75
+
<%= json :submodule_content %>
76
+
77
+
The `submodule_git_url` identifies the location of the submodule repository, and the `sha` identifies a specific commit within the submodule repository.
78
+
Git uses the given URL when cloning the submodule repository, and checks out the submodule at that specific commit.
79
+
80
+
If the submodule repository is not hosted on github.com, the Git URLs (`git_url` and `_links["git"]`) and the github.com URLs (`html_url` and `_links["html"]`) will have null values.
81
+
70
82
## Get archive link
71
83
72
84
This method will return a `302` to a URL to download a tarball
0 commit comments