github_cli 0.4.4 → 0.5.0
Sign up to get free protection for your applications and to get access to all the features.
- data/.gitignore +1 -0
- data/.travis.yml +0 -2
- data/CHANGELOG.md +14 -0
- data/Gemfile.lock +9 -3
- data/README.md +68 -48
- data/Rakefile +47 -1
- data/bin/gcli +18 -0
- data/bin/ghc +1 -17
- data/features/blob.feature +6 -6
- data/features/collaborator.feature +10 -10
- data/features/commit.feature +6 -6
- data/features/completion.feature +3 -3
- data/features/config.feature +55 -0
- data/features/content.feature +9 -9
- data/features/download.feature +11 -11
- data/features/email.feature +8 -8
- data/features/errors.feature +11 -9
- data/features/event.feature +20 -20
- data/features/executable.feature +4 -4
- data/features/follower.feature +13 -13
- data/features/fork.feature +6 -6
- data/features/gist.feature +22 -22
- data/features/hook.feature +14 -14
- data/features/init.feature +48 -0
- data/features/issue.feature +12 -12
- data/features/key.feature +12 -12
- data/features/label.feature +23 -23
- data/features/member.feature +13 -13
- data/features/milestone.feature +12 -12
- data/features/organization.feature +9 -9
- data/features/pull_request.feature +18 -18
- data/features/reference.feature +13 -13
- data/features/repository.feature +20 -20
- data/features/search.feature +10 -10
- data/features/search_commands.feature +4 -4
- data/features/support/hooks.rb +3 -1
- data/features/tag.feature +6 -6
- data/features/team.feature +28 -28
- data/features/tree.feature +5 -5
- data/features/usage.feature +3 -3
- data/features/user.feature +7 -7
- data/features/watching.feature +13 -13
- data/fixtures/simple_config +9 -8
- data/github_cli.gemspec +2 -2
- data/lib/github_cli/api.rb +3 -3
- data/lib/github_cli/cli.rb +96 -17
- data/lib/github_cli/config.rb +30 -9
- data/lib/github_cli/editor.rb +11 -6
- data/lib/github_cli/man/gcli-config.1 +102 -0
- data/lib/github_cli/man/gcli-config.1.txt +96 -0
- data/lib/github_cli/man/gcli-repo.1 +16 -0
- data/lib/github_cli/man/gcli-repo.1.txt +15 -0
- data/lib/github_cli/man/gcli.1 +34 -0
- data/lib/github_cli/man/gcli.1.txt +33 -0
- data/lib/github_cli/manpage.rb +42 -0
- data/lib/github_cli/pager.rb +1 -1
- data/lib/github_cli/terminal.rb +8 -2
- data/lib/github_cli/thor_ext.rb +12 -1
- data/lib/github_cli/vendor.rb +10 -0
- data/lib/github_cli/version.rb +1 -1
- data/lib/github_cli.rb +7 -2
- data/man/gcli-config.1.ronn +82 -0
- data/man/gcli-repo.1.ronn +7 -0
- data/man/gcli.1.ronn +29 -0
- data/spec/github_cli/config_spec.rb +21 -7
- metadata +43 -22
- data/features/settings.feature +0 -35
data/features/key.feature
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: gcli key
|
2
2
|
|
3
3
|
Scenario: Available commands
|
4
4
|
|
5
|
-
When I run `
|
5
|
+
When I run `gcli key`
|
6
6
|
Then the exit status should be 0
|
7
|
-
And the output should contain "
|
8
|
-
And the output should contain "
|
9
|
-
And the output should contain "
|
10
|
-
And the output should contain "
|
11
|
-
And the output should contain "
|
7
|
+
And the output should contain "gcli key create"
|
8
|
+
And the output should contain "gcli key delete"
|
9
|
+
And the output should contain "gcli key edit"
|
10
|
+
And the output should contain "gcli key get"
|
11
|
+
And the output should contain "gcli key list"
|
12
12
|
|
13
13
|
Scenario: List keys
|
14
14
|
Given the GitHub API server:
|
15
15
|
"""
|
16
16
|
get('/repos/wycats/thor/keys') { status 200 }
|
17
17
|
"""
|
18
|
-
When I run `
|
18
|
+
When I run `gcli key ls wycats thor`
|
19
19
|
Then the exit status should be 0
|
20
20
|
|
21
21
|
Scenario: Get key
|
@@ -23,7 +23,7 @@ Feature: ghc key
|
|
23
23
|
"""
|
24
24
|
get('/repos/wycats/thor/keys/1') { status 200 }
|
25
25
|
"""
|
26
|
-
When I run `
|
26
|
+
When I run `gcli key get wycats thor 1`
|
27
27
|
Then the exit status should be 0
|
28
28
|
|
29
29
|
Scenario: Create key
|
@@ -31,7 +31,7 @@ Feature: ghc key
|
|
31
31
|
"""
|
32
32
|
post('/repos/wycats/thor/keys') { status 200 }
|
33
33
|
"""
|
34
|
-
When I run `
|
34
|
+
When I run `gcli key create wycats thor --params=title:octo key:fh34d55`
|
35
35
|
Then the exit status should be 0
|
36
36
|
|
37
37
|
Scenario: Edit key
|
@@ -39,7 +39,7 @@ Feature: ghc key
|
|
39
39
|
"""
|
40
40
|
patch('/repos/wycats/thor/keys/1') { status 200 }
|
41
41
|
"""
|
42
|
-
When I run `
|
42
|
+
When I run `gcli key edit wycats thor 1 --params=title:octo key:fh34d55`
|
43
43
|
Then the exit status should be 0
|
44
44
|
|
45
45
|
Scenario: Delete key
|
@@ -47,6 +47,6 @@ Feature: ghc key
|
|
47
47
|
"""
|
48
48
|
delete('/repos/wycats/thor/keys/1') { status 200 }
|
49
49
|
"""
|
50
|
-
When I run `
|
50
|
+
When I run `gcli key del wycats thor 1`
|
51
51
|
Then the exit status should be 0
|
52
52
|
|
data/features/label.feature
CHANGED
@@ -1,26 +1,26 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: gcli label
|
2
2
|
|
3
3
|
Scenario: Available commands
|
4
4
|
|
5
|
-
When I run `
|
5
|
+
When I run `gcli label`
|
6
6
|
Then the exit status should be 0
|
7
|
-
And the output should contain "
|
8
|
-
And the output should contain "
|
9
|
-
And the output should contain "
|
10
|
-
And the output should contain "
|
11
|
-
And the output should contain "
|
12
|
-
And the output should contain "
|
13
|
-
And the output should contain "
|
14
|
-
And the output should contain "
|
15
|
-
And the output should contain "
|
16
|
-
And the output should contain "
|
7
|
+
And the output should contain "gcli label add"
|
8
|
+
And the output should contain "gcli label create"
|
9
|
+
And the output should contain "gcli label delete"
|
10
|
+
And the output should contain "gcli label get"
|
11
|
+
And the output should contain "gcli label issue"
|
12
|
+
And the output should contain "gcli label list"
|
13
|
+
And the output should contain "gcli label milestone"
|
14
|
+
And the output should contain "gcli label remove"
|
15
|
+
And the output should contain "gcli label replace"
|
16
|
+
And the output should contain "gcli label update"
|
17
17
|
|
18
18
|
Scenario: List labels
|
19
19
|
Given the GitHub API server:
|
20
20
|
"""
|
21
21
|
get('/repos/wycats/thor/labels') { status 200 }
|
22
22
|
"""
|
23
|
-
When I run `
|
23
|
+
When I run `gcli label ls wycats thor`
|
24
24
|
Then the exit status should be 0
|
25
25
|
|
26
26
|
Scenario: Get label
|
@@ -28,7 +28,7 @@ Feature: ghc label
|
|
28
28
|
"""
|
29
29
|
get('/repos/wycats/thor/labels/1') { status 200 }
|
30
30
|
"""
|
31
|
-
When I run `
|
31
|
+
When I run `gcli label get wycats thor 1`
|
32
32
|
Then the exit status should be 0
|
33
33
|
|
34
34
|
Scenario: Create label
|
@@ -36,7 +36,7 @@ Feature: ghc label
|
|
36
36
|
"""
|
37
37
|
post('/repos/wycats/thor/labels') { status 200 }
|
38
38
|
"""
|
39
|
-
When I run `
|
39
|
+
When I run `gcli label create wycats thor --params=name:bug color:f3f3f3`
|
40
40
|
Then the exit status should be 0
|
41
41
|
|
42
42
|
Scenario: Update label
|
@@ -44,7 +44,7 @@ Feature: ghc label
|
|
44
44
|
"""
|
45
45
|
patch('/repos/wycats/thor/labels/1') { status 200 }
|
46
46
|
"""
|
47
|
-
When I run `
|
47
|
+
When I run `gcli label update wycats thor 1 --params=name:bug color:f3f3f3`
|
48
48
|
Then the exit status should be 0
|
49
49
|
|
50
50
|
Scenario: Delete label
|
@@ -52,7 +52,7 @@ Feature: ghc label
|
|
52
52
|
"""
|
53
53
|
delete('/repos/wycats/thor/labels/1') { status 200 }
|
54
54
|
"""
|
55
|
-
When I run `
|
55
|
+
When I run `gcli label delete wycats thor 1`
|
56
56
|
Then the exit status should be 0
|
57
57
|
|
58
58
|
Scenario: Add labels
|
@@ -60,7 +60,7 @@ Feature: ghc label
|
|
60
60
|
"""
|
61
61
|
post('/repos/wycats/thor/issues/1/labels') { status 200 }
|
62
62
|
"""
|
63
|
-
When I run `
|
63
|
+
When I run `gcli label add wycats thor 1 'bug' 'feature'`
|
64
64
|
Then the exit status should be 0
|
65
65
|
|
66
66
|
Scenario: Remove label from an issue
|
@@ -68,7 +68,7 @@ Feature: ghc label
|
|
68
68
|
"""
|
69
69
|
delete('/repos/wycats/thor/issues/1/labels/2') { status 200 }
|
70
70
|
"""
|
71
|
-
When I run `
|
71
|
+
When I run `gcli label remove wycats thor 2/1`
|
72
72
|
Then the exit status should be 0
|
73
73
|
|
74
74
|
Scenario: Remove label from an issue
|
@@ -76,7 +76,7 @@ Feature: ghc label
|
|
76
76
|
"""
|
77
77
|
delete('/repos/wycats/thor/issues/1/labels/2') { status 200 }
|
78
78
|
"""
|
79
|
-
When I run `
|
79
|
+
When I run `gcli label remove wycats thor 2/1`
|
80
80
|
Then the exit status should be 0
|
81
81
|
|
82
82
|
Scenario: Remove all labels from an issue
|
@@ -84,7 +84,7 @@ Feature: ghc label
|
|
84
84
|
"""
|
85
85
|
delete('/repos/wycats/thor/issues/1/labels') { status 200 }
|
86
86
|
"""
|
87
|
-
When I run `
|
87
|
+
When I run `gcli label remove wycats thor 1`
|
88
88
|
Then the exit status should be 0
|
89
89
|
|
90
90
|
Scenario: Replace labels
|
@@ -92,7 +92,7 @@ Feature: ghc label
|
|
92
92
|
"""
|
93
93
|
put('/repos/wycats/thor/issues/1/labels') { status 200 }
|
94
94
|
"""
|
95
|
-
When I run `
|
95
|
+
When I run `gcli label replace wycats thor 1 'bug' 'feature'`
|
96
96
|
Then the exit status should be 0
|
97
97
|
|
98
98
|
Scenario: Milestone labels
|
@@ -100,6 +100,6 @@ Feature: ghc label
|
|
100
100
|
"""
|
101
101
|
get('/repos/wycats/thor/milestones/1/labels') { status 200 }
|
102
102
|
"""
|
103
|
-
When I run `
|
103
|
+
When I run `gcli label milestone wycats thor 1`
|
104
104
|
Then the exit status should be 0
|
105
105
|
|
data/features/member.feature
CHANGED
@@ -1,20 +1,20 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: gcli member
|
2
2
|
|
3
3
|
Scenario: Available commands
|
4
4
|
|
5
|
-
When I run `
|
5
|
+
When I run `gcli member`
|
6
6
|
Then the exit status should be 0
|
7
|
-
And the output should contain "
|
8
|
-
And the output should contain "
|
9
|
-
And the output should contain "
|
10
|
-
And the output should contain "
|
7
|
+
And the output should contain "gcli member delete"
|
8
|
+
And the output should contain "gcli member list"
|
9
|
+
And the output should contain "gcli member member"
|
10
|
+
And the output should contain "gcli member publicize"
|
11
11
|
|
12
12
|
Scenario: List members
|
13
13
|
Given the GitHub API server:
|
14
14
|
"""
|
15
15
|
get('/orgs/rails/members') { status 200 }
|
16
16
|
"""
|
17
|
-
When I run `
|
17
|
+
When I run `gcli member ls rails`
|
18
18
|
Then the exit status should be 0
|
19
19
|
|
20
20
|
Scenario: List public members
|
@@ -22,7 +22,7 @@ Feature: ghc member
|
|
22
22
|
"""
|
23
23
|
get('/orgs/rails/public_members') { status 200 }
|
24
24
|
"""
|
25
|
-
When I run `
|
25
|
+
When I run `gcli member ls --public rails`
|
26
26
|
Then the exit status should be 0
|
27
27
|
|
28
28
|
Scenario: Check if user is a member of an organization
|
@@ -30,7 +30,7 @@ Feature: ghc member
|
|
30
30
|
"""
|
31
31
|
get('/orgs/rails/members/wycats') { status 200 }
|
32
32
|
"""
|
33
|
-
When I run `
|
33
|
+
When I run `gcli member member rails wycats`
|
34
34
|
Then the exit status should be 0
|
35
35
|
|
36
36
|
Scenario: Check if user is a public member of an organization
|
@@ -38,7 +38,7 @@ Feature: ghc member
|
|
38
38
|
"""
|
39
39
|
get('/orgs/rails/public_members/wycats') { status 200 }
|
40
40
|
"""
|
41
|
-
When I run `
|
41
|
+
When I run `gcli member member --public rails wycats`
|
42
42
|
Then the exit status should be 0
|
43
43
|
|
44
44
|
Scenario: Remove a member
|
@@ -46,7 +46,7 @@ Feature: ghc member
|
|
46
46
|
"""
|
47
47
|
delete('/orgs/rails/members/wycats') { status 200 }
|
48
48
|
"""
|
49
|
-
When I run `
|
49
|
+
When I run `gcli member del rails wycats`
|
50
50
|
Then the exit status should be 0
|
51
51
|
|
52
52
|
Scenario: Publicize user's membership
|
@@ -54,7 +54,7 @@ Feature: ghc member
|
|
54
54
|
"""
|
55
55
|
put('/orgs/rails/public_members/wycats') { status 200 }
|
56
56
|
"""
|
57
|
-
When I run `
|
57
|
+
When I run `gcli member publicize rails wycats`
|
58
58
|
Then the exit status should be 0
|
59
59
|
|
60
60
|
Scenario: Conceal user's membership
|
@@ -62,6 +62,6 @@ Feature: ghc member
|
|
62
62
|
"""
|
63
63
|
delete('/orgs/rails/public_members/wycats') { status 200 }
|
64
64
|
"""
|
65
|
-
When I run `
|
65
|
+
When I run `gcli member conceal rails wycats`
|
66
66
|
Then the exit status should be 0
|
67
67
|
|
data/features/milestone.feature
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: gcli milestone
|
2
2
|
|
3
3
|
Scenario: Available commands
|
4
4
|
|
5
|
-
When I run `
|
5
|
+
When I run `gcli milestone`
|
6
6
|
Then the exit status should be 0
|
7
|
-
And the output should contain "
|
8
|
-
And the output should contain "
|
9
|
-
And the output should contain "
|
10
|
-
And the output should contain "
|
11
|
-
And the output should contain "
|
7
|
+
And the output should contain "gcli milestone create"
|
8
|
+
And the output should contain "gcli milestone delete"
|
9
|
+
And the output should contain "gcli milestone get"
|
10
|
+
And the output should contain "gcli milestone list"
|
11
|
+
And the output should contain "gcli milestone update"
|
12
12
|
|
13
13
|
Scenario: List milestones
|
14
14
|
Given the GitHub API server:
|
15
15
|
"""
|
16
16
|
get('/repos/wycats/thor/milestones') { status 200 }
|
17
17
|
"""
|
18
|
-
When I run `
|
18
|
+
When I run `gcli milestone ls wycats thor`
|
19
19
|
Then the exit status should be 0
|
20
20
|
|
21
21
|
Scenario: Get milestone
|
@@ -23,7 +23,7 @@ Feature: ghc milestone
|
|
23
23
|
"""
|
24
24
|
get('/repos/wycats/thor/milestones/1') { status 200 }
|
25
25
|
"""
|
26
|
-
When I run `
|
26
|
+
When I run `gcli milestone get wycats thor 1`
|
27
27
|
Then the exit status should be 0
|
28
28
|
|
29
29
|
Scenario: Create milestone
|
@@ -31,7 +31,7 @@ Feature: ghc milestone
|
|
31
31
|
"""
|
32
32
|
post('/repos/wycats/thor/milestones') { status 200 }
|
33
33
|
"""
|
34
|
-
When I run `
|
34
|
+
When I run `gcli milestone create wycats thor --params=title:new`
|
35
35
|
Then the exit status should be 0
|
36
36
|
|
37
37
|
Scenario: Update milestone
|
@@ -39,7 +39,7 @@ Feature: ghc milestone
|
|
39
39
|
"""
|
40
40
|
patch('/repos/wycats/thor/milestones/1') { status 200 }
|
41
41
|
"""
|
42
|
-
When I run `
|
42
|
+
When I run `gcli milestone update wycats thor 1 --params=title:new`
|
43
43
|
Then the exit status should be 0
|
44
44
|
|
45
45
|
Scenario: Delete milestone
|
@@ -47,6 +47,6 @@ Feature: ghc milestone
|
|
47
47
|
"""
|
48
48
|
delete('/repos/wycats/thor/milestones/1') { status 200 }
|
49
49
|
"""
|
50
|
-
When I run `
|
50
|
+
When I run `gcli milestone del wycats thor 1`
|
51
51
|
Then the exit status should be 0
|
52
52
|
|
@@ -1,19 +1,19 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: gcli org
|
2
2
|
|
3
3
|
Scenario: Available commands
|
4
4
|
|
5
|
-
When I run `
|
5
|
+
When I run `gcli org`
|
6
6
|
Then the exit status should be 0
|
7
|
-
And the output should contain "
|
8
|
-
And the output should contain "
|
9
|
-
And the output should contain "
|
7
|
+
And the output should contain "gcli org edit"
|
8
|
+
And the output should contain "gcli org list"
|
9
|
+
And the output should contain "gcli org get"
|
10
10
|
|
11
11
|
Scenario: List public organizations for a user
|
12
12
|
Given the GitHub API server:
|
13
13
|
"""
|
14
14
|
get('/users/wycats/orgs') { status 200 }
|
15
15
|
"""
|
16
|
-
When I run `
|
16
|
+
When I run `gcli org ls --user=wycats`
|
17
17
|
Then the exit status should be 0
|
18
18
|
|
19
19
|
Scenario: List public organizations for the authenticated user
|
@@ -21,7 +21,7 @@ Feature: ghc org
|
|
21
21
|
"""
|
22
22
|
get('/user/orgs') { status 200 }
|
23
23
|
"""
|
24
|
-
When I run `
|
24
|
+
When I run `gcli org ls`
|
25
25
|
Then the exit status should be 0
|
26
26
|
|
27
27
|
Scenario: Get an organization
|
@@ -29,7 +29,7 @@ Feature: ghc org
|
|
29
29
|
"""
|
30
30
|
get('/orgs/rails') { status 200 }
|
31
31
|
"""
|
32
|
-
When I run `
|
32
|
+
When I run `gcli org get rails`
|
33
33
|
Then the exit status should be 0
|
34
34
|
|
35
35
|
Scenario: Edit an organization
|
@@ -37,5 +37,5 @@ Feature: ghc org
|
|
37
37
|
"""
|
38
38
|
patch('/orgs/rails') { status 200 }
|
39
39
|
"""
|
40
|
-
When I run `
|
40
|
+
When I run `gcli org edit rails --params=name:github company:GitHub email:support@github.com`
|
41
41
|
Then the exit status should be 0
|
@@ -1,24 +1,24 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: gcli pull request
|
2
2
|
|
3
3
|
Scenario: Available commands
|
4
4
|
|
5
|
-
When I run `
|
5
|
+
When I run `gcli pull`
|
6
6
|
Then the exit status should be 0
|
7
|
-
And the output should contain "
|
8
|
-
And the output should contain "
|
9
|
-
And the output should contain "
|
10
|
-
And the output should contain "
|
11
|
-
And the output should contain "
|
12
|
-
And the output should contain "
|
13
|
-
And the output should contain "
|
14
|
-
And the output should contain "
|
7
|
+
And the output should contain "gcli pull commits"
|
8
|
+
And the output should contain "gcli pull create"
|
9
|
+
And the output should contain "gcli pull files"
|
10
|
+
And the output should contain "gcli pull get"
|
11
|
+
And the output should contain "gcli pull list"
|
12
|
+
And the output should contain "gcli pull merge"
|
13
|
+
And the output should contain "gcli pull merged"
|
14
|
+
And the output should contain "gcli pull update"
|
15
15
|
|
16
16
|
Scenario: List pull requests
|
17
17
|
Given the GitHub API server:
|
18
18
|
"""
|
19
19
|
get('/repos/wycats/thor/pulls') { status 200 }
|
20
20
|
"""
|
21
|
-
When I run `
|
21
|
+
When I run `gcli pull ls wycats thor`
|
22
22
|
Then the exit status should be 0
|
23
23
|
|
24
24
|
Scenario: Get pull request
|
@@ -26,7 +26,7 @@ Feature: ghc pull request
|
|
26
26
|
"""
|
27
27
|
get('/repos/wycats/thor/pulls/1') { status 200 }
|
28
28
|
"""
|
29
|
-
When I run `
|
29
|
+
When I run `gcli pull get wycats thor 1`
|
30
30
|
Then the exit status should be 0
|
31
31
|
|
32
32
|
Scenario: Create pull request
|
@@ -34,7 +34,7 @@ Feature: ghc pull request
|
|
34
34
|
"""
|
35
35
|
post('/repos/wycats/thor/pulls') { status 200 }
|
36
36
|
"""
|
37
|
-
When I run `
|
37
|
+
When I run `gcli pull create wycats thor --params=title:'Amazing new feauture'`
|
38
38
|
Then the exit status should be 0
|
39
39
|
|
40
40
|
Scenario: Update pull request
|
@@ -42,7 +42,7 @@ Feature: ghc pull request
|
|
42
42
|
"""
|
43
43
|
patch('/repos/wycats/thor/pulls/1') { status 200 }
|
44
44
|
"""
|
45
|
-
When I run `
|
45
|
+
When I run `gcli pull update wycats thor 1 --params=title:'Amazing update'`
|
46
46
|
Then the exit status should be 0
|
47
47
|
|
48
48
|
Scenario: Commits on pull request
|
@@ -50,7 +50,7 @@ Feature: ghc pull request
|
|
50
50
|
"""
|
51
51
|
get('/repos/wycats/thor/pulls/1/commits') { status 200 }
|
52
52
|
"""
|
53
|
-
When I run `
|
53
|
+
When I run `gcli pull commits wycats thor 1`
|
54
54
|
Then the exit status should be 0
|
55
55
|
|
56
56
|
Scenario: Files on pull request
|
@@ -58,7 +58,7 @@ Feature: ghc pull request
|
|
58
58
|
"""
|
59
59
|
get('/repos/wycats/thor/pulls/1/files') { status 200 }
|
60
60
|
"""
|
61
|
-
When I run `
|
61
|
+
When I run `gcli pull files wycats thor 1`
|
62
62
|
Then the exit status should be 0
|
63
63
|
|
64
64
|
Scenario: Check if pull request has been merged
|
@@ -66,7 +66,7 @@ Feature: ghc pull request
|
|
66
66
|
"""
|
67
67
|
get('/repos/wycats/thor/pulls/1/merge') { status 200 }
|
68
68
|
"""
|
69
|
-
When I run `
|
69
|
+
When I run `gcli pull merged wycats thor 1`
|
70
70
|
Then the exit status should be 0
|
71
71
|
|
72
72
|
Scenario: Merge pull request
|
@@ -74,5 +74,5 @@ Feature: ghc pull request
|
|
74
74
|
"""
|
75
75
|
put('/repos/wycats/thor/pulls/1/merge') { status 200 }
|
76
76
|
"""
|
77
|
-
When I run `
|
77
|
+
When I run `gcli pull merge wycats thor 1`
|
78
78
|
Then the exit status should be 0
|
data/features/reference.feature
CHANGED
@@ -1,21 +1,21 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: gcli ref
|
2
2
|
|
3
3
|
Scenario: Available commands
|
4
4
|
|
5
|
-
When I run `
|
5
|
+
When I run `gcli ref`
|
6
6
|
Then the exit status should be 0
|
7
|
-
And the output should contain "
|
8
|
-
And the output should contain "
|
9
|
-
And the output should contain "
|
10
|
-
And the output should contain "
|
11
|
-
And the output should contain "
|
7
|
+
And the output should contain "gcli ref create"
|
8
|
+
And the output should contain "gcli ref delete"
|
9
|
+
And the output should contain "gcli ref get"
|
10
|
+
And the output should contain "gcli ref list"
|
11
|
+
And the output should contain "gcli ref update"
|
12
12
|
|
13
13
|
Scenario: List all references
|
14
14
|
Given the GitHub API server:
|
15
15
|
"""
|
16
16
|
get('/repos/wycats/thor/git/refs') { status 200 }
|
17
17
|
"""
|
18
|
-
When I run `
|
18
|
+
When I run `gcli ref list wycats thor`
|
19
19
|
Then the exit status should be 0
|
20
20
|
|
21
21
|
Scenario: List branch references
|
@@ -23,7 +23,7 @@ Feature: ghc ref
|
|
23
23
|
"""
|
24
24
|
get('/repos/wycats/thor/git/refs/7d1b31e') { status 200 }
|
25
25
|
"""
|
26
|
-
When I run `
|
26
|
+
When I run `gcli ref list wycats thor --ref=7d1b31e`
|
27
27
|
Then the exit status should be 0
|
28
28
|
|
29
29
|
Scenario: Get reference
|
@@ -31,7 +31,7 @@ Feature: ghc ref
|
|
31
31
|
"""
|
32
32
|
get('/repos/wycats/thor/git/refs/7d1b31e') { status 200 }
|
33
33
|
"""
|
34
|
-
When I run `
|
34
|
+
When I run `gcli ref list wycats thor 7d1b31e`
|
35
35
|
Then the exit status should be 0
|
36
36
|
|
37
37
|
Scenario: Create reference
|
@@ -39,7 +39,7 @@ Feature: ghc ref
|
|
39
39
|
"""
|
40
40
|
post('/repos/wycats/thor/git/refs') { status 200 }
|
41
41
|
"""
|
42
|
-
When I run `
|
42
|
+
When I run `gcli ref create wycats thor --params=ref:refs/heads/master sha:827efc6d5`
|
43
43
|
Then the exit status should be 0
|
44
44
|
|
45
45
|
Scenario: Update reference
|
@@ -47,7 +47,7 @@ Feature: ghc ref
|
|
47
47
|
"""
|
48
48
|
patch('/repos/wycats/thor/git/refs/7d1b31e') { status 200 }
|
49
49
|
"""
|
50
|
-
When I run `
|
50
|
+
When I run `gcli ref update wycats thor 7d1b31e --params=force:true sha:827efc6d5`
|
51
51
|
Then the exit status should be 0
|
52
52
|
|
53
53
|
Scenario: Delete reference
|
@@ -55,6 +55,6 @@ Feature: ghc ref
|
|
55
55
|
"""
|
56
56
|
delete('/repos/wycats/thor/git/refs/7d1b31e') { status 200 }
|
57
57
|
"""
|
58
|
-
When I run `
|
58
|
+
When I run `gcli ref delete wycats thor 7d1b31e --params=ref:refs/heads/master`
|
59
59
|
Then the exit status should be 0
|
60
60
|
|
data/features/repository.feature
CHANGED
@@ -1,24 +1,24 @@
|
|
1
|
-
Feature:
|
1
|
+
Feature: gcli repository
|
2
2
|
|
3
3
|
Scenario: Available commands
|
4
|
-
When I run `
|
4
|
+
When I run `gcli repo`
|
5
5
|
Then the exit status should be 0
|
6
|
-
And the output should contain "
|
7
|
-
And the output should contain "
|
8
|
-
And the output should contain "
|
9
|
-
And the output should contain "
|
10
|
-
And the output should contain "
|
11
|
-
And the output should contain "
|
12
|
-
And the output should contain "
|
13
|
-
And the output should contain "
|
14
|
-
And the output should contain "
|
6
|
+
And the output should contain "gcli repo branches"
|
7
|
+
And the output should contain "gcli repo contribs"
|
8
|
+
And the output should contain "gcli repo create"
|
9
|
+
And the output should contain "gcli repo edit"
|
10
|
+
And the output should contain "gcli repo get"
|
11
|
+
And the output should contain "gcli repo list"
|
12
|
+
And the output should contain "gcli repo languages"
|
13
|
+
And the output should contain "gcli repo tags"
|
14
|
+
And the output should contain "gcli repo teams"
|
15
15
|
|
16
16
|
Scenario: List repositories
|
17
17
|
Given the GitHub API server:
|
18
18
|
"""
|
19
19
|
get('/users/wycats/repos') { status 200 }
|
20
20
|
"""
|
21
|
-
When I run `
|
21
|
+
When I run `gcli repo ls -u wycats`
|
22
22
|
Then the exit status should be 0
|
23
23
|
|
24
24
|
Scenario: Get repository
|
@@ -26,7 +26,7 @@ Feature: gh repository
|
|
26
26
|
"""
|
27
27
|
get('/repos/wycats/thor') { status 200 }
|
28
28
|
"""
|
29
|
-
When I run `
|
29
|
+
When I run `gcli repo get wycats thor`
|
30
30
|
Then the exit status should be 0
|
31
31
|
|
32
32
|
Scenario: List repository contributors
|
@@ -36,7 +36,7 @@ Feature: gh repository
|
|
36
36
|
status 200
|
37
37
|
}
|
38
38
|
"""
|
39
|
-
When I run `
|
39
|
+
When I run `gcli repo contribs wycats thor`
|
40
40
|
Then the exit status should be 0
|
41
41
|
|
42
42
|
Scenario: List repository branches
|
@@ -46,7 +46,7 @@ Feature: gh repository
|
|
46
46
|
status 200
|
47
47
|
}
|
48
48
|
"""
|
49
|
-
When I run `
|
49
|
+
When I run `gcli repo branches wycats thor`
|
50
50
|
Then the exit status should be 0
|
51
51
|
|
52
52
|
Scenario: List repository languages
|
@@ -56,7 +56,7 @@ Feature: gh repository
|
|
56
56
|
status 200
|
57
57
|
}
|
58
58
|
"""
|
59
|
-
When I run `
|
59
|
+
When I run `gcli repo languages wycats thor`
|
60
60
|
Then the exit status should be 0
|
61
61
|
|
62
62
|
Scenario: List repository teams
|
@@ -66,7 +66,7 @@ Feature: gh repository
|
|
66
66
|
status 200
|
67
67
|
}
|
68
68
|
"""
|
69
|
-
When I run `
|
69
|
+
When I run `gcli repo teams wycats thor`
|
70
70
|
Then the exit status should be 0
|
71
71
|
|
72
72
|
Scenario: List repository tags
|
@@ -76,7 +76,7 @@ Feature: gh repository
|
|
76
76
|
status 200
|
77
77
|
}
|
78
78
|
"""
|
79
|
-
When I run `
|
79
|
+
When I run `gcli repo tags wycats thor`
|
80
80
|
Then the exit status should be 0
|
81
81
|
|
82
82
|
Scenario: Create repository
|
@@ -84,7 +84,7 @@ Feature: gh repository
|
|
84
84
|
"""
|
85
85
|
post('/user/repos') { status 200 }
|
86
86
|
"""
|
87
|
-
When I run `
|
87
|
+
When I run `gcli repo create github`
|
88
88
|
Then the exit status should be 0
|
89
89
|
|
90
90
|
Scenario: Edit repository
|
@@ -92,6 +92,6 @@ Feature: gh repository
|
|
92
92
|
"""
|
93
93
|
patch('/repos/wycats/thor') { status 200 }
|
94
94
|
"""
|
95
|
-
When I run `
|
95
|
+
When I run `gcli repo edit wycats thor --params=name:thor`
|
96
96
|
Then the exit status should be 0
|
97
97
|
|