Skip to content

Commit a5414d2

Browse files
committed
Swap :user for :owner for clarity
I've seen a number of new API users get tripped up on the :user parameter when they're looking up a repository that belongs to an org. This changes all the :user/:repo pairs in the docs to :owner/:repo to be a bit clearer.
1 parent 424d13e commit a5414d2

30 files changed

+135
-135
lines changed

content/index.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ The API is expected to be finalized Real Soon Now.
3434

3535
* All `*_url` attributes move to a `_links` object. See [Pull
3636
Requests](/v3/pulls/#get-a-single-pull-request) for an example.
37-
* The `/repos/:user/:repo/hooks/:id/test` action becomes
38-
`/repos/:user/:repo/hooks/:id/tests`.
37+
* The `/repos/:owner/:repo/hooks/:id/test` action becomes
38+
`/repos/:owner/:repo/hooks/:id/tests`.
3939
* The `/gists/:id/fork` action becomes `/gists/:id/forks`.
4040
* Gist forks/history objects become separate API calls.
4141
* Gist files object is not returned on Gist listings.

content/v3.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,7 +50,7 @@ parameter:
5050
$ curl -i "https://api.github.com/repos/mojombo/jekyll/issues?state=closed"
5151
</pre>
5252

53-
In this example, the 'mojombo' and 'jekyll' values are provided for the `:user`
53+
In this example, the 'mojombo' and 'jekyll' values are provided for the `:owner`
5454
and `:repo` parameters in the path while `:state` is passed in the query
5555
string.
5656

content/v3/events.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -25,15 +25,15 @@ All Events have the same response format:
2525

2626
## List repository events
2727

28-
GET /repos/:user/:repo/events
28+
GET /repos/:owner/:repo/events
2929

3030
## List issue events for a repository
3131

32-
GET /repos/:user/:repo/issues/events
32+
GET /repos/:owner/:repo/issues/events
3333

3434
## List public events for a network of repositories
3535

36-
GET /networks/:user/:repo/events
36+
GET /networks/:owner/:repo/events
3737

3838
## List public events for an organization
3939

content/v3/git/blobs.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ read more about the use of mime types in the API [here](/v3/media/).
1717

1818
## Get a Blob
1919

20-
GET /repos/:user/:repo/git/blobs/:sha
20+
GET /repos/:owner/:repo/git/blobs/:sha
2121

2222
### Response
2323

@@ -26,7 +26,7 @@ read more about the use of mime types in the API [here](/v3/media/).
2626

2727
## Create a Blob
2828

29-
POST /repos/:user/:repo/git/blobs
29+
POST /repos/:owner/:repo/git/blobs
3030

3131
### Input
3232

@@ -35,7 +35,7 @@ read more about the use of mime types in the API [here](/v3/media/).
3535
### Response
3636

3737
<%= headers 201,
38-
:Location => "https://api.github.com/git/:user/:repo/blob/:sha" %>
38+
:Location => "https://api.github.com/git/:owner/:repo/blob/:sha" %>
3939
<%= json :sha => "3a0f86fb8db8eea7ccbb9a95f325ddbedfb25e15" %>
4040

4141
## Custom Mime Types

content/v3/git/commits.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: Git Commits | GitHub API
99

1010
## Get a Commit
1111

12-
GET /repos/:user/:repo/git/commits/:sha
12+
GET /repos/:owner/:repo/git/commits/:sha
1313

1414
### Response
1515

@@ -18,7 +18,7 @@ title: Git Commits | GitHub API
1818

1919
## Create a Commit
2020

21-
POST /repos/:user/:repo/git/commits
21+
POST /repos/:owner/:repo/git/commits
2222

2323
### Parameters
2424

@@ -71,6 +71,6 @@ committer.date
7171
### Response
7272

7373
<%= headers 201,
74-
:Location => "https://api.github.com/git/:user/:repo/commit/:sha" %>
74+
:Location => "https://api.github.com/git/:owner/:repo/commit/:sha" %>
7575
<%= json :new_commit %>
7676

content/v3/git/refs.md

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -9,11 +9,11 @@ title: Git Refs | GitHub API
99

1010
## Get a Reference
1111

12-
GET /repos/:user/:repo/git/refs/:ref
12+
GET /repos/:owner/:repo/git/refs/:ref
1313

1414
The `ref` in the URL must be formatted as `heads/branch`, not just `branch`. For example, the call to get the data for a branch named `skunkworkz/featureA` would be:
1515

16-
GET /repos/:user/:repo/git/refs/heads/skunkworkz/featureA
16+
GET /repos/:owner/:repo/git/refs/heads/skunkworkz/featureA
1717

1818
### Response
1919

@@ -22,7 +22,7 @@ The `ref` in the URL must be formatted as `heads/branch`, not just `branch`. For
2222

2323
## Get all References
2424

25-
GET /repos/:user/:repo/git/refs
25+
GET /repos/:owner/:repo/git/refs
2626

2727
This will return an array of all the references on the system, including
2828
things like notes and stashes if they exist on the server. Anything in
@@ -32,7 +32,7 @@ most common.
3232
You can also request a sub-namespace. For example, to get all the tag
3333
references, you can call:
3434

35-
GET /repos/:user/:repo/git/refs/tags
35+
GET /repos/:owner/:repo/git/refs/tags
3636

3737
For a full refs listing, you'll get something that looks like:
3838

@@ -42,7 +42,7 @@ For a full refs listing, you'll get something that looks like:
4242

4343
## Create a Reference
4444

45-
POST /repos/:user/:repo/git/refs
45+
POST /repos/:owner/:repo/git/refs
4646

4747
### Parameters
4848

@@ -65,7 +65,7 @@ sha
6565

6666
## Update a Reference
6767

68-
PATCH /repos/:user/:repo/git/refs/:ref
68+
PATCH /repos/:owner/:repo/git/refs/:ref
6969

7070
### Parameters
7171

@@ -85,12 +85,12 @@ out or setting it to `false` will make sure you're not overwriting work.
8585
### Response
8686

8787
<%= headers 200, \
88-
:Location => "https://api.github.com/git/:user/:repo/commit/:sha" %>
88+
:Location => "https://api.github.com/git/:owner/:repo/commit/:sha" %>
8989
<%= json :ref %>
9090

9191
## Delete a Reference
9292

93-
DELETE /repos/:user/:repo/git/refs/:ref
93+
DELETE /repos/:owner/:repo/git/refs/:ref
9494

9595
Example: Deleting a branch:
9696

content/v3/git/tags.md

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ lightweight tags.
1212

1313
## Get a Tag
1414

15-
GET /repos/:user/:repo/git/tags/:sha
15+
GET /repos/:owner/:repo/git/tags/:sha
1616

1717
### Response
1818

@@ -28,7 +28,7 @@ the `refs/tags/[tag]` reference. If you want to create a lightweight
2828
tag, you simply have to create the reference - this call would be
2929
unnecessary.
3030

31-
POST /repos/:user/:repo/git/tags
31+
POST /repos/:owner/:repo/git/tags
3232

3333
### Parameters
3434

@@ -57,6 +57,6 @@ tagger.date
5757
### Response
5858

5959
<%= headers 201,
60-
:Location => "https://api.github.com/repos/:user/:repo/git/tags/:sha" %>
60+
:Location => "https://api.github.com/repos/:owner/:repo/git/tags/:sha" %>
6161
<%= json :gittag %>
6262

content/v3/git/trees.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ title: Git Trees | GitHub API
99

1010
## Get a Tree
1111

12-
GET /repos/:user/:repo/git/trees/:sha
12+
GET /repos/:owner/:repo/git/trees/:sha
1313

1414
### Response
1515

@@ -18,7 +18,7 @@ title: Git Trees | GitHub API
1818

1919
## Get a Tree Recursively
2020

21-
GET /repos/:user/:repo/git/trees/:sha?recursive=1
21+
GET /repos/:owner/:repo/git/trees/:sha?recursive=1
2222

2323
### Response
2424

@@ -32,7 +32,7 @@ tree and a nested path modifying that tree are specified, it will
3232
overwrite the contents of that tree with the new path contents and write
3333
a new tree out.
3434

35-
POST /repos/:user/:repo/git/trees
35+
POST /repos/:owner/:repo/git/trees
3636

3737
### Parameters
3838

@@ -68,6 +68,6 @@ tree.content
6868
### Response
6969

7070
<%= headers 201,
71-
:Location => "https://api.github.com/repos/:user/:repo/git/trees/:sha" %>
71+
:Location => "https://api.github.com/repos/:owner/:repo/git/trees/:sha" %>
7272
<%= json :tree_new %>
7373

content/v3/issues.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,7 +45,7 @@ since
4545

4646
## List issues for a repository
4747

48-
GET /repos/:user/:repo/issues
48+
GET /repos/:owner/:repo/issues
4949

5050
### Parameters
5151

@@ -85,7 +85,7 @@ since
8585

8686
## Get a single issue
8787

88-
GET /repos/:user/:repo/issues/:number
88+
GET /repos/:owner/:repo/issues/:number
8989

9090
### Response
9191

@@ -94,7 +94,7 @@ since
9494

9595
## Create an issue
9696

97-
POST /repos/:user/:repo/issues
97+
POST /repos/:owner/:repo/issues
9898

9999
### Input
100100

@@ -132,7 +132,7 @@ issue.
132132

133133
## Edit an issue
134134

135-
PATCH /repos/:user/:repo/issues/:number
135+
PATCH /repos/:owner/:repo/issues/:number
136136

137137
### Input
138138

content/v3/issues/assignees.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ title: Issue Assignees | GitHub API
1212
This call lists all the available assignees (owner + collaborators) to which
1313
issues may be assigned.
1414

15-
GET /repos/:user/:repo/assignees
15+
GET /repos/:owner/:repo/assignees
1616

1717
### Response
1818

@@ -23,7 +23,7 @@ issues may be assigned.
2323

2424
You may also check to see if a particular user is an assignee for a repository.
2525

26-
GET /repos/:user/:repo/assignees/:assignee
26+
GET /repos/:owner/:repo/assignees/:assignee
2727

2828
### Response
2929

0 commit comments

Comments
 (0)