Skip to content

Commit 60aaa94

Browse files
committed
proposed tags and branches api change
1 parent 8205474 commit 60aaa94

File tree

2 files changed

+11
-7
lines changed

2 files changed

+11
-7
lines changed

content/v3/git/tags.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ lightweight tags.
1414
### Response
1515

1616
<%= headers 200 %>
17-
<%= json :tag %>
17+
<%= json :gittag %>
1818

1919
## Create a Tag Object
2020

@@ -55,5 +55,5 @@ tagger.date
5555

5656
<%= headers 201,
5757
:Location => "https://api.github.com/repos/:user/:repo/git/tags/:sha" %>
58-
<%= json :tag %>
58+
<%= json :gittag %>
5959

lib/resources.rb

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -129,17 +129,21 @@ def json(key)
129129
})
130130

131131
TAG = {
132-
"commit_url" => "https://api.github.com/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
133132
"name" => "v0.1",
134-
"sha" => "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
133+
"commit" => {
134+
"sha" => "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
135+
"url" => "https://api.github.com/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc"
136+
},
135137
"zipball_url" => "https://github.com/octocat/Hello-World/zipball/v0.1",
136138
"tarball_url" => "https://github.com/octocat/Hello-World/tarball/v0.1",
137139
}
138140

139141
BRANCH = {
140-
"commit_url" => "https://api.github.com/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
141142
"name" => "master",
142-
"sha" => "6dcb09b5b57875f334f61aebed695e2e4193db5e"
143+
"commit" => {
144+
"sha" => "6dcb09b5b57875f334f61aebed695e2e4193db5e",
145+
"url" => "https://api.github.com/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc"
146+
}
143147
}
144148

145149

@@ -555,7 +559,7 @@ def json(key)
555559
]
556560
}
557561

558-
TAG = {
562+
GITTAG = {
559563
"tag" => "v0.0.1",
560564
"sha" => "940bd336248efae0f9ee5bc7b2d5c985887b16ac",
561565
"url" => "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac",

0 commit comments

Comments
 (0)