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/v3/repos/releases.md
+15-16Lines changed: 15 additions & 16 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,15 +9,14 @@ title: Releases | GitHub API
9
9
10
10
## List releases for a repository
11
11
12
-
Users with push access to the repository will receive all releases
13
-
(i.e., published releases and draft releases). Users with pull access
14
-
will receive published releases only.
12
+
Information about published releases are available to everyone.
13
+
Only users with push access will receive listings for draft releases.
15
14
16
15
GET /repos/:owner/:repo/releases
17
16
18
-
Note: This returns a list of releases, which does not include regular
17
+
**Note:** This returns a list of releases, which does not include regular
19
18
Git tags that have not been associated with a release.
20
-
To get a list of Git tags, use the [Repository Tags API][repo tags api].
19
+
(To get a list of Git tags, use the [Repository Tags API][repo tags api].)
21
20
22
21
### Response
23
22
@@ -33,8 +32,8 @@ To get a list of Git tags, use the [Repository Tags API][repo tags api].
33
32
<%= headers 200 %>
34
33
<%= json :release %>
35
34
36
-
Note: This returns an "upload_url" hypermedia relation that provides the [endpoint
37
-
that creates release assets](#upload-a-release-asset).
35
+
**Note:** This returns an `"upload_url"` hypermedia relation that provides the
36
+
[endpoint that creates release assets](#upload-a-release-asset).
38
37
39
38
## Create a release
40
39
@@ -124,14 +123,14 @@ Users with push access to the repository can delete a release.
124
123
125
124
## Upload a release asset
126
125
127
-
This is a unique endpoint. The domain of the requestchanges from "api.github.com"
128
-
to **"uploads.github.com"**. You need to use an HTTP client which supports
126
+
This is a unique endpoint. The request's domain changes from `"api.github.com"`
127
+
to **`"uploads.github.com"`**. You need to use an HTTP client which supports
129
128
[SNI](http://en.wikipedia.org/wiki/Server_Name_Indication) to make calls to this
130
129
endpoint.
131
130
132
-
The asset data is expected in its raw binary form,
133
-
instead of JSON. Everything else about the endpoint is the same. Pass your
134
-
authentication exactly the same as the rest of the API.
131
+
The asset data is expected in its raw binary form, rather than JSON.
132
+
Everything else about the endpoint is the same.
133
+
Pass your authentication exactly the same as the rest of the API.
135
134
136
135
POST https://uploads.github.com/repos/:owner/:repo/releases/:id/assets?name=foo.zip
137
136
@@ -144,7 +143,7 @@ asset's name in a URI query parameter.
144
143
145
144
Name | Type | Description
146
145
-----|------|--------------
147
-
`Content-Type`|`string` | **Required**. The content type of the asset. This should be set in the Header. Example: "application/zip". For a list of acceptable types, refer this list of [common media types](http://en.wikipedia.org/wiki/Internet_media_type#List_of_common_media_types).
146
+
`Content-Type`|`string` | **Required**. The content type of the asset. This should be set in the Header. Example: `"application/zip"`. For a list of acceptable types, refer this list of [common media types](http://en.wikipedia.org/wiki/Internet_media_type#List_of_common_media_types).
148
147
`name`|`string` | **Required**. The file name of the asset. This should be set in the URI query parameter.
149
148
150
149
@@ -157,7 +156,7 @@ Send the raw binary content of the asset as the request body.
157
156
158
157
### Response for upstream failure
159
158
160
-
This may leave an empty asset with a state of "new". It can be safely deleted.
159
+
This may leave an empty asset with a state of `"new"`. It can be safely deleted.
161
160
162
161
<%= headers 502 %>
163
162
@@ -171,9 +170,9 @@ This may leave an empty asset with a state of "new". It can be safely deleted.
171
170
<%= json :release_asset %>
172
171
173
172
If you want to download the asset's binary content, pass a media type of
174
-
"application/octet-stream". The API will either redirect the client to the
173
+
`"application/octet-stream"`. The API will either redirect the client to the
175
174
location, or stream it directly if possible. API clients should handle both a
0 commit comments