github_cli 0.5.2 → 0.5.3
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 +0 -1
- data/CHANGELOG.md +9 -0
- data/Gemfile.lock +1 -1
- data/README.md +5 -10
- data/features/assignee.feature +38 -0
- data/features/collaborator.feature +22 -7
- data/features/follower.feature +32 -13
- data/features/merging.feature +43 -0
- data/features/starring.feature +3 -0
- data/features/statuses.feature +36 -0
- data/features/watching.feature +6 -2
- data/lib/github_cli/apis/assignee.rb +22 -0
- data/lib/github_cli/apis/merging.rb +17 -0
- data/lib/github_cli/apis/status.rb +22 -0
- data/lib/github_cli/apis.rb +3 -0
- data/lib/github_cli/commands/assignees.rb +22 -0
- data/lib/github_cli/commands/merging.rb +21 -0
- data/lib/github_cli/commands/starring.rb +1 -1
- data/lib/github_cli/commands/statuses.rb +26 -0
- data/lib/github_cli/commands/watching.rb +1 -1
- data/lib/github_cli/commands.rb +3 -0
- data/lib/github_cli/subcommands.rb +9 -0
- data/lib/github_cli/version.rb +1 -1
- data/screenshots/command.png +0 -0
- data/screenshots/interface.png +0 -0
- metadata +85 -107
- data/ghc_logo.png +0 -0
data/.travis.yml
CHANGED
data/CHANGELOG.md
CHANGED
@@ -1,3 +1,12 @@
|
|
1
|
+
0.5.3 (September 29, 2012)
|
2
|
+
|
3
|
+
* Fix bug with starring api starred command.[Issue #6]
|
4
|
+
* Fix bug with watching api watched command.
|
5
|
+
* Add assignees api commands.
|
6
|
+
* Add statuses api commands.
|
7
|
+
* Add merges api command.
|
8
|
+
* Rewrote tests for follower & collaborators apis to fix travis CI.
|
9
|
+
|
1
10
|
0.5.2 (September 22, 2012)
|
2
11
|
|
3
12
|
* Fix bug with Ruby 1.8 and passing arguments in add and replace label api
|
data/Gemfile.lock
CHANGED
data/README.md
CHANGED
@@ -1,11 +1,13 @@
|
|
1
|
-
# GithubCLI
|
1
|
+
# GithubCLI
|
2
2
|
[][travis] [][gemnasium] [][codeclimate]
|
3
3
|
|
4
4
|
[travis]: http://travis-ci.org/peter-murach/github_cli
|
5
5
|
[gemnasium]: https://gemnasium.com/peter-murach/github_cli
|
6
6
|
[codeclimate]: https://codeclimate.com/github/peter-murach/github_cli
|
7
7
|
|
8
|
-
CLI-based access to GitHub API v3 that works hand-in-hand with
|
8
|
+
CLI-based access to GitHub API v3 that works hand-in-hand with `github_api` gem.
|
9
|
+
|
10
|
+

|
9
11
|
|
10
12
|
## Installation
|
11
13
|
|
@@ -103,15 +105,8 @@ The API responses can be formatted as `csv`, `json`, `pretty`, `table`.
|
|
103
105
|
|
104
106
|
By default responses are in tabular format. Tables are available in `horizontal` and `vertical` mode. To enforce table display pass `:h` and `:v` respectively. Otherwise a default orientation will be picked depending on the request made and terminal size.
|
105
107
|
|
106
|
-
```shell
|
107
|
-
gcli user get -u peter-murach --format=table:h
|
108
108
|
|
109
|
-
|
110
|
-
┃ type ┃ login ┃ public_… ┃ blog ┃ hireable ┃ followe… ┃ followi… ┃ location ┃ html_url ┃
|
111
|
-
┣━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋━━━━━━━━━━╋
|
112
|
-
┃ User ┃ peter-m… ┃ 14 ┃ peter-m… ┃ false ┃ 18 ┃ 52 ┃ Sheffie… ┃ https:/… ┃
|
113
|
-
┗━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻━━━━━━━━━━┻
|
114
|
-
```
|
109
|
+

|
115
110
|
|
116
111
|
To get `csv` formatting for easy command piping do
|
117
112
|
|
@@ -0,0 +1,38 @@
|
|
1
|
+
Feature: gcli assignee
|
2
|
+
|
3
|
+
Scenario: Available commands
|
4
|
+
|
5
|
+
When I run `gcli assignee`
|
6
|
+
Then the exit status should be 0
|
7
|
+
And the output should contain "gcli assignee list"
|
8
|
+
And the output should contain "gcli assignee check"
|
9
|
+
|
10
|
+
Scenario: List assignees
|
11
|
+
Given the GitHub API server:
|
12
|
+
"""
|
13
|
+
get('/repos/wycats/thor/assignees') {
|
14
|
+
body :login => 'octokit', :id => 1,
|
15
|
+
:url => 'https://api.github.com/users/peter-murach'
|
16
|
+
status 200
|
17
|
+
}
|
18
|
+
"""
|
19
|
+
When I successfully run `gcli assignee ls wycats thor`
|
20
|
+
Then the stdout should contain "octokit"
|
21
|
+
|
22
|
+
Scenario: Check assignee
|
23
|
+
Given the GitHub API server:
|
24
|
+
"""
|
25
|
+
get('/repos/wycats/thor/assignees/octokit') { status 204 }
|
26
|
+
"""
|
27
|
+
When I run `gcli assignee check wycats thor octokit`
|
28
|
+
Then the exit status should be 0
|
29
|
+
And the stdout should contain "true"
|
30
|
+
|
31
|
+
Scenario: Check assignee
|
32
|
+
Given the GitHub API server:
|
33
|
+
"""
|
34
|
+
get('/repos/wycats/thor/assignees/octokit') { status 404 }
|
35
|
+
"""
|
36
|
+
When I run `gcli assignee check wycats thor octokit`
|
37
|
+
Then the exit status should be 0
|
38
|
+
And the stdout should contain "false"
|
@@ -12,32 +12,47 @@ Feature: gcli collab
|
|
12
12
|
Scenario: List collaborators
|
13
13
|
Given the GitHub API server:
|
14
14
|
"""
|
15
|
-
get('/repos/wycats/thor/collaborators') {
|
16
|
-
|
17
|
-
|
18
|
-
|
15
|
+
get('/repos/wycats/thor/collaborators') {
|
16
|
+
body [ { :login => "octokit", :id => 1,
|
17
|
+
:url => 'https://api.github.com/users/peter-murach'}]
|
18
|
+
status 200
|
19
|
+
}
|
20
|
+
"""
|
21
|
+
When I successfully run `gcli collab ls wycats thor`
|
22
|
+
Then the stdout should contain "octokit"
|
19
23
|
|
20
24
|
Scenario: Add collaborator
|
21
25
|
Given the GitHub API server:
|
22
26
|
"""
|
23
|
-
put('/repos/wycats/thor/collaborators/octocat') { status
|
27
|
+
put('/repos/wycats/thor/collaborators/octocat') { status 204 }
|
24
28
|
"""
|
25
29
|
When I run `gcli collab add wycats thor octocat`
|
26
30
|
Then the exit status should be 0
|
31
|
+
And the stdout should contain "204"
|
27
32
|
|
28
33
|
Scenario: Remove collaborator
|
29
34
|
Given the GitHub API server:
|
30
35
|
"""
|
31
|
-
delete('/repos/wycats/thor/collaborators/octocat') { status
|
36
|
+
delete('/repos/wycats/thor/collaborators/octocat') { status 204 }
|
32
37
|
"""
|
33
38
|
When I run `gcli collab remove wycats thor octocat`
|
34
39
|
Then the exit status should be 0
|
40
|
+
And the stdout should contain "204"
|
35
41
|
|
36
42
|
Scenario: Check if collaborator
|
37
43
|
Given the GitHub API server:
|
38
44
|
"""
|
39
|
-
|
45
|
+
get('/repos/wycats/thor/collaborators/octocat') { status 204 }
|
40
46
|
"""
|
41
47
|
When I run `gcli collab collab wycats thor octocat`
|
42
48
|
Then the exit status should be 0
|
49
|
+
And the stdout should contain "true"
|
43
50
|
|
51
|
+
Scenario: Check if collaborator
|
52
|
+
Given the GitHub API server:
|
53
|
+
"""
|
54
|
+
get('/repos/wycats/thor/collaborators/octocat') { status 404 }
|
55
|
+
"""
|
56
|
+
When I run `gcli collab collab wycats thor octocat`
|
57
|
+
Then the exit status should be 0
|
58
|
+
And the stdout should contain "false"
|
data/features/follower.feature
CHANGED
@@ -13,10 +13,14 @@ Feature: gcli follower
|
|
13
13
|
Scenario: List for user
|
14
14
|
Given the GitHub API server:
|
15
15
|
"""
|
16
|
-
get('/users/wycats/followers') {
|
16
|
+
get('/users/wycats/followers') {
|
17
|
+
body [ { :login => "octokit", :id => 1,
|
18
|
+
:url => 'https://api.github.com/users/peter-murach'}]
|
19
|
+
status 200
|
20
|
+
}
|
17
21
|
"""
|
18
|
-
When I run `gcli follower ls -u wycats`
|
19
|
-
Then the
|
22
|
+
When I successfully run `gcli follower ls -u wycats`
|
23
|
+
Then the stdout should contain "octokit"
|
20
24
|
|
21
25
|
Scenario: List for the authenticated user
|
22
26
|
Given the GitHub API server:
|
@@ -25,35 +29,50 @@ Feature: gcli follower
|
|
25
29
|
"""
|
26
30
|
When I run `gcli follower ls`
|
27
31
|
Then the exit status should be 0
|
32
|
+
And the stdout should contain "200"
|
28
33
|
|
29
34
|
Scenario: Follower
|
30
35
|
Given the GitHub API server:
|
31
36
|
"""
|
32
|
-
get('/users/following
|
37
|
+
get('/users/wycats/following') {
|
38
|
+
body [ { :login => "octokit", :id => 1,
|
39
|
+
:url => 'https://api.github.com/users/peter-murach'}]
|
40
|
+
status 200
|
41
|
+
}
|
42
|
+
"""
|
43
|
+
When I successfully run `gcli follower following -u wycats`
|
44
|
+
Then the stdout should contain "octokit"
|
45
|
+
|
46
|
+
Scenario: Following
|
47
|
+
Given the GitHub API server:
|
48
|
+
"""
|
49
|
+
get('/user/following/wycats') { status 204 }
|
33
50
|
"""
|
34
51
|
When I run `gcli follower follower wycats`
|
35
52
|
Then the exit status should be 0
|
53
|
+
And the stdout should contain "true"
|
36
54
|
|
37
|
-
Scenario: Following
|
55
|
+
Scenario: Not Following
|
38
56
|
Given the GitHub API server:
|
39
57
|
"""
|
40
|
-
get('/
|
58
|
+
get('/user/following/wycats') { status 404 }
|
41
59
|
"""
|
42
|
-
When I run `gcli follower
|
60
|
+
When I run `gcli follower follower wycats`
|
43
61
|
Then the exit status should be 0
|
62
|
+
And the stdout should contain "false"
|
44
63
|
|
45
64
|
Scenario: Follow
|
46
65
|
Given the GitHub API server:
|
47
66
|
"""
|
48
|
-
put('/user/following/wycats') { status
|
67
|
+
put('/user/following/wycats') { status 204 }
|
49
68
|
"""
|
50
|
-
When I run `gcli follower follow wycats`
|
51
|
-
Then the
|
69
|
+
When I successfully run `gcli follower follow wycats`
|
70
|
+
Then the stdout should contain "204"
|
52
71
|
|
53
72
|
Scenario: Unfollow
|
54
73
|
Given the GitHub API server:
|
55
74
|
"""
|
56
|
-
delete('/user/following/wycats') { status
|
75
|
+
delete('/user/following/wycats') { status 204 }
|
57
76
|
"""
|
58
|
-
When I run `gcli follower unfollow wycats`
|
59
|
-
Then the
|
77
|
+
When I successfully run `gcli follower unfollow wycats`
|
78
|
+
Then the stdout should contain "204"
|
@@ -0,0 +1,43 @@
|
|
1
|
+
Feature: gcli merge
|
2
|
+
|
3
|
+
Scenario: Available commands
|
4
|
+
|
5
|
+
When I run `gcli merge`
|
6
|
+
Then the exit status should be 0
|
7
|
+
And the output should contain "gcli merge perform"
|
8
|
+
|
9
|
+
Scenario: Merge success
|
10
|
+
Given the GitHub API server:
|
11
|
+
"""
|
12
|
+
post('/repos/wycats/thor/merges') {
|
13
|
+
body 'author' => { :login => 'octokit', :id => 1,
|
14
|
+
:url => 'https://api.github.com/users/peter-murach' }
|
15
|
+
status 201
|
16
|
+
}
|
17
|
+
"""
|
18
|
+
When I successfully run `gcli merge perform wycats thor --params=base:master head:cool_feature`
|
19
|
+
Then the stdout should contain "octokit"
|
20
|
+
And the stdout should contain "201"
|
21
|
+
|
22
|
+
Scenario: Nothing to merge
|
23
|
+
Given the GitHub API server:
|
24
|
+
"""
|
25
|
+
post('/repos/wycats/thor/merges') {
|
26
|
+
status 204
|
27
|
+
}
|
28
|
+
"""
|
29
|
+
When I successfully run `gcli merge perform wycats thor --params=base:master head:cool_feature`
|
30
|
+
Then the stdout should contain "204"
|
31
|
+
|
32
|
+
Scenario: Merge conflict
|
33
|
+
Given the GitHub API server:
|
34
|
+
"""
|
35
|
+
post('/repos/wycats/thor/merges') {
|
36
|
+
body :message => "Merge conflict"
|
37
|
+
status 409
|
38
|
+
}
|
39
|
+
"""
|
40
|
+
When I run `gcli merge perform wycats thor --params=base:master head:cool_feature`
|
41
|
+
Then the exit status should be 1
|
42
|
+
Then the stdout should contain "Merge conflict"
|
43
|
+
And the stdout should contain "409"
|
data/features/starring.feature
CHANGED
@@ -37,6 +37,7 @@ Feature: gcli star
|
|
37
37
|
"""
|
38
38
|
When I run `gcli star unstar wycats thor`
|
39
39
|
Then the exit status should be 0
|
40
|
+
And the stdout should contain "204"
|
40
41
|
|
41
42
|
Scenario: Starring
|
42
43
|
Given the GitHub API server:
|
@@ -63,6 +64,7 @@ Feature: gcli star
|
|
63
64
|
"""
|
64
65
|
When I run `gcli star starred -u wycats`
|
65
66
|
Then the exit status should be 0
|
67
|
+
And the stdout should contain "200"
|
66
68
|
|
67
69
|
Scenario: Starred by the authenticated user
|
68
70
|
Given the GitHub API server:
|
@@ -71,4 +73,5 @@ Feature: gcli star
|
|
71
73
|
"""
|
72
74
|
When I run `gcli star starred`
|
73
75
|
Then the exit status should be 0
|
76
|
+
And the stdout should contain "200"
|
74
77
|
|
@@ -0,0 +1,36 @@
|
|
1
|
+
Feature: gcli status
|
2
|
+
|
3
|
+
Scenario: Available commands
|
4
|
+
|
5
|
+
When I run `gcli status`
|
6
|
+
Then the exit status should be 0
|
7
|
+
And the output should contain "gcli status list"
|
8
|
+
And the output should contain "gcli status create"
|
9
|
+
|
10
|
+
Scenario: List statuses
|
11
|
+
Given the GitHub API server:
|
12
|
+
"""
|
13
|
+
get('/repos/wycats/thor/statuses/abc123') {
|
14
|
+
body :creator => { :login => 'octokit', :id => 1 },
|
15
|
+
:url => 'https://api.github.com/users/peter-murach',
|
16
|
+
:state => 'success'
|
17
|
+
status 200
|
18
|
+
}
|
19
|
+
"""
|
20
|
+
When I successfully run `gcli status ls wycats thor abc123`
|
21
|
+
Then the stdout should contain "octokit"
|
22
|
+
|
23
|
+
Scenario: Create status
|
24
|
+
Given the GitHub API server:
|
25
|
+
"""
|
26
|
+
post('/repos/wycats/thor/statuses/abc123') {
|
27
|
+
body :creator => { :login => 'octokit', :id => 1 },
|
28
|
+
:url => 'https://api.github.com/users/peter-murach',
|
29
|
+
:state => 'success'
|
30
|
+
status 200
|
31
|
+
}
|
32
|
+
"""
|
33
|
+
When I run `gcli status create wycats thor abc123 --params=state:pending`
|
34
|
+
Then the exit status should be 0
|
35
|
+
And the stdout should contain "success"
|
36
|
+
|
data/features/watching.feature
CHANGED
@@ -29,6 +29,7 @@ Feature: gcli watching
|
|
29
29
|
"""
|
30
30
|
When I run `gcli watch start wycats thor`
|
31
31
|
Then the exit status should be 0
|
32
|
+
And the stdout should contain "204"
|
32
33
|
|
33
34
|
Scenario: Stop watching
|
34
35
|
Given the GitHub API server:
|
@@ -37,6 +38,7 @@ Feature: gcli watching
|
|
37
38
|
"""
|
38
39
|
When I run `gcli watch stop wycats thor`
|
39
40
|
Then the exit status should be 0
|
41
|
+
And the stdout should contain "204"
|
40
42
|
|
41
43
|
Scenario: Watching
|
42
44
|
Given the GitHub API server:
|
@@ -59,16 +61,18 @@ Feature: gcli watching
|
|
59
61
|
Scenario: Watched by a user
|
60
62
|
Given the GitHub API server:
|
61
63
|
"""
|
62
|
-
get('/users/wycats/
|
64
|
+
get('/users/wycats/subscriptions') { status 200 }
|
63
65
|
"""
|
64
66
|
When I run `gcli watch watched -u wycats`
|
65
67
|
Then the exit status should be 0
|
68
|
+
And the stdout should contain "200"
|
66
69
|
|
67
70
|
Scenario: Watched by the authenticated user
|
68
71
|
Given the GitHub API server:
|
69
72
|
"""
|
70
|
-
get('/user/
|
73
|
+
get('/user/subscriptions') { status 200 }
|
71
74
|
"""
|
72
75
|
When I run `gcli watch watched`
|
73
76
|
Then the exit status should be 0
|
77
|
+
And the stdout should contain "200"
|
74
78
|
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module GithubCLI
|
4
|
+
class Assignee < API
|
5
|
+
|
6
|
+
class << self
|
7
|
+
|
8
|
+
def all(user, repo, params, format)
|
9
|
+
output format do
|
10
|
+
github_api.issues.assignees.list user, repo, params
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def check(user, repo, assignee, params, format)
|
15
|
+
output format do
|
16
|
+
github_api.issues.assignees.check user, repo, assignee, params
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end # Assignee
|
22
|
+
end # GithubCLI
|
@@ -0,0 +1,17 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module GithubCLI
|
4
|
+
class Merging < API
|
5
|
+
|
6
|
+
class << self
|
7
|
+
|
8
|
+
def merge(user, repo, params, format)
|
9
|
+
output format do
|
10
|
+
github_api.repos.merging.merge user, repo, params
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
end
|
15
|
+
|
16
|
+
end # Merging
|
17
|
+
end # GithubCLI
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module GithubCLI
|
4
|
+
class Status < API
|
5
|
+
|
6
|
+
class << self
|
7
|
+
|
8
|
+
def list(user, repo, sha, params, format)
|
9
|
+
output format do
|
10
|
+
github_api.repos.statuses.list user, repo, sha, params
|
11
|
+
end
|
12
|
+
end
|
13
|
+
|
14
|
+
def create(user, repo, sha, params, format)
|
15
|
+
output format do
|
16
|
+
github_api.repos.statuses.create user, repo, sha, params
|
17
|
+
end
|
18
|
+
end
|
19
|
+
end
|
20
|
+
|
21
|
+
end # Status
|
22
|
+
end # GithubCLI
|
data/lib/github_cli/apis.rb
CHANGED
@@ -9,6 +9,7 @@ else
|
|
9
9
|
end
|
10
10
|
|
11
11
|
%w[
|
12
|
+
assignee
|
12
13
|
authorization
|
13
14
|
blob
|
14
15
|
collaborator
|
@@ -25,6 +26,7 @@ end
|
|
25
26
|
key
|
26
27
|
label
|
27
28
|
member
|
29
|
+
merging
|
28
30
|
milestone
|
29
31
|
organization
|
30
32
|
pull_request
|
@@ -32,6 +34,7 @@ end
|
|
32
34
|
repository
|
33
35
|
search
|
34
36
|
starring
|
37
|
+
status
|
35
38
|
tag
|
36
39
|
team
|
37
40
|
tree
|
@@ -0,0 +1,22 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module GithubCLI
|
4
|
+
class Commands::Assignees < Command
|
5
|
+
|
6
|
+
namespace :assignee
|
7
|
+
|
8
|
+
desc 'list <user> <repo>', 'Lists all the available assignees'
|
9
|
+
long_desc <<-DESC
|
10
|
+
Lists all the available assignees (owner + collaborators) to which issues may be assigned
|
11
|
+
DESC
|
12
|
+
def list(user, repo)
|
13
|
+
Assignee.all user, repo, options[:params], options[:format]
|
14
|
+
end
|
15
|
+
|
16
|
+
desc 'check <user> <repo> <assignee>', 'Check if <assignee> is assigned to <repo>'
|
17
|
+
def check(user, repo, assignee)
|
18
|
+
Assignee.check user, repo, assignee, options[:params], options[:format]
|
19
|
+
end
|
20
|
+
|
21
|
+
end # Assignees
|
22
|
+
end # GithubCLI
|
@@ -0,0 +1,21 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module GithubCLI
|
4
|
+
class Commands::Merging < Command
|
5
|
+
|
6
|
+
namespace :merge
|
7
|
+
|
8
|
+
desc 'perform <user> <repo>', 'Perform merge'
|
9
|
+
long_desc <<-DESC
|
10
|
+
Inputs
|
11
|
+
|
12
|
+
base - Required String - The name of the base branch that the head will be merged into.\n
|
13
|
+
head - Required String - The head to merge. This can be a branch name or a commit SHA1. \n
|
14
|
+
commit_message - Optional String - Commit message to use for the merge commit. If omitted, a default message will be used.\n
|
15
|
+
DESC
|
16
|
+
def perform(user, repo)
|
17
|
+
Merging.merge user, repo, options[:params], options[:format]
|
18
|
+
end
|
19
|
+
|
20
|
+
end # Merging
|
21
|
+
end # GithubCLI
|
@@ -13,7 +13,7 @@ module GithubCLI
|
|
13
13
|
desc 'starred', 'Lists repos being starred by a user'
|
14
14
|
method_option :user, :type => :string, :aliases => ["-u"],
|
15
15
|
:desc => 'Starred repositories for <user>'
|
16
|
-
def starred
|
16
|
+
def starred
|
17
17
|
if options[:user]
|
18
18
|
options[:params]['user'] = options[:user]
|
19
19
|
end
|
@@ -0,0 +1,26 @@
|
|
1
|
+
# encoding: utf-8
|
2
|
+
|
3
|
+
module GithubCLI
|
4
|
+
class Commands::Statuses < Command
|
5
|
+
|
6
|
+
namespace :status
|
7
|
+
|
8
|
+
desc 'list <user> <repo> <sha>', 'Lists statuses for a <sha>'
|
9
|
+
def list(user, repo, sha)
|
10
|
+
Status.list user, repo, sha, options[:params], options[:format]
|
11
|
+
end
|
12
|
+
|
13
|
+
desc 'create <user> <repo> <sha>', 'Create a status'
|
14
|
+
long_desc <<-DESC
|
15
|
+
Inputs
|
16
|
+
|
17
|
+
state - Required string - State of the status - can be one of pending, success, error, or failure.\n
|
18
|
+
target_url - Optional string - Target url to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the ‘source’ of the Status. \n
|
19
|
+
description - Optional string - Short description of the status\n
|
20
|
+
DESC
|
21
|
+
def create(user, repo, sha)
|
22
|
+
Status.create user, repo, sha, options[:params], options[:format]
|
23
|
+
end
|
24
|
+
|
25
|
+
end # Statuses
|
26
|
+
end # GithubCLI
|
@@ -13,7 +13,7 @@ module GithubCLI
|
|
13
13
|
desc 'watched', 'Lists repos being watched by a user'
|
14
14
|
method_option :user, :type => :string, :aliases => ["-u"],
|
15
15
|
:desc => 'Watch repositories for <user>'
|
16
|
-
def watched
|
16
|
+
def watched
|
17
17
|
if options[:user]
|
18
18
|
options[:params]['user'] = options[:user]
|
19
19
|
end
|
data/lib/github_cli/commands.rb
CHANGED
@@ -2,6 +2,7 @@
|
|
2
2
|
|
3
3
|
module GithubCLI
|
4
4
|
module Commands
|
5
|
+
autoload :Assignees, 'github_cli/commands/assignees'
|
5
6
|
autoload :Authorizations, 'github_cli/commands/authorizations'
|
6
7
|
autoload :Blobs, 'github_cli/commands/blobs'
|
7
8
|
autoload :Collaborators, 'github_cli/commands/collaborators'
|
@@ -18,6 +19,7 @@ module GithubCLI
|
|
18
19
|
autoload :Keys, 'github_cli/commands/keys'
|
19
20
|
autoload :Labels, 'github_cli/commands/labels'
|
20
21
|
autoload :Members, 'github_cli/commands/members'
|
22
|
+
autoload :Merging, 'github_cli/commands/merging'
|
21
23
|
autoload :Milestones, 'github_cli/commands/milestones'
|
22
24
|
autoload :Organizations, 'github_cli/commands/organizations'
|
23
25
|
autoload :PullRequests, 'github_cli/commands/pull_requests'
|
@@ -25,6 +27,7 @@ module GithubCLI
|
|
25
27
|
autoload :Repositories, 'github_cli/commands/repositories'
|
26
28
|
autoload :Search, 'github_cli/commands/search'
|
27
29
|
autoload :Starring, 'github_cli/commands/starring'
|
30
|
+
autoload :Statuses, 'github_cli/commands/statuses'
|
28
31
|
autoload :Tags, 'github_cli/commands/tags'
|
29
32
|
autoload :Teams, 'github_cli/commands/teams'
|
30
33
|
autoload :Trees, 'github_cli/commands/trees'
|
@@ -3,6 +3,9 @@
|
|
3
3
|
module GithubCLI
|
4
4
|
class CLI
|
5
5
|
|
6
|
+
desc "assignee <command>", "Leverage Assignees API"
|
7
|
+
subcommand "assignee", GithubCLI::Commands::Assignees
|
8
|
+
|
6
9
|
desc "auth <command>", "Leverage Authorizations API"
|
7
10
|
subcommand "auth", GithubCLI::Commands::Authorizations
|
8
11
|
|
@@ -51,6 +54,9 @@ module GithubCLI
|
|
51
54
|
desc "member <command>", "Leverage Members API"
|
52
55
|
subcommand "member", GithubCLI::Commands::Members
|
53
56
|
|
57
|
+
desc "merge <command>", "Leverage Merging API"
|
58
|
+
subcommand "merge", GithubCLI::Commands::Merging
|
59
|
+
|
54
60
|
desc "milestone <command>", "Leverage Milestones API"
|
55
61
|
subcommand "milestone", GithubCLI::Commands::Milestones
|
56
62
|
|
@@ -72,6 +78,9 @@ module GithubCLI
|
|
72
78
|
desc "star <command>", "Leverage Starring API"
|
73
79
|
subcommand "star", GithubCLI::Commands::Starring
|
74
80
|
|
81
|
+
desc "status <command>", "Leverage Statuses API"
|
82
|
+
subcommand "status", GithubCLI::Commands::Statuses
|
83
|
+
|
75
84
|
desc "tag <command>", "Leverage Tags API"
|
76
85
|
subcommand "tag", GithubCLI::Commands::Tags
|
77
86
|
|
data/lib/github_cli/version.rb
CHANGED
Binary file
|
Binary file
|
metadata
CHANGED
@@ -1,117 +1,90 @@
|
|
1
|
-
--- !ruby/object:Gem::Specification
|
1
|
+
--- !ruby/object:Gem::Specification
|
2
2
|
name: github_cli
|
3
|
-
version: !ruby/object:Gem::Version
|
4
|
-
|
3
|
+
version: !ruby/object:Gem::Version
|
4
|
+
version: 0.5.3
|
5
5
|
prerelease:
|
6
|
-
segments:
|
7
|
-
- 0
|
8
|
-
- 5
|
9
|
-
- 2
|
10
|
-
version: 0.5.2
|
11
6
|
platform: ruby
|
12
|
-
authors:
|
7
|
+
authors:
|
13
8
|
- Piotr Murach
|
14
9
|
autorequire:
|
15
10
|
bindir: bin
|
16
11
|
cert_chain: []
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
- !ruby/object:Gem::Dependency
|
12
|
+
date: 2012-09-29 00:00:00.000000000Z
|
13
|
+
dependencies:
|
14
|
+
- !ruby/object:Gem::Dependency
|
21
15
|
name: github_api
|
22
|
-
|
23
|
-
requirement: &id001 !ruby/object:Gem::Requirement
|
16
|
+
requirement: &2152331700 !ruby/object:Gem::Requirement
|
24
17
|
none: false
|
25
|
-
requirements:
|
18
|
+
requirements:
|
26
19
|
- - ~>
|
27
|
-
- !ruby/object:Gem::Version
|
28
|
-
|
29
|
-
segments:
|
30
|
-
- 0
|
31
|
-
- 7
|
32
|
-
version: "0.7"
|
20
|
+
- !ruby/object:Gem::Version
|
21
|
+
version: '0.7'
|
33
22
|
type: :runtime
|
34
|
-
version_requirements: *id001
|
35
|
-
- !ruby/object:Gem::Dependency
|
36
|
-
name: rspec
|
37
23
|
prerelease: false
|
38
|
-
|
24
|
+
version_requirements: *2152331700
|
25
|
+
- !ruby/object:Gem::Dependency
|
26
|
+
name: rspec
|
27
|
+
requirement: &2152330960 !ruby/object:Gem::Requirement
|
39
28
|
none: false
|
40
|
-
requirements:
|
41
|
-
- -
|
42
|
-
- !ruby/object:Gem::Version
|
43
|
-
|
44
|
-
segments:
|
45
|
-
- 0
|
46
|
-
version: "0"
|
29
|
+
requirements:
|
30
|
+
- - ! '>='
|
31
|
+
- !ruby/object:Gem::Version
|
32
|
+
version: '0'
|
47
33
|
type: :development
|
48
|
-
version_requirements: *id002
|
49
|
-
- !ruby/object:Gem::Dependency
|
50
|
-
name: aruba
|
51
34
|
prerelease: false
|
52
|
-
|
35
|
+
version_requirements: *2152330960
|
36
|
+
- !ruby/object:Gem::Dependency
|
37
|
+
name: aruba
|
38
|
+
requirement: &2152329880 !ruby/object:Gem::Requirement
|
53
39
|
none: false
|
54
|
-
requirements:
|
55
|
-
- -
|
56
|
-
- !ruby/object:Gem::Version
|
57
|
-
|
58
|
-
segments:
|
59
|
-
- 0
|
60
|
-
version: "0"
|
40
|
+
requirements:
|
41
|
+
- - ! '>='
|
42
|
+
- !ruby/object:Gem::Version
|
43
|
+
version: '0'
|
61
44
|
type: :development
|
62
|
-
version_requirements: *id003
|
63
|
-
- !ruby/object:Gem::Dependency
|
64
|
-
name: rake
|
65
45
|
prerelease: false
|
66
|
-
|
46
|
+
version_requirements: *2152329880
|
47
|
+
- !ruby/object:Gem::Dependency
|
48
|
+
name: rake
|
49
|
+
requirement: &2152329160 !ruby/object:Gem::Requirement
|
67
50
|
none: false
|
68
|
-
requirements:
|
69
|
-
- -
|
70
|
-
- !ruby/object:Gem::Version
|
71
|
-
|
72
|
-
segments:
|
73
|
-
- 0
|
74
|
-
version: "0"
|
51
|
+
requirements:
|
52
|
+
- - ! '>='
|
53
|
+
- !ruby/object:Gem::Version
|
54
|
+
version: '0'
|
75
55
|
type: :development
|
76
|
-
version_requirements: *id004
|
77
|
-
- !ruby/object:Gem::Dependency
|
78
|
-
name: communist
|
79
56
|
prerelease: false
|
80
|
-
|
57
|
+
version_requirements: *2152329160
|
58
|
+
- !ruby/object:Gem::Dependency
|
59
|
+
name: communist
|
60
|
+
requirement: &2152328380 !ruby/object:Gem::Requirement
|
81
61
|
none: false
|
82
|
-
requirements:
|
83
|
-
- -
|
84
|
-
- !ruby/object:Gem::Version
|
85
|
-
|
86
|
-
segments:
|
87
|
-
- 0
|
88
|
-
version: "0"
|
62
|
+
requirements:
|
63
|
+
- - ! '>='
|
64
|
+
- !ruby/object:Gem::Version
|
65
|
+
version: '0'
|
89
66
|
type: :development
|
90
|
-
version_requirements: *id005
|
91
|
-
- !ruby/object:Gem::Dependency
|
92
|
-
name: ronn
|
93
67
|
prerelease: false
|
94
|
-
|
68
|
+
version_requirements: *2152328380
|
69
|
+
- !ruby/object:Gem::Dependency
|
70
|
+
name: ronn
|
71
|
+
requirement: &2152327800 !ruby/object:Gem::Requirement
|
95
72
|
none: false
|
96
|
-
requirements:
|
97
|
-
- -
|
98
|
-
- !ruby/object:Gem::Version
|
99
|
-
|
100
|
-
segments:
|
101
|
-
- 0
|
102
|
-
version: "0"
|
73
|
+
requirements:
|
74
|
+
- - ! '>='
|
75
|
+
- !ruby/object:Gem::Version
|
76
|
+
version: '0'
|
103
77
|
type: :development
|
104
|
-
|
78
|
+
prerelease: false
|
79
|
+
version_requirements: *2152327800
|
105
80
|
description: CLI-based access to GitHub API v3
|
106
|
-
email:
|
107
|
-
-
|
108
|
-
executables:
|
81
|
+
email:
|
82
|
+
- ''
|
83
|
+
executables:
|
109
84
|
- gcli
|
110
85
|
extensions: []
|
111
|
-
|
112
86
|
extra_rdoc_files: []
|
113
|
-
|
114
|
-
files:
|
87
|
+
files:
|
115
88
|
- .gitignore
|
116
89
|
- .rspec
|
117
90
|
- .rvmrc
|
@@ -123,6 +96,7 @@ files:
|
|
123
96
|
- README.md
|
124
97
|
- Rakefile
|
125
98
|
- bin/gcli
|
99
|
+
- features/assignee.feature
|
126
100
|
- features/blob.feature
|
127
101
|
- features/collaborator.feature
|
128
102
|
- features/commit.feature
|
@@ -143,6 +117,7 @@ files:
|
|
143
117
|
- features/key.feature
|
144
118
|
- features/label.feature
|
145
119
|
- features/member.feature
|
120
|
+
- features/merging.feature
|
146
121
|
- features/milestone.feature
|
147
122
|
- features/organization.feature
|
148
123
|
- features/pull_request.feature
|
@@ -151,6 +126,7 @@ files:
|
|
151
126
|
- features/search.feature
|
152
127
|
- features/search_commands.feature
|
153
128
|
- features/starring.feature
|
129
|
+
- features/statuses.feature
|
154
130
|
- features/support/env.rb
|
155
131
|
- features/support/hooks.rb
|
156
132
|
- features/tag.feature
|
@@ -160,11 +136,11 @@ files:
|
|
160
136
|
- features/user.feature
|
161
137
|
- features/watching.feature
|
162
138
|
- fixtures/simple_config
|
163
|
-
- ghc_logo.png
|
164
139
|
- github_cli.gemspec
|
165
140
|
- lib/github_cli.rb
|
166
141
|
- lib/github_cli/api.rb
|
167
142
|
- lib/github_cli/apis.rb
|
143
|
+
- lib/github_cli/apis/assignee.rb
|
168
144
|
- lib/github_cli/apis/authorization.rb
|
169
145
|
- lib/github_cli/apis/blob.rb
|
170
146
|
- lib/github_cli/apis/collaborator.rb
|
@@ -181,6 +157,7 @@ files:
|
|
181
157
|
- lib/github_cli/apis/key.rb
|
182
158
|
- lib/github_cli/apis/label.rb
|
183
159
|
- lib/github_cli/apis/member.rb
|
160
|
+
- lib/github_cli/apis/merging.rb
|
184
161
|
- lib/github_cli/apis/milestone.rb
|
185
162
|
- lib/github_cli/apis/organization.rb
|
186
163
|
- lib/github_cli/apis/pull_request.rb
|
@@ -188,6 +165,7 @@ files:
|
|
188
165
|
- lib/github_cli/apis/repository.rb
|
189
166
|
- lib/github_cli/apis/search.rb
|
190
167
|
- lib/github_cli/apis/starring.rb
|
168
|
+
- lib/github_cli/apis/status.rb
|
191
169
|
- lib/github_cli/apis/tag.rb
|
192
170
|
- lib/github_cli/apis/team.rb
|
193
171
|
- lib/github_cli/apis/tree.rb
|
@@ -199,6 +177,7 @@ files:
|
|
199
177
|
- lib/github_cli/command/completion.rb
|
200
178
|
- lib/github_cli/command/usage.rb
|
201
179
|
- lib/github_cli/commands.rb
|
180
|
+
- lib/github_cli/commands/assignees.rb
|
202
181
|
- lib/github_cli/commands/authorizations.rb
|
203
182
|
- lib/github_cli/commands/blobs.rb
|
204
183
|
- lib/github_cli/commands/collaborators.rb
|
@@ -215,6 +194,7 @@ files:
|
|
215
194
|
- lib/github_cli/commands/keys.rb
|
216
195
|
- lib/github_cli/commands/labels.rb
|
217
196
|
- lib/github_cli/commands/members.rb
|
197
|
+
- lib/github_cli/commands/merging.rb
|
218
198
|
- lib/github_cli/commands/milestones.rb
|
219
199
|
- lib/github_cli/commands/organizations.rb
|
220
200
|
- lib/github_cli/commands/pull_requests.rb
|
@@ -222,6 +202,7 @@ files:
|
|
222
202
|
- lib/github_cli/commands/repositories.rb
|
223
203
|
- lib/github_cli/commands/search.rb
|
224
204
|
- lib/github_cli/commands/starring.rb
|
205
|
+
- lib/github_cli/commands/statuses.rb
|
225
206
|
- lib/github_cli/commands/tags.rb
|
226
207
|
- lib/github_cli/commands/teams.rb
|
227
208
|
- lib/github_cli/commands/trees.rb
|
@@ -280,6 +261,8 @@ files:
|
|
280
261
|
- man/gcli-config.1.ronn
|
281
262
|
- man/gcli-repo.1.ronn
|
282
263
|
- man/gcli.1.ronn
|
264
|
+
- screenshots/command.png
|
265
|
+
- screenshots/interface.png
|
283
266
|
- spec/github_cli/api_spec.rb
|
284
267
|
- spec/github_cli/cli_spec.rb
|
285
268
|
- spec/github_cli/command_spec.rb
|
@@ -296,38 +279,31 @@ files:
|
|
296
279
|
- lib/github_cli/man/gcli.1.txt
|
297
280
|
homepage: http://github.com/peter-murach/github_cli
|
298
281
|
licenses: []
|
299
|
-
|
300
282
|
post_install_message:
|
301
283
|
rdoc_options: []
|
302
|
-
|
303
|
-
require_paths:
|
284
|
+
require_paths:
|
304
285
|
- lib
|
305
|
-
required_ruby_version: !ruby/object:Gem::Requirement
|
286
|
+
required_ruby_version: !ruby/object:Gem::Requirement
|
306
287
|
none: false
|
307
|
-
requirements:
|
308
|
-
- -
|
309
|
-
- !ruby/object:Gem::Version
|
310
|
-
|
311
|
-
|
312
|
-
- 0
|
313
|
-
version: "0"
|
314
|
-
required_rubygems_version: !ruby/object:Gem::Requirement
|
288
|
+
requirements:
|
289
|
+
- - ! '>='
|
290
|
+
- !ruby/object:Gem::Version
|
291
|
+
version: '0'
|
292
|
+
required_rubygems_version: !ruby/object:Gem::Requirement
|
315
293
|
none: false
|
316
|
-
requirements:
|
317
|
-
- -
|
318
|
-
- !ruby/object:Gem::Version
|
319
|
-
|
320
|
-
segments:
|
321
|
-
- 0
|
322
|
-
version: "0"
|
294
|
+
requirements:
|
295
|
+
- - ! '>='
|
296
|
+
- !ruby/object:Gem::Version
|
297
|
+
version: '0'
|
323
298
|
requirements: []
|
324
|
-
|
325
299
|
rubyforge_project:
|
326
300
|
rubygems_version: 1.8.10
|
327
301
|
signing_key:
|
328
302
|
specification_version: 3
|
329
|
-
summary: github_cli is a set of tools that provide full command line access to GitHub
|
330
|
-
|
303
|
+
summary: github_cli is a set of tools that provide full command line access to GitHub
|
304
|
+
API v3
|
305
|
+
test_files:
|
306
|
+
- features/assignee.feature
|
331
307
|
- features/blob.feature
|
332
308
|
- features/collaborator.feature
|
333
309
|
- features/commit.feature
|
@@ -348,6 +324,7 @@ test_files:
|
|
348
324
|
- features/key.feature
|
349
325
|
- features/label.feature
|
350
326
|
- features/member.feature
|
327
|
+
- features/merging.feature
|
351
328
|
- features/milestone.feature
|
352
329
|
- features/organization.feature
|
353
330
|
- features/pull_request.feature
|
@@ -356,6 +333,7 @@ test_files:
|
|
356
333
|
- features/search.feature
|
357
334
|
- features/search_commands.feature
|
358
335
|
- features/starring.feature
|
336
|
+
- features/statuses.feature
|
359
337
|
- features/support/env.rb
|
360
338
|
- features/support/hooks.rb
|
361
339
|
- features/tag.feature
|
data/ghc_logo.png
DELETED
Binary file
|