Skip to content

Commit 15a2f99

Browse files
committed
tags and branches api change
Conflicts: content/v3/git/tags.md lib/resources.rb
1 parent 68b560b commit 15a2f99

1 file changed

Lines changed: 175 additions & 8 deletions

File tree

lib/resources.rb

Lines changed: 175 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -130,17 +130,21 @@ def json(key)
130130
})
131131

132132
TAG = {
133-
:commit_url => "https://api.github.com/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
134-
:name => "v0.1",
135-
:sha => "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
136-
:zipball_url => 'https://github.com/octocat/Hello-World/zipball/v0.1',
137-
:tarball_url => 'https://github.com/octocat/Hello-World/tarball/v0.1',
133+
"name" => "v0.1",
134+
"commit" => {
135+
"sha" => "c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
136+
"url" => "https://api.github.com/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc"
137+
},
138+
"zipball_url" => "https://github.com/octocat/Hello-World/zipball/v0.1",
139+
"tarball_url" => "https://github.com/octocat/Hello-World/tarball/v0.1",
138140
}
139141

140142
BRANCH = {
141-
:commit_url => "https://api.github.com/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc",
142-
:name => 'master',
143-
:sha => '6dcb09b5b57875f334f61aebed695e2e4193db5e'
143+
"name" => "master",
144+
"commit" => {
145+
"sha" => "6dcb09b5b57875f334f61aebed695e2e4193db5e",
146+
"url" => "https://api.github.com/octocat/Hello-World/commits/c5b97d5ae6c19d5c5df71a34c7fbeeda2479ccbc"
147+
}
144148
}
145149

146150
ORG = {
@@ -307,6 +311,169 @@ def json(key)
307311
"user" => USER,
308312
"created_at" => "2011-04-18T23:23:56Z"
309313
}
314+
315+
TREE = {
316+
"sha" => "9fb037999f264ba9a7fc6274d15fa3ae2ab98312",
317+
"url" => "https://api.github.com/repo/octocat/Hello-World/trees/9fb037999f264ba9a7fc6274d15fa3ae2ab98312",
318+
"tree" => [
319+
{ "path" => "file.rb",
320+
"mode" => "100644",
321+
"type" => "blob",
322+
"size" => 30,
323+
"sha" => "44b4fc6d56897b048c772eb4087f854f46256132",
324+
"url" => "https://api.github.com/octocat/Hello-World/git/blobs/44b4fc6d56897b048c772eb4087f854f46256132",
325+
},
326+
{ "path" => "subdir",
327+
"mode" => "040000",
328+
"type" => "tree",
329+
"sha" => "f484d249c660418515fb01c2b9662073663c242e",
330+
"url" => "https://api.github.com/octocat/Hello-World/git/blobs/f484d249c660418515fb01c2b9662073663c242e"
331+
},
332+
{ "path" => "exec_file",
333+
"mode" => "100755",
334+
"type" => "blob",
335+
"size" => 75,
336+
"sha" => "45b983be36b73c0788dc9cbcb76cbb80fc7bb057",
337+
"url" => "https://api.github.com/octocat/Hello-World/git/blobs/45b983be36b73c0788dc9cbcb76cbb80fc7bb057",
338+
}
339+
]
340+
}
341+
TREE_EXTRA = {
342+
"sha" => "fc6274d15fa3ae2ab983129fb037999f264ba9a7",
343+
"url" => "https://api.github.com/repo/octocat/Hello-World/trees/fc6274d15fa3ae2ab983129fb037999f264ba9a7",
344+
"tree" => [ {
345+
"path" => "subdir/file.txt",
346+
"mode" => "100644",
347+
"type" => "blob",
348+
"size" => 132,
349+
"sha" => "7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b",
350+
"url" => "https://api.github.com/octocat/Hello-World/git/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b"
351+
} ]
352+
}
353+
TREE_NEW = {
354+
"sha" => "cd8274d15fa3ae2ab983129fb037999f264ba9a7",
355+
"url" => "https://api.github.com/repo/octocat/Hello-World/trees/cd8274d15fa3ae2ab983129fb037999f264ba9a7",
356+
"tree" => [ {
357+
"path" => "file.rb",
358+
"mode" => "100644",
359+
"type" => "blob",
360+
"size" => 132,
361+
"sha" => "7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b",
362+
"url" => "https://api.github.com/octocat/Hello-World/git/blobs/7c258a9869f33c1e1e1f74fbb32f07c86cb5a75b"
363+
} ]
364+
}
365+
366+
COMMIT = {
367+
"sha" => "7638417db6d59f3c431d3e1f261cc637155684cd",
368+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
369+
"author" => {
370+
"date" => "2010-04-10T14:10:01-07:00",
371+
"name" => "Scott Chacon",
372+
"email" => "schacon@gmail.com"
373+
},
374+
"committer" => {
375+
"date" => "2010-04-10T14:10:01-07:00",
376+
"name" => "Scott Chacon",
377+
"email" => "schacon@gmail.com"
378+
},
379+
"message" => "added readme, because im a good github citizen\n",
380+
"tree" => {
381+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/trees/691272480426f78a0138979dd3ce63b77f706feb",
382+
"sha" => "691272480426f78a0138979dd3ce63b77f706feb"
383+
},
384+
"parents" => [
385+
{
386+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/commits/1acc419d4d6a9ce985db7be48c6349a0475975b5",
387+
"sha" => "1acc419d4d6a9ce985db7be48c6349a0475975b5"
388+
}
389+
]
390+
}
391+
392+
NEW_COMMIT = {
393+
"sha" => "7638417db6d59f3c431d3e1f261cc637155684cd",
394+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/commits/7638417db6d59f3c431d3e1f261cc637155684cd",
395+
"author" => {
396+
"date" => "2008-07-09T16:13:30+12:00",
397+
"name" => "Scott Chacon",
398+
"email" => "schacon@gmail.com"
399+
},
400+
"committer" => {
401+
"date" => "2008-07-09T16:13:30+12:00",
402+
"name" => "Scott Chacon",
403+
"email" => "schacon@gmail.com"
404+
},
405+
"message" => "my commit message",
406+
"tree" => {
407+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/trees/827efc6d56897b048c772eb4087f854f46256132",
408+
"sha" => "827efc6d56897b048c772eb4087f854f46256132"
409+
},
410+
"parents" => [
411+
{
412+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/commits/7d1b31e74ee336d15cbd21741bc88a537ed063a0",
413+
"sha" => "7d1b31e74ee336d15cbd21741bc88a537ed063a0"
414+
}
415+
]
416+
}
417+
418+
GITTAG = {
419+
"tag" => "v0.0.1",
420+
"sha" => "940bd336248efae0f9ee5bc7b2d5c985887b16ac",
421+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac",
422+
"message" => "initial version\n",
423+
"tagger" => {
424+
"name" => "Scott Chacon",
425+
"email" => "schacon@gmail.com",
426+
"date" => "2011-06-17T14:53:35-07:00"
427+
},
428+
"object" => {
429+
"type" => "commit",
430+
"sha" => "c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c",
431+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/commits/c3d0be41ecbe669545ee3e94d31ed9a4bc91ee3c"
432+
}
433+
}
434+
435+
REF = [
436+
{
437+
"ref" => "refs/heads/sc/featureA",
438+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/sc/featureA",
439+
"object" => {
440+
"type" => "commit",
441+
"sha" => "aa218f56b14c9653891f9e74264a383fa43fefbd",
442+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"
443+
}
444+
}
445+
]
446+
447+
REFS = [
448+
{
449+
"ref" => "refs/heads/master",
450+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/master",
451+
"object" => {
452+
"type" => "commit",
453+
"sha" => "aa218f56b14c9653891f9e74264a383fa43fefbd",
454+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/commits/aa218f56b14c9653891f9e74264a383fa43fefbd"
455+
}
456+
},
457+
{
458+
"ref" => "refs/heads/gh-pages",
459+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/refs/heads/gh-pages",
460+
"object" => {
461+
"type" => "commit",
462+
"sha" => "612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac",
463+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/commits/612077ae6dffb4d2fbd8ce0cccaa58893b07b5ac"
464+
}
465+
},
466+
{
467+
"ref" => "refs/tags/v0.0.1",
468+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/refs/tags/v0.0.1",
469+
"object" => {
470+
"type" => "tag",
471+
"sha" => "940bd336248efae0f9ee5bc7b2d5c985887b16ac",
472+
"url" => "https://api.github.com/repos/octocat/Hello-World/git/tags/940bd336248efae0f9ee5bc7b2d5c985887b16ac"
473+
}
474+
}
475+
]
476+
310477
end
311478
end
312479

0 commit comments

Comments
 (0)