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
I've seen a number of new API users get tripped up on the :userparameter 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 bea bit clearer.
Copy file name to clipboardExpand all lines: content/v3/git/refs.md
+8-8Lines changed: 8 additions & 8 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -9,11 +9,11 @@ title: Git Refs | GitHub API
9
9
10
10
##Get a Reference
11
11
12
-
GET /repos/:user/:repo/git/refs/:ref
12
+
GET /repos/:owner/:repo/git/refs/:ref
13
13
14
14
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:
15
15
16
-
GET /repos/:user/:repo/git/refs/heads/skunkworkz/featureA
16
+
GET /repos/:owner/:repo/git/refs/heads/skunkworkz/featureA
17
17
18
18
###Response
19
19
@@ -22,7 +22,7 @@ The `ref` in the URL must be formatted as `heads/branch`, not just `branch`. For
22
22
23
23
##Get all References
24
24
25
-
GET /repos/:user/:repo/git/refs
25
+
GET /repos/:owner/:repo/git/refs
26
26
27
27
This will return an array of all the references on the system, including
28
28
things like notes and stashes if they exist on the server. Anything in
@@ -32,7 +32,7 @@ most common.
32
32
You can also request a sub-namespace. For example, to get all the tag
33
33
references, you can call:
34
34
35
-
GET /repos/:user/:repo/git/refs/tags
35
+
GET /repos/:owner/:repo/git/refs/tags
36
36
37
37
For a full refs listing, you'll get something that looks like:
38
38
@@ -42,7 +42,7 @@ For a full refs listing, you'll get something that looks like:
42
42
43
43
##Create a Reference
44
44
45
-
POST /repos/:user/:repo/git/refs
45
+
POST /repos/:owner/:repo/git/refs
46
46
47
47
###Parameters
48
48
@@ -65,7 +65,7 @@ sha
65
65
66
66
##Update a Reference
67
67
68
-
PATCH /repos/:user/:repo/git/refs/:ref
68
+
PATCH /repos/:owner/:repo/git/refs/:ref
69
69
70
70
###Parameters
71
71
@@ -85,12 +85,12 @@ out or setting it to `false` will make sure you're not overwriting work.