Skip to content

Commit efb3972

Browse files
committed
Improve description of deprecations
- Use a consistent format for all `v3` deprecations. - Provide a recommendation for each `v3` deprecation. - Move deprecation notice inline for `beta` /user/emails response format. This format will NOT be part of v3, so it doesn't belong in the v3 deprecations list.
1 parent 192a0a2 commit efb3972

8 files changed

Lines changed: 67 additions & 31 deletions

File tree

content/changes/2013-04-25-deprecating-merge-commit-sha.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@
1616
attribute](/v3/pulls/#mergability) for improved understanding.
1717

1818
To protect future API consumers from this confusion, we have
19-
[deprecated](/#expected-changes) the `merge_commit_sha` attribute, and we will
19+
[deprecated](/#deprecations) the `merge_commit_sha` attribute, and we will
2020
remove it in the next major version of the API.
2121

2222
As always, if you have any questions or feedback, please drop us a line at

content/index.md

Lines changed: 45 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -24,31 +24,51 @@ to the actual date.
2424
We consider the "beta" API unchangeable. [File a support issue](https://github.com/contact)
2525
if you have problems.
2626

27-
#### Expected Changes
28-
29-
These changes are _not_ implemented, just planned for the next major API version.
30-
31-
* `[ ]` Standardize on existing `*_url` attributes for hypermedia. Remove all `_links`
32-
objects.
33-
* `[✓]` <del>The '/repos/:owner/:repo/hooks/:id/test' action becomes
34-
'/repos/:owner/:repo/hooks/:id/tests'.</del>
35-
* `[✓]` <del>The '/gists/:id/fork' action becomes '/gists/:id/forks'.</del>
36-
* `[ ]` Gist forks/history objects become separate API calls.
37-
* `[ ]` Gist files object is not returned on Gist listings.
38-
* `[ ]` Commit schema will change to be [more consistent](https://gist.github.com/3a2e5779588e21b0c0f3).
39-
* `[ ]` `master_branch` becomes `default_branch`.
40-
* `[ ]` `integrate_branch` on the [repo API](/v3/repos/#get) will no longer be
41-
returned.
42-
* `[ ]` `merge_commit_sha` on the [pull request API](/v3/pulls/#get-a-single-pull-request)
43-
will no longer be returned.
44-
* `[ ]` Use the `private` attribute when creating a private repository,
45-
instead of setting `public` to false.
46-
* `[ ]` Use JSON to POST to the "repos/:owner/:repo/forks" endpoint, instead of a query string.
47-
* `[✓]` <del>User Emails come back [as a hash][v3-email] instead of a string.</del>
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"`).
50-
* `[ ]` Remove the [Legacy Search API](/v3/search/legacy/).
51-
* `[ ]` Top-level `rate` hash on the [Rate Limit API](v3/rate_limit/) will no longer be returned.
27+
### Deprecations
28+
29+
The following functionality is deprecated. For backwards compatibility purposes,
30+
API v3 will continue to provide this functionality. However, this deprecated
31+
functionality **will be removed** in the _next_ major version of the API.
32+
33+
The recommendations below will help you prepare your application for the next major version of the API.
34+
35+
1. Method: /gists/:id/fork
36+
: Recommendation: Use **/gists/:id/forks** (plural) instead.
37+
38+
1. Method: /legacy/issues/search/:owner/:repository/:state/:keyword
39+
: Recommendation: Use [v3 Issue Search API](v3/search/#search-issues) instead.
40+
41+
1. Method: /legacy/repos/search/:keyword
42+
: Recommendation: Use [v3 Repository Search API](/v3/search/#search-repositories) instead.
43+
44+
1. Method: /legacy/user/search/:keyword
45+
: Recommendation: Use [v3 User Search API](/v3/search/#search-users) instead.
46+
47+
1. Method: /legacy/user/email/:email
48+
: Recommendation: Use [v3 User Search API](/v3/search/#search-users) instead.
49+
50+
1. Method: /repos/:owner/:repo/hooks/:id/test
51+
: Recommendation: Use **/repos/:owner/:repo/hooks/:id/tests** (plural) instead.
52+
53+
1. Query parameters when POSTing to /repos/:owner/:repo/forks
54+
: Recommendation: Use JSON to POST to this method instead.
55+
56+
1. Pull Request attribute: merge_commit_sha
57+
: Recommendation: [Do not use this attribute](/changes/2013-04-25-deprecating-merge-commit-sha/).
58+
59+
1. Rate Limit attribute: rate
60+
: Recommendation: Use **resources["core"]** instead.
61+
62+
1. Repository attribute: master_branch
63+
: Recommendation: Use **default_branch** instead.
64+
65+
1. Repository attribute: public
66+
: Recommendation: When [creating a repository](/v3/repos/#create), use the
67+
**private** attribute to indicate whether the repository should be public or
68+
private. Do not use the **public** attribute.
69+
70+
1. User attribute: bio
71+
: Recommendation: Do not use this attribute. It is obsolete.
5272

5373
### Breaking Beta Changes
5474

content/v3/media.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -138,4 +138,4 @@ The Commit, Commit Comparison, and Pull Request resources support
138138
[git-diff]: http://git-scm.com/docs/git-diff
139139
[git-patch]: http://git-scm.com/docs/git-format-patch
140140
[hypermedia]: /v3/#hypermedia
141-
[expected-changes]: /#expected-changes
141+
[expected-changes]: /#deprecations

content/v3/pulls.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ Each time the pull request receives new commits, GitHub creates a merge commit
7272
to _test_ whether the pull request can be automatically merged into the base
7373
branch. (This _test_ commit is not added to the base branch or the head branch.)
7474
The `merge_commit_sha` attribute holds the SHA of the _test_ merge commit;
75-
however, this attribute is [deprecated](/#expected-changes) and is scheduled for
75+
however, this attribute is [deprecated](/#deprecations) and is scheduled for
7676
removal in the next version of the API. The Boolean `mergeable` attribute will
7777
remain to indicate whether the pull request can be automatically merged.
7878

content/v3/rate_limit.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,7 @@ all the _rest_ of the API.
4343
#### Deprecation Notice
4444

4545
The `"rate"` hash (shown at the bottom of the response above) is
46-
[deprecated](/#expected-changes) and is scheduled for removal in the next
46+
[deprecated](/#deprecations) and is scheduled for removal in the next
4747
version of the API.
4848

4949
If you're writing new API client code (or updating your existing code), you

content/v3/repos/contents.md

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -60,6 +60,11 @@ ref
6060
<%= headers 200 %>
6161
<%= json :directory_content %>
6262

63+
Note: When listing the contents of a directory, submodules have their "type"
64+
specified as "file". Logically, the value *should* be "submodule". This behavior
65+
exists in API v3 [for backwards compatibility purposes](https://github.com/github/developer.github.com/commit/1b329b04cece9f3087faa7b1e0382317a9b93490).
66+
In the next major version of the API, the type will be returned as "submodule".
67+
6368
### Response if content is a symlink
6469

6570
If the requested `:path` points to a symlink, and the symlink's target is a normal file in the repository, then the API responds with the content of the file (in the [format shown above](#response-if-content-is-a-file)).

content/v3/search/legacy.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ v3. There should be no changes, other than the new URL and JSON output format.
1414

1515
<div class="alert">
1616
<p>
17-
The Legacy Search API (described below) is <a href="https://github.com/#expected-changes">deprecated</a>
17+
The Legacy Search API (described below) is <a href="https://github.com/#deprecations">deprecated</a>
1818
and is scheduled for removal in the next version of the API.
1919

2020
We recommend using the <a href="/v3/search/">v3 Search API</a> instead.

content/v3/users/emails.md

Lines changed: 12 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,22 @@ This endpoint is accessible with the user:email scope.
1818

1919
### Response
2020

21+
<div class="alert">
22+
<p>
23+
<strong>Deprecated</strong>: This response format is deprecated.
24+
The API will remove support for this response format in the future.
25+
</p>
26+
<p>
27+
We recommend that you start requesting the new response format as described
28+
in the <a href="#future-response">Future Response</a> section below.
29+
</p>
30+
</div>
31+
2132
<%= headers 200 %>
2233
<%= json ["octocat@github.com", "support@github.com"] %>
2334
<br>
2435

25-
#### Future response
36+
#### Future Response
2637

2738
In the final version of the API, this method will return an array of hashes
2839
with extended information for each email address indicating if the address has

0 commit comments

Comments
 (0)