Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Extend repositories functionality #45

Merged
merged 7 commits into from
Dec 8, 2015
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
47 changes: 47 additions & 0 deletions fixture/vcr_cassettes/repositories#create.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,47 @@
[
{
"request": {
"body": "{\"name\":\"tentacat\",\"private\":false}",
"headers": {
"User-agent": "tentacat",
"Authorization": "token f3c5a340944a18ad4cdf603c17be8245e71bcf87"
},
"method": "post",
"options": [],
"request_body": "",
"url": "https://api.github.com/user/repos"
},
"response": {
"body": "{\"id\":47581134,\"name\":\"tentacat\",\"full_name\":\"soudqwiggle/tentacat\",\"owner\":{\"login\":\"soudqwiggle\",\"id\":16187637,\"avatar_url\":\"https://avatars.githubusercontent.com/u/16187637?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/soudqwiggle\",\"html_url\":\"https://github.com/soudqwiggle\",\"followers_url\":\"https://api.github.com/users/soudqwiggle/followers\",\"following_url\":\"https://api.github.com/users/soudqwiggle/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/soudqwiggle/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/soudqwiggle/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/soudqwiggle/subscriptions\",\"organizations_url\":\"https://api.github.com/users/soudqwiggle/orgs\",\"repos_url\":\"https://api.github.com/users/soudqwiggle/repos\",\"events_url\":\"https://api.github.com/users/soudqwiggle/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/soudqwiggle/received_events\",\"type\":\"User\",\"site_admin\":false},\"private\":false,\"html_url\":\"https://github.com/soudqwiggle/tentacat\",\"description\":null,\"fork\":false,\"url\":\"https://api.github.com/repos/soudqwiggle/tentacat\",\"forks_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/forks\",\"keys_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/keys{/key_id}\",\"collaborators_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/collaborators{/collaborator}\",\"teams_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/teams\",\"hooks_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/hooks\",\"issue_events_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/issues/events{/number}\",\"events_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/events\",\"assignees_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/assignees{/user}\",\"branches_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/branches{/branch}\",\"tags_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/tags\",\"blobs_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/git/blobs{/sha}\",\"git_tags_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/git/tags{/sha}\",\"git_refs_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/git/refs{/sha}\",\"trees_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/git/trees{/sha}\",\"statuses_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/statuses/{sha}\",\"languages_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/languages\",\"stargazers_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/stargazers\",\"contributors_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/contributors\",\"subscribers_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/subscribers\",\"subscription_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/subscription\",\"commits_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/commits{/sha}\",\"git_commits_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/git/commits{/sha}\",\"comments_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/comments{/number}\",\"issue_comment_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/issues/comments{/number}\",\"contents_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/contents/{+path}\",\"compare_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/compare/{base}...{head}\",\"merges_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/merges\",\"archive_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/{archive_format}{/ref}\",\"downloads_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/downloads\",\"issues_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/issues{/number}\",\"pulls_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/pulls{/number}\",\"milestones_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/milestones{/number}\",\"notifications_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/notifications{?since,all,participating}\",\"labels_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/labels{/name}\",\"releases_url\":\"https://api.github.com/repos/soudqwiggle/tentacat/releases{/id}\",\"created_at\":\"2015-12-07T21:44:54Z\",\"updated_at\":\"2015-12-07T21:44:54Z\",\"pushed_at\":\"2015-12-07T21:44:54Z\",\"git_url\":\"git://github.com/soudqwiggle/tentacat.git\",\"ssh_url\":\"git@github.com:soudqwiggle/tentacat.git\",\"clone_url\":\"https://github.com/soudqwiggle/tentacat.git\",\"svn_url\":\"https://github.com/soudqwiggle/tentacat\",\"homepage\":null,\"size\":0,\"stargazers_count\":0,\"watchers_count\":0,\"language\":null,\"has_issues\":true,\"has_downloads\":true,\"has_wiki\":true,\"has_pages\":false,\"forks_count\":0,\"mirror_url\":null,\"open_issues_count\":0,\"forks\":0,\"open_issues\":0,\"watchers\":0,\"default_branch\":\"master\",\"permissions\":{\"admin\":true,\"push\":true,\"pull\":true},\"network_count\":0,\"subscribers_count\":1}",
"headers": {
"Server": "GitHub.com",
"Date": "Mon, 07 Dec 2015 21:44:54 GMT",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "4727",
"Status": "201 Created",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4996",
"X-RateLimit-Reset": "1449526874",
"Cache-Control": "private, max-age=60, s-maxage=60",
"ETag": "\"b4d6dcb60ee19aa53f3a0ef4f5bdf4b1\"",
"X-OAuth-Scopes": "gist, repo, user",
"X-Accepted-OAuth-Scopes": "public_repo, repo",
"Location": "https://api.github.com/repos/soudqwiggle/tentacat",
"Vary": "Accept, Authorization, Cookie, X-GitHub-OTP",
"X-GitHub-Media-Type": "github.v3; format=json",
"X-XSS-Protection": "1; mode=block",
"X-Frame-Options": "deny",
"Content-Security-Policy": "default-src 'none'",
"Access-Control-Allow-Credentials": "true",
"Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Content-Type-Options": "nosniff",
"X-Served-By": "173530fed4bbeb1e264b2ed22e8b5c20",
"X-GitHub-Request-Id": "5F5BD15F:16267:7114ADA:5665FDD5"
},
"status_code": 201,
"type": "ok"
}
}
]
42 changes: 42 additions & 0 deletions fixture/vcr_cassettes/repositories#delete.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,42 @@
[
{
"request": {
"body": "\"\"",
"headers": {
"User-agent": "tentacat",
"Authorization": "token f3c5a340944a18ad4cdf603c17be8245e71bcf87"
},
"method": "delete",
"options": [],
"request_body": "",
"url": "https://api.github.com/repos/soudqwiggle/tentacat"
},
"response": {
"body": "#Reference<0.0.4.213>",
"headers": {
"Server": "GitHub.com",
"Date": "Mon, 07 Dec 2015 21:54:56 GMT",
"Status": "204 No Content",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4993",
"X-RateLimit-Reset": "1449526874",
"X-OAuth-Scopes": "admin:org, admin:org_hook, admin:public_key, admin:repo_hook, delete_repo, gist, notifications, repo, user",
"X-Accepted-OAuth-Scopes": "delete_repo",
"X-GitHub-Media-Type": "github.v3; format=json",
"X-XSS-Protection": "1; mode=block",
"X-Frame-Options": "deny",
"Content-Security-Policy": "default-src 'none'",
"Access-Control-Allow-Credentials": "true",
"Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Content-Type-Options": "nosniff",
"Vary": "Accept-Encoding",
"X-Served-By": "2811da37fbdda4367181b328b22b2499",
"X-GitHub-Request-Id": "5F5BD15F:16269:814F81A:5666002F"
},
"status_code": 204,
"type": "ok"
}
}
]
46 changes: 46 additions & 0 deletions fixture/vcr_cassettes/repositories#list_mine.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"request": {
"body": "\"\"",
"headers": {
"User-agent": "tentacat",
"Authorization": "token f3c5a340944a18ad4cdf603c17be8245e71bcf87"
},
"method": "get",
"options": [],
"request_body": "",
"url": "https://api.github.com/user/repos"
},
"response": {
"body": "[]",
"headers": {
"Server": "GitHub.com",
"Date": "Mon, 07 Dec 2015 09:42:02 GMT",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "2",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4998",
"X-RateLimit-Reset": "1449483927",
"Cache-Control": "private, max-age=60, s-maxage=60",
"ETag": "\"121566a6551b71fcd2ea0b10b96a88ad\"",
"X-OAuth-Scopes": "gist, repo, user",
"X-Accepted-OAuth-Scopes": "",
"Vary": "Accept, Authorization, Cookie, X-GitHub-OTP",
"X-GitHub-Media-Type": "github.v3; format=json",
"X-XSS-Protection": "1; mode=block",
"X-Frame-Options": "deny",
"Content-Security-Policy": "default-src 'none'",
"Access-Control-Allow-Credentials": "true",
"Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Content-Type-Options": "nosniff",
"X-Served-By": "2d7a5e35115884240089368322196939",
"X-GitHub-Request-Id": "5B41BD9C:16263:1D1D312:5665546A"
},
"status_code": 200,
"type": "ok"
}
}
]
46 changes: 46 additions & 0 deletions fixture/vcr_cassettes/repositories#list_orgs.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,46 @@
[
{
"request": {
"body": "\"\"",
"headers": {
"User-agent": "tentacat",
"Authorization": "token f3c5a340944a18ad4cdf603c17be8245e71bcf87"
},
"method": "get",
"options": [],
"request_body": "",
"url": "https://api.github.com/orgs/elixir-conspiracy/repos"
},
"response": {
"body": "[{\"id\":14144680,\"name\":\"pacman\",\"full_name\":\"elixir-conspiracy/pacman\",\"owner\":{\"login\":\"elixir-conspiracy\",\"id\":5861005,\"avatar_url\":\"https://avatars.githubusercontent.com/u/5861005?v=3\",\"gravatar_id\":\"\",\"url\":\"https://api.github.com/users/elixir-conspiracy\",\"html_url\":\"https://github.com/elixir-conspiracy\",\"followers_url\":\"https://api.github.com/users/elixir-conspiracy/followers\",\"following_url\":\"https://api.github.com/users/elixir-conspiracy/following{/other_user}\",\"gists_url\":\"https://api.github.com/users/elixir-conspiracy/gists{/gist_id}\",\"starred_url\":\"https://api.github.com/users/elixir-conspiracy/starred{/owner}{/repo}\",\"subscriptions_url\":\"https://api.github.com/users/elixir-conspiracy/subscriptions\",\"organizations_url\":\"https://api.github.com/users/elixir-conspiracy/orgs\",\"repos_url\":\"https://api.github.com/users/elixir-conspiracy/repos\",\"events_url\":\"https://api.github.com/users/elixir-conspiracy/events{/privacy}\",\"received_events_url\":\"https://api.github.com/users/elixir-conspiracy/received_events\",\"type\":\"Organization\",\"site_admin\":false},\"private\":false,\"html_url\":\"https://github.com/elixir-conspiracy/pacman\",\"description\":\"Elixir berlin meetup kata challenge\",\"fork\":false,\"url\":\"https://api.github.com/repos/elixir-conspiracy/pacman\",\"forks_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/forks\",\"keys_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/keys{/key_id}\",\"collaborators_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/collaborators{/collaborator}\",\"teams_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/teams\",\"hooks_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/hooks\",\"issue_events_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/issues/events{/number}\",\"events_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/events\",\"assignees_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/assignees{/user}\",\"branches_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/branches{/branch}\",\"tags_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/tags\",\"blobs_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/git/blobs{/sha}\",\"git_tags_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/git/tags{/sha}\",\"git_refs_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/git/refs{/sha}\",\"trees_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/git/trees{/sha}\",\"statuses_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/statuses/{sha}\",\"languages_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/languages\",\"stargazers_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/stargazers\",\"contributors_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/contributors\",\"subscribers_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/subscribers\",\"subscription_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/subscription\",\"commits_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/commits{/sha}\",\"git_commits_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/git/commits{/sha}\",\"comments_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/comments{/number}\",\"issue_comment_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/issues/comments{/number}\",\"contents_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/contents/{+path}\",\"compare_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/compare/{base}...{head}\",\"merges_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/merges\",\"archive_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/{archive_format}{/ref}\",\"downloads_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/downloads\",\"issues_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/issues{/number}\",\"pulls_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/pulls{/number}\",\"milestones_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/milestones{/number}\",\"notifications_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/notifications{?since,all,participating}\",\"labels_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/labels{/name}\",\"releases_url\":\"https://api.github.com/repos/elixir-conspiracy/pacman/releases{/id}\",\"created_at\":\"2013-11-05T15:11:02Z\",\"updated_at\":\"2015-01-05T12:58:36Z\",\"pushed_at\":\"2013-11-05T20:06:20Z\",\"git_url\":\"git://github.com/elixir-conspiracy/pacman.git\",\"ssh_url\":\"git@github.com:elixir-conspiracy/pacman.git\",\"clone_url\":\"https://github.com/elixir-conspiracy/pacman.git\",\"svn_url\":\"https://github.com/elixir-conspiracy/pacman\",\"homepage\":null,\"size\":144,\"stargazers_count\":5,\"watchers_count\":5,\"language\":\"Elixir\",\"has_issues\":true,\"has_downloads\":true,\"has_wiki\":true,\"has_pages\":false,\"forks_count\":6,\"mirror_url\":null,\"open_issues_count\":1,\"forks\":6,\"open_issues\":1,\"watchers\":5,\"default_branch\":\"master\",\"permissions\":{\"admin\":false,\"push\":false,\"pull\":true}}]",
"headers": {
"Server": "GitHub.com",
"Date": "Mon, 07 Dec 2015 09:55:40 GMT",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "9924",
"Status": "200 OK",
"X-RateLimit-Limit": "5000",
"X-RateLimit-Remaining": "4996",
"X-RateLimit-Reset": "1449483927",
"Cache-Control": "private, max-age=60, s-maxage=60",
"ETag": "\"373fa6366830302d9ec61d52c00f9b2e\"",
"X-OAuth-Scopes": "gist, repo, user",
"X-Accepted-OAuth-Scopes": "repo",
"Vary": "Accept, Authorization, Cookie, X-GitHub-OTP",
"X-GitHub-Media-Type": "github.v3; format=json",
"X-XSS-Protection": "1; mode=block",
"X-Frame-Options": "deny",
"Content-Security-Policy": "default-src 'none'",
"Access-Control-Allow-Credentials": "true",
"Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Content-Type-Options": "nosniff",
"X-Served-By": "7b641bda7ec2ca7cd9df72d2578baf75",
"X-GitHub-Request-Id": "5B41BD9C:16264:270BA23:5665579C"
},
"status_code": 200,
"type": "ok"
}
}
]
44 changes: 44 additions & 0 deletions fixture/vcr_cassettes/repositories#list_public.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,44 @@
[
{
"request": {
"body": "\"\"",
"headers": {
"User-agent": "tentacat"
},
"method": "get",
"options": [],
"request_body": "",
"url": "https://api.github.com/repositories"
},
"response": {
"body": "[]",
"headers": {
"Server": "GitHub.com",
"Date": "Mon, 07 Dec 2015 22:22:17 GMT",
"Content-Type": "application/json; charset=utf-8",
"Content-Length": "402128",
"Status": "200 OK",
"X-RateLimit-Limit": "60",
"X-RateLimit-Remaining": "59",
"X-RateLimit-Reset": "1449530537",
"Cache-Control": "public, max-age=60, s-maxage=60",
"ETag": "\"13b68ab4955c9ac3ee82c54f3d6a0d8f\"",
"Vary": "Accept",
"X-GitHub-Media-Type": "github.v3; format=json",
"Link": "<https://api.github.com/repositories?since=367>; rel=\"next\", <https://api.github.com/repositories{?since}>; rel=\"first\"",
"X-XSS-Protection": "1; mode=block",
"X-Frame-Options": "deny",
"Content-Security-Policy": "default-src 'none'",
"Access-Control-Allow-Credentials": "true",
"Access-Control-Expose-Headers": "ETag, Link, X-GitHub-OTP, X-RateLimit-Limit, X-RateLimit-Remaining, X-RateLimit-Reset, X-OAuth-Scopes, X-Accepted-OAuth-Scopes, X-Poll-Interval",
"Access-Control-Allow-Origin": "*",
"Strict-Transport-Security": "max-age=31536000; includeSubdomains; preload",
"X-Content-Type-Options": "nosniff",
"X-Served-By": "474556b853193c38f1b14328ce2d1b7d",
"X-GitHub-Request-Id": "5F5BD15F:1879B:8F33331:56660698"
},
"status_code": 200,
"type": "ok"
}
}
]
Loading