github_cli 0.5.9 → 0.6.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- data/.travis.yml +1 -0
- data/CHANGELOG.md +12 -1
- data/Gemfile.lock +12 -10
- data/README.md +18 -0
- data/features/authorization.feature +53 -0
- data/features/blob.feature +1 -1
- data/features/download.feature +13 -11
- data/features/gist.feature +9 -1
- data/features/label.feature +11 -12
- data/features/member.feature +5 -4
- data/features/merging.feature +5 -4
- data/features/organization.feature +5 -4
- data/features/repository.feature +9 -1
- data/features/search.feature +5 -4
- data/github_cli.gemspec +1 -1
- data/lib/github_cli/api.rb +56 -49
- data/lib/github_cli/apis/assignee.rb +6 -6
- data/lib/github_cli/apis/authorization.rb +5 -5
- data/lib/github_cli/apis/blob.rb +6 -6
- data/lib/github_cli/apis/collaborator.rb +12 -12
- data/lib/github_cli/apis/commit.rb +6 -6
- data/lib/github_cli/apis/content.rb +9 -9
- data/lib/github_cli/apis/download.rb +15 -15
- data/lib/github_cli/apis/email.rb +9 -9
- data/lib/github_cli/apis/event.rb +24 -24
- data/lib/github_cli/apis/follower.rb +16 -15
- data/lib/github_cli/apis/fork.rb +6 -6
- data/lib/github_cli/apis/gist.rb +31 -30
- data/lib/github_cli/apis/hook.rb +6 -6
- data/lib/github_cli/apis/issue.rb +12 -12
- data/lib/github_cli/apis/key.rb +15 -15
- data/lib/github_cli/apis/label.rb +24 -26
- data/lib/github_cli/apis/member.rb +15 -27
- data/lib/github_cli/apis/merging.rb +3 -3
- data/lib/github_cli/apis/milestone.rb +15 -15
- data/lib/github_cli/apis/notification.rb +18 -18
- data/lib/github_cli/apis/organization.rb +9 -9
- data/lib/github_cli/apis/pull_request.rb +24 -24
- data/lib/github_cli/apis/reference.rb +15 -15
- data/lib/github_cli/apis/repository.rb +13 -12
- data/lib/github_cli/apis/search.rb +12 -12
- data/lib/github_cli/apis/starring.rb +15 -15
- data/lib/github_cli/apis/status.rb +6 -6
- data/lib/github_cli/apis/tag.rb +6 -6
- data/lib/github_cli/apis/team.rb +39 -39
- data/lib/github_cli/apis/tree.rb +6 -6
- data/lib/github_cli/apis/user.rb +9 -9
- data/lib/github_cli/apis/watching.rb +15 -15
- data/lib/github_cli/cli.rb +24 -16
- data/lib/github_cli/commands/assignees.rb +8 -2
- data/lib/github_cli/commands/authorizations.rb +10 -13
- data/lib/github_cli/commands/blobs.rb +9 -3
- data/lib/github_cli/commands/collaborators.rb +16 -4
- data/lib/github_cli/commands/commits.rb +11 -6
- data/lib/github_cli/commands/contents.rb +9 -6
- data/lib/github_cli/commands/downloads.rb +30 -6
- data/lib/github_cli/commands/emails.rb +12 -3
- data/lib/github_cli/commands/events.rb +30 -8
- data/lib/github_cli/commands/followers.rb +20 -5
- data/lib/github_cli/commands/forks.rb +6 -4
- data/lib/github_cli/commands/gists.rb +39 -12
- data/lib/github_cli/commands/hooks.rb +1 -1
- data/lib/github_cli/commands/issues.rb +15 -4
- data/lib/github_cli/commands/keys.rb +20 -5
- data/lib/github_cli/commands/labels.rb +53 -14
- data/lib/github_cli/commands/members.rb +28 -9
- data/lib/github_cli/commands/merging.rb +3 -2
- data/lib/github_cli/commands/milestones.rb +27 -15
- data/lib/github_cli/commands/notifications.rb +19 -11
- data/lib/github_cli/commands/organizations.rb +24 -5
- data/lib/github_cli/commands/pull_requests.rb +30 -8
- data/lib/github_cli/commands/references.rb +17 -5
- data/lib/github_cli/commands/repositories.rb +6 -4
- data/lib/github_cli/commands/search.rb +24 -6
- data/lib/github_cli/commands/starring.rb +19 -5
- data/lib/github_cli/commands/statuses.rb +7 -3
- data/lib/github_cli/commands/tags.rb +7 -3
- data/lib/github_cli/commands/teams.rb +52 -17
- data/lib/github_cli/commands/trees.rb +6 -2
- data/lib/github_cli/commands/users.rb +9 -3
- data/lib/github_cli/commands/watching.rb +19 -5
- data/lib/github_cli/vendor/thor/actions/directory.rb +2 -0
- data/lib/github_cli/vendor/thor/actions/empty_directory.rb +3 -19
- data/lib/github_cli/vendor/thor/actions/file_manipulation.rb +4 -1
- data/lib/github_cli/vendor/thor/actions.rb +1 -1
- data/lib/github_cli/vendor/thor/base.rb +20 -18
- data/lib/github_cli/vendor/thor/command.rb +1 -1
- data/lib/github_cli/vendor/thor/error.rb +0 -4
- data/lib/github_cli/vendor/thor/group.rb +4 -9
- data/lib/github_cli/vendor/thor/runner.rb +1 -1
- data/lib/github_cli/vendor/thor/shell/basic.rb +25 -7
- data/lib/github_cli/vendor/thor/version.rb +1 -1
- data/lib/github_cli/vendor/thor.rb +17 -2
- data/lib/github_cli/version.rb +1 -1
- data/spec/github_cli/api/configure_spec.rb +50 -0
- data/spec/github_cli/api/github_api_spec.rb +19 -0
- data/spec/github_cli/commands/assignees_spec.rb +1 -1
- data/spec/github_cli/commands/blobs_spec.rb +1 -1
- data/spec/github_cli/commands/collaborators_spec.rb +1 -1
- data/spec/github_cli/commands/commits_spec.rb +1 -1
- data/spec/github_cli/commands/contents_spec.rb +1 -1
- data/spec/github_cli/commands/downloads_spec.rb +35 -0
- data/spec/github_cli/commands/emails_spec.rb +1 -1
- data/spec/github_cli/commands/events_spec.rb +1 -1
- data/spec/github_cli/commands/followers_spec.rb +1 -1
- data/spec/github_cli/commands/forks_spec.rb +1 -1
- data/spec/github_cli/commands/gists_spec.rb +6 -1
- data/spec/github_cli/commands/issues_spec.rb +1 -1
- data/spec/github_cli/commands/keys_spec.rb +1 -1
- data/spec/github_cli/commands/labels_spec.rb +13 -3
- data/spec/github_cli/commands/members_spec.rb +46 -0
- data/spec/github_cli/commands/merging_spec.rb +1 -1
- data/spec/github_cli/commands/milestones_spec.rb +1 -1
- data/spec/github_cli/commands/notifications_spec.rb +1 -1
- data/spec/github_cli/commands/organizations_spec.rb +30 -0
- data/spec/github_cli/commands/pull_requests_spec.rb +1 -1
- data/spec/github_cli/commands/references_spec.rb +1 -1
- data/spec/github_cli/commands/repositories_spec.rb +5 -0
- data/spec/github_cli/commands/starring_spec.rb +1 -1
- data/spec/github_cli/commands/statuses_spec.rb +1 -1
- data/spec/github_cli/commands/tags_spec.rb +1 -1
- data/spec/github_cli/commands/teams_spec.rb +1 -1
- data/spec/github_cli/commands/trees_spec.rb +1 -1
- data/spec/github_cli/commands/users_spec.rb +1 -1
- data/spec/github_cli/commands/watching_spec.rb +1 -1
- metadata +27 -17
- data/spec/github_cli/api_spec.rb +0 -19
|
@@ -5,27 +5,27 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def all(user, repo, params,
|
|
9
|
-
output
|
|
10
|
-
github_api.repos.collaborators.list user, repo, params
|
|
8
|
+
def all(user, repo, params, options)
|
|
9
|
+
output options do
|
|
10
|
+
github_api(options).repos.collaborators.list user, repo, params
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def add(user, repo, collab, params,
|
|
15
|
-
output
|
|
16
|
-
github_api.repos.collaborators.add user, repo, collab, params
|
|
14
|
+
def add(user, repo, collab, params, options)
|
|
15
|
+
output options do
|
|
16
|
+
github_api(options).repos.collaborators.add user, repo, collab, params
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def collaborator?(user, repo, collab, params,
|
|
21
|
-
output
|
|
22
|
-
github_api.repos.collaborators.collaborator? user, repo, collab, params
|
|
20
|
+
def collaborator?(user, repo, collab, params, options)
|
|
21
|
+
output options do
|
|
22
|
+
github_api(options).repos.collaborators.collaborator? user, repo, collab, params
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def remove(user, repo, collab, params,
|
|
27
|
-
output
|
|
28
|
-
github_api.repos.collaborators.remove user, repo, collab, params
|
|
26
|
+
def remove(user, repo, collab, params, options)
|
|
27
|
+
output options do
|
|
28
|
+
github_api(options).repos.collaborators.remove user, repo, collab, params
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
end
|
|
@@ -5,15 +5,15 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def get(user, repo, sha, params,
|
|
9
|
-
output
|
|
10
|
-
github_api.git_data.commits.get user, repo, sha, params
|
|
8
|
+
def get(user, repo, sha, params, options)
|
|
9
|
+
output options do
|
|
10
|
+
github_api(options).git_data.commits.get user, repo, sha, params
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def create(user, repo, params,
|
|
15
|
-
output
|
|
16
|
-
github_api.git_data.commits.create user, repo, params
|
|
14
|
+
def create(user, repo, params, options)
|
|
15
|
+
output options do
|
|
16
|
+
github_api(options).git_data.commits.create user, repo, params
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
end
|
|
@@ -5,21 +5,21 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def get(user, repo, path, params,
|
|
9
|
-
output
|
|
10
|
-
github_api.repos.contents.get user, repo, path, params
|
|
8
|
+
def get(user, repo, path, params, options)
|
|
9
|
+
output options do
|
|
10
|
+
github_api(options).repos.contents.get user, repo, path, params
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def readme(user, repo, params,
|
|
15
|
-
output
|
|
16
|
-
github_api.repos.contents.readme user, repo, params
|
|
14
|
+
def readme(user, repo, params, options)
|
|
15
|
+
output options do
|
|
16
|
+
github_api(options).repos.contents.readme user, repo, params
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def archive(user, repo, params,
|
|
21
|
-
output
|
|
22
|
-
github_api.repos.contents.archive user, repo, params
|
|
20
|
+
def archive(user, repo, params, options)
|
|
21
|
+
output options do
|
|
22
|
+
github_api(options).repos.contents.archive user, repo, params
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -5,33 +5,33 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def all(user, repo, params,
|
|
9
|
-
output
|
|
10
|
-
github_api.repos.downloads.list user, repo, params
|
|
8
|
+
def all(user, repo, params, options)
|
|
9
|
+
output options do
|
|
10
|
+
github_api(options).repos.downloads.list user, repo, params
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def get(user, repo, id, params,
|
|
15
|
-
output
|
|
16
|
-
github_api.repos.downloads.get user, repo, id, params
|
|
14
|
+
def get(user, repo, id, params, options)
|
|
15
|
+
output options do
|
|
16
|
+
github_api(options).repos.downloads.get user, repo, id, params
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def create(user, repo, params,
|
|
21
|
-
output
|
|
22
|
-
github_api.repos.downloads.create user, repo, params
|
|
20
|
+
def create(user, repo, params, options)
|
|
21
|
+
output options do
|
|
22
|
+
github_api(options).repos.downloads.create user, repo, params
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def upload(resource, filename,
|
|
27
|
-
output
|
|
28
|
-
github_api.repos.downloads.upload resource, filename
|
|
26
|
+
def upload(resource, filename, options)
|
|
27
|
+
output options do
|
|
28
|
+
github_api(options).repos.downloads.upload resource, filename
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
def delete(user, repo, id, params,
|
|
33
|
-
output
|
|
34
|
-
github_api.repos.downloads.delete user, repo, id, params
|
|
32
|
+
def delete(user, repo, id, params, options)
|
|
33
|
+
output options do
|
|
34
|
+
github_api(options).repos.downloads.delete user, repo, id, params
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
end
|
|
@@ -5,21 +5,21 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def all(params,
|
|
9
|
-
output
|
|
10
|
-
github_api.users.emails.list params
|
|
8
|
+
def all(params, options)
|
|
9
|
+
output options do
|
|
10
|
+
github_api(options).users.emails.list params
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def add(emails, params,
|
|
15
|
-
output
|
|
16
|
-
github_api.users.emails.add emails, params
|
|
14
|
+
def add(emails, params, options)
|
|
15
|
+
output options do
|
|
16
|
+
github_api(options).users.emails.add emails, params
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def delete(emails, params,
|
|
21
|
-
output
|
|
22
|
-
github_api.users.emails.delete emails, params
|
|
20
|
+
def delete(emails, params, options)
|
|
21
|
+
output options do
|
|
22
|
+
github_api(options).users.emails.delete emails, params
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
end
|
|
@@ -5,51 +5,51 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def public(params,
|
|
9
|
-
output
|
|
10
|
-
github_api.activity.events.public params
|
|
8
|
+
def public(params, options)
|
|
9
|
+
output options do
|
|
10
|
+
github_api(options).activity.events.public params
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def repository(user, repo, params,
|
|
15
|
-
output
|
|
16
|
-
github_api.activity.events.repository user, repo, params
|
|
14
|
+
def repository(user, repo, params, options)
|
|
15
|
+
output options do
|
|
16
|
+
github_api(options).activity.events.repository user, repo, params
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def issue(user, repo, params,
|
|
21
|
-
output
|
|
22
|
-
github_api.activity.events.issue user, repo, params
|
|
20
|
+
def issue(user, repo, params, options)
|
|
21
|
+
output options do
|
|
22
|
+
github_api(options).activity.events.issue user, repo, params
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def network(user, repo, params,
|
|
27
|
-
output
|
|
28
|
-
github_api.activity.events.network user, repo, params
|
|
26
|
+
def network(user, repo, params, options)
|
|
27
|
+
output options do
|
|
28
|
+
github_api(options).activity.events.network user, repo, params
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
def organization(org, params,
|
|
33
|
-
output
|
|
34
|
-
github_api.activity.events.organization org, params
|
|
32
|
+
def organization(org, params, options)
|
|
33
|
+
output options do
|
|
34
|
+
github_api(options).activity.events.organization org, params
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
38
|
-
def received(user, params,
|
|
39
|
-
output
|
|
40
|
-
github_api.activity.events.received user, params
|
|
38
|
+
def received(user, params, options)
|
|
39
|
+
output options do
|
|
40
|
+
github_api(options).activity.events.received user, params
|
|
41
41
|
end
|
|
42
42
|
end
|
|
43
43
|
|
|
44
|
-
def performed(user, params,
|
|
45
|
-
output
|
|
46
|
-
github_api.activity.events.performed user, params
|
|
44
|
+
def performed(user, params, options)
|
|
45
|
+
output options do
|
|
46
|
+
github_api(options).activity.events.performed user, params
|
|
47
47
|
end
|
|
48
48
|
end
|
|
49
49
|
|
|
50
|
-
def user_org(user, org, params,
|
|
51
|
-
output
|
|
52
|
-
github_api.activity.events.user_org user, org, params
|
|
50
|
+
def user_org(user, org, params, options)
|
|
51
|
+
output options do
|
|
52
|
+
github_api(options).activity.events.user_org user, org, params
|
|
53
53
|
end
|
|
54
54
|
end
|
|
55
55
|
end
|
|
@@ -5,33 +5,34 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def all(user, params,
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
def all(user, params, options)
|
|
9
|
+
args = user ? [user, params] : [params]
|
|
10
|
+
output options do
|
|
11
|
+
github_api(options).users.followers.list *args
|
|
11
12
|
end
|
|
12
13
|
end
|
|
13
14
|
|
|
14
|
-
def following(user, params,
|
|
15
|
-
output
|
|
16
|
-
github_api.users.followers.following user, params
|
|
15
|
+
def following(user, params, options)
|
|
16
|
+
output options do
|
|
17
|
+
github_api(options).users.followers.following user, params
|
|
17
18
|
end
|
|
18
19
|
end
|
|
19
20
|
|
|
20
|
-
def follower(user, params,
|
|
21
|
-
output
|
|
22
|
-
github_api.users.followers.following? user, params
|
|
21
|
+
def follower(user, params, options)
|
|
22
|
+
output options do
|
|
23
|
+
github_api(options).users.followers.following? user, params
|
|
23
24
|
end
|
|
24
25
|
end
|
|
25
26
|
|
|
26
|
-
def follow(user, params,
|
|
27
|
-
output
|
|
28
|
-
github_api.users.followers.follow user, params
|
|
27
|
+
def follow(user, params, options)
|
|
28
|
+
output options do
|
|
29
|
+
github_api(options).users.followers.follow user, params
|
|
29
30
|
end
|
|
30
31
|
end
|
|
31
32
|
|
|
32
|
-
def unfollow(user, params,
|
|
33
|
-
output
|
|
34
|
-
github_api.users.followers.unfollow user, params
|
|
33
|
+
def unfollow(user, params, options)
|
|
34
|
+
output options do
|
|
35
|
+
github_api(options).users.followers.unfollow user, params
|
|
35
36
|
end
|
|
36
37
|
end
|
|
37
38
|
end
|
data/lib/github_cli/apis/fork.rb
CHANGED
|
@@ -5,15 +5,15 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def all(user, repo, params,
|
|
9
|
-
output
|
|
10
|
-
github_api.repos.forks.list user, repo, params
|
|
8
|
+
def all(user, repo, params, options)
|
|
9
|
+
output options do
|
|
10
|
+
github_api(options).repos.forks.list user, repo, params
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def create(user, repo, params,
|
|
15
|
-
output
|
|
16
|
-
github_api.repos.forks.create user, repo, params
|
|
14
|
+
def create(user, repo, params, options)
|
|
15
|
+
output options do
|
|
16
|
+
github_api(options).repos.forks.create user, repo, params
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
end
|
data/lib/github_cli/apis/gist.rb
CHANGED
|
@@ -5,63 +5,64 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def all(params,
|
|
9
|
-
|
|
10
|
-
|
|
8
|
+
def all(params, options)
|
|
9
|
+
args = options[:public] ? ['public', params] : [params]
|
|
10
|
+
output options do
|
|
11
|
+
github_api(options).gists.list *args
|
|
11
12
|
end
|
|
12
13
|
end
|
|
13
14
|
|
|
14
|
-
def starred(params,
|
|
15
|
-
output
|
|
16
|
-
github_api.gists.starred params
|
|
15
|
+
def starred(params, options)
|
|
16
|
+
output options do
|
|
17
|
+
github_api(options).gists.starred params
|
|
17
18
|
end
|
|
18
19
|
end
|
|
19
20
|
|
|
20
|
-
def get(id, params,
|
|
21
|
-
output
|
|
22
|
-
github_api.gists.get id, params
|
|
21
|
+
def get(id, params, options)
|
|
22
|
+
output options do
|
|
23
|
+
github_api(options).gists.get id, params
|
|
23
24
|
end
|
|
24
25
|
end
|
|
25
26
|
|
|
26
|
-
def create(params,
|
|
27
|
-
output
|
|
28
|
-
github_api.gists.create params
|
|
27
|
+
def create(params, options)
|
|
28
|
+
output options do
|
|
29
|
+
github_api(options).gists.create params
|
|
29
30
|
end
|
|
30
31
|
end
|
|
31
32
|
|
|
32
|
-
def edit(id, params,
|
|
33
|
-
output
|
|
34
|
-
github_api.gists.edit id, params
|
|
33
|
+
def edit(id, params, options)
|
|
34
|
+
output options do
|
|
35
|
+
github_api(options).gists.edit id, params
|
|
35
36
|
end
|
|
36
37
|
end
|
|
37
38
|
|
|
38
|
-
def star(id, params,
|
|
39
|
-
output
|
|
40
|
-
github_api.gists.star id, params
|
|
39
|
+
def star(id, params, options)
|
|
40
|
+
output options do
|
|
41
|
+
github_api(options).gists.star id, params
|
|
41
42
|
end
|
|
42
43
|
end
|
|
43
44
|
|
|
44
|
-
def unstar(id, params,
|
|
45
|
-
output
|
|
46
|
-
github_api.gists.unstar id, params
|
|
45
|
+
def unstar(id, params, options)
|
|
46
|
+
output options do
|
|
47
|
+
github_api(options).gists.unstar id, params
|
|
47
48
|
end
|
|
48
49
|
end
|
|
49
50
|
|
|
50
|
-
def starred?(id, params,
|
|
51
|
-
output
|
|
52
|
-
github_api.gists.starred? id, params
|
|
51
|
+
def starred?(id, params, options)
|
|
52
|
+
output options do
|
|
53
|
+
github_api(options).gists.starred? id, params
|
|
53
54
|
end
|
|
54
55
|
end
|
|
55
56
|
|
|
56
|
-
def fork(id, params,
|
|
57
|
-
output
|
|
58
|
-
github_api.gists.fork id, params
|
|
57
|
+
def fork(id, params, options)
|
|
58
|
+
output options do
|
|
59
|
+
github_api(options).gists.fork id, params
|
|
59
60
|
end
|
|
60
61
|
end
|
|
61
62
|
|
|
62
|
-
def delete(id, params,
|
|
63
|
-
output
|
|
64
|
-
github_api.gists.delete id, params
|
|
63
|
+
def delete(id, params, options)
|
|
64
|
+
output options do
|
|
65
|
+
github_api(options).gists.delete id, params
|
|
65
66
|
end
|
|
66
67
|
end
|
|
67
68
|
end
|
data/lib/github_cli/apis/hook.rb
CHANGED
|
@@ -6,37 +6,37 @@ module GithubCLI
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
8
|
def all(user, repo, params, options)
|
|
9
|
-
output options
|
|
9
|
+
output options do
|
|
10
10
|
github_api(options).repos.hooks.list user, repo, params
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
14
|
def get(user, repo, id, params, options)
|
|
15
|
-
output options
|
|
15
|
+
output options do
|
|
16
16
|
github_api(options).repos.hooks.get user, repo, id, params
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
20
|
def create(user, repo, params, options)
|
|
21
|
-
output options
|
|
21
|
+
output options do
|
|
22
22
|
github_api(options).repos.hooks.create user, repo, params
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
26
|
def edit(user, repo, id, params, options)
|
|
27
|
-
output options
|
|
27
|
+
output options do
|
|
28
28
|
github_api(options).repos.hooks.edit user, repo, id, params
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
32
|
def test(user, repo, id, params, options)
|
|
33
|
-
output options
|
|
33
|
+
output options do
|
|
34
34
|
github_api(options).repos.hooks.test user, repo, id, params
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def delete(user, repo, id, params, options)
|
|
39
|
-
output options
|
|
39
|
+
output options do
|
|
40
40
|
github_api(options).repos.hooks.delete user, repo, id, params
|
|
41
41
|
end
|
|
42
42
|
end
|
|
@@ -5,27 +5,27 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def all(arg, params,
|
|
9
|
-
output
|
|
10
|
-
github_api.issues.list arg, params
|
|
8
|
+
def all(arg, params, options)
|
|
9
|
+
output options do
|
|
10
|
+
github_api(options).issues.list arg, params
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def get(user, repo, id, params,
|
|
15
|
-
output
|
|
16
|
-
github_api.issues.get user, repo, id, params
|
|
14
|
+
def get(user, repo, id, params, options)
|
|
15
|
+
output options do
|
|
16
|
+
github_api(options).issues.get user, repo, id, params
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def create(user, repo, params,
|
|
21
|
-
output
|
|
22
|
-
github_api.issues.create user, repo, params
|
|
20
|
+
def create(user, repo, params, options)
|
|
21
|
+
output options do
|
|
22
|
+
github_api(options).issues.create user, repo, params
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def edit(user, repo, id, params,
|
|
27
|
-
output
|
|
28
|
-
github_api.issues.edit user, repo, id, params
|
|
26
|
+
def edit(user, repo, id, params, options)
|
|
27
|
+
output options do
|
|
28
|
+
github_api(options).issues.edit user, repo, id, params
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
end
|
data/lib/github_cli/apis/key.rb
CHANGED
|
@@ -5,33 +5,33 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def all(user, repo, params,
|
|
9
|
-
output
|
|
10
|
-
github_api.repos.keys.list user, repo, params
|
|
8
|
+
def all(user, repo, params, options)
|
|
9
|
+
output options do
|
|
10
|
+
github_api(options).repos.keys.list user, repo, params
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def get(user, repo, id, params,
|
|
15
|
-
output
|
|
16
|
-
github_api.repos.keys.get user, repo, id, params
|
|
14
|
+
def get(user, repo, id, params, options)
|
|
15
|
+
output options do
|
|
16
|
+
github_api(options).repos.keys.get user, repo, id, params
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def create(user, repo, params,
|
|
21
|
-
output
|
|
22
|
-
github_api.repos.keys.create user, repo, params
|
|
20
|
+
def create(user, repo, params, options)
|
|
21
|
+
output options do
|
|
22
|
+
github_api(options).repos.keys.create user, repo, params
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def edit(user, repo, id, params,
|
|
27
|
-
output
|
|
28
|
-
github_api.repos.keys.edit user, repo, id, params
|
|
26
|
+
def edit(user, repo, id, params, options)
|
|
27
|
+
output options do
|
|
28
|
+
github_api(options).repos.keys.edit user, repo, id, params
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
def delete(user, repo, id, params,
|
|
33
|
-
output
|
|
34
|
-
github_api.repos.keys.delete user, repo, id, params
|
|
32
|
+
def delete(user, repo, id, params, options)
|
|
33
|
+
output options do
|
|
34
|
+
github_api(options).repos.keys.delete user, repo, id, params
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
end
|
|
@@ -5,55 +5,53 @@ module GithubCLI
|
|
|
5
5
|
|
|
6
6
|
class << self
|
|
7
7
|
|
|
8
|
-
def all(user, repo, params,
|
|
9
|
-
output
|
|
10
|
-
github_api.issues.labels.list user, repo, params
|
|
8
|
+
def all(user, repo, params, options)
|
|
9
|
+
output options do
|
|
10
|
+
github_api(options).issues.labels.list user, repo, params
|
|
11
11
|
end
|
|
12
12
|
end
|
|
13
13
|
|
|
14
|
-
def get(user, repo, name, params,
|
|
15
|
-
output
|
|
16
|
-
github_api.issues.labels.get user, repo, name, params
|
|
14
|
+
def get(user, repo, name, params, options)
|
|
15
|
+
output options do
|
|
16
|
+
github_api(options).issues.labels.get user, repo, name, params
|
|
17
17
|
end
|
|
18
18
|
end
|
|
19
19
|
|
|
20
|
-
def create(user, repo, params,
|
|
21
|
-
output
|
|
22
|
-
github_api.issues.labels.create user, repo, params
|
|
20
|
+
def create(user, repo, params, options)
|
|
21
|
+
output options do
|
|
22
|
+
github_api(options).issues.labels.create user, repo, params
|
|
23
23
|
end
|
|
24
24
|
end
|
|
25
25
|
|
|
26
|
-
def update(user, repo, name, params,
|
|
27
|
-
output
|
|
28
|
-
github_api.issues.labels.update user, repo, name, params
|
|
26
|
+
def update(user, repo, name, params, options)
|
|
27
|
+
output options do
|
|
28
|
+
github_api(options).issues.labels.update user, repo, name, params
|
|
29
29
|
end
|
|
30
30
|
end
|
|
31
31
|
|
|
32
|
-
def delete(user, repo, name, params,
|
|
33
|
-
output
|
|
34
|
-
github_api.issues.labels.delete user, repo, name, params
|
|
32
|
+
def delete(user, repo, name, params, options)
|
|
33
|
+
output options do
|
|
34
|
+
github_api(options).issues.labels.delete user, repo, name, params
|
|
35
35
|
end
|
|
36
36
|
end
|
|
37
37
|
|
|
38
38
|
def add(user, repo, issue_id, *args)
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
github_api.issues.labels.add user, repo, issue_id, args.flatten, params
|
|
39
|
+
options, params = args.pop, args.pop
|
|
40
|
+
output options do
|
|
41
|
+
github_api(options).issues.labels.add user, repo, issue_id, args.flatten, params
|
|
43
42
|
end
|
|
44
43
|
end
|
|
45
44
|
|
|
46
|
-
def remove(user, repo, issue_id,
|
|
47
|
-
output
|
|
48
|
-
github_api.issues.labels.remove user, repo, issue_id,
|
|
45
|
+
def remove(user, repo, issue_id, params, options)
|
|
46
|
+
output options do
|
|
47
|
+
github_api(options).issues.labels.remove user, repo, issue_id, params
|
|
49
48
|
end
|
|
50
49
|
end
|
|
51
50
|
|
|
52
51
|
def replace(user, repo, issue_id, *args)
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
github_api.issues.labels.replace user, repo, issue_id, args.flatten, params
|
|
52
|
+
options, params = args.pop, args.pop
|
|
53
|
+
output options do
|
|
54
|
+
github_api(options).issues.labels.replace user, repo, issue_id, args.flatten, params
|
|
57
55
|
end
|
|
58
56
|
end
|
|
59
57
|
end
|