lita-github 0.0.16 → 0.1.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.
- checksums.yaml +4 -4
- data/.rubocop.yml +2 -0
- data/.travis.yml +3 -0
- data/lib/lita-github/version.rb +1 -1
- data/lib/lita/handlers/github_org.rb +15 -5
- data/lib/lita/handlers/github_pr.rb +3 -1
- data/lib/lita/handlers/github_repo.rb +9 -3
- data/lita-github.gemspec +2 -2
- data/spec/spec_helper.rb +2 -0
- data/spec/unit/lita/handlers/github_issues_spec.rb +6 -6
- data/spec/unit/lita/handlers/github_org_spec.rb +22 -22
- data/spec/unit/lita/handlers/github_pr_spec.rb +10 -10
- data/spec/unit/lita/handlers/github_repo_spec.rb +33 -33
- data/spec/unit/lita/handlers/github_spec.rb +6 -6
- metadata +7 -7
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: bd7cf1b35725c7ee19e36efdd1c4717ead4e7dfd
|
|
4
|
+
data.tar.gz: dc58dac08313f2ec192911ca292681b146068297
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 1f5e87d33ffe37ca8ab4f1b584e32766b649d7a440e7252702d8b27584ea0dcc31e997a446515e7f09ab57daf62290fb03591bfc22578c6d2e146d122d3c4cfd
|
|
7
|
+
data.tar.gz: 5f7337752aa592d3c56941cd3ffe4e9e891262875e9e774863e74401b295ac13b7ac800bf9b19fac8d1e03f7ccb5530b59646b0831ebf2e5865220b9397ef8a4
|
data/.rubocop.yml
CHANGED
data/.travis.yml
CHANGED
data/lib/lita-github/version.rb
CHANGED
|
@@ -21,7 +21,7 @@
|
|
|
21
21
|
# @author Tim Heckman <tim@pagerduty.com>
|
|
22
22
|
module LitaGithub
|
|
23
23
|
# lita-github version
|
|
24
|
-
VERSION = '0.0
|
|
24
|
+
VERSION = '0.1.0'
|
|
25
25
|
|
|
26
26
|
# lita-github version split amongst different revisions
|
|
27
27
|
MAJOR_VERSION, MINOR_VERSION, REVISION = VERSION.split('.').map(&:to_i)
|
|
@@ -50,7 +50,9 @@ module Lita
|
|
|
50
50
|
route(
|
|
51
51
|
# /#{LitaGithub::R::A_REG}org\s+?team\s+?add(?<org>\s+?[a-zA-Z0-9_\-]+)?(?<perm>\s+?[a-zA-Z]+)\s+?(?<name>.*)$/,
|
|
52
52
|
/#{LitaGithub::R::A_REG}org\s+?team\s+?add(?<org>\s+?[a-zA-Z0-9_\-]+)?/,
|
|
53
|
-
:org_team_add,
|
|
53
|
+
:org_team_add,
|
|
54
|
+
command: true,
|
|
55
|
+
confirmation: true,
|
|
54
56
|
help: {
|
|
55
57
|
'gh org team add PagerDuty name:"All Employees" perms:pull' => 'add an "All Engineers" team with pull permissions',
|
|
56
58
|
'gh org team add PagerDuty name:Leads perms:pull' => 'add a "Leads" team with admin permissions',
|
|
@@ -61,7 +63,9 @@ module Lita
|
|
|
61
63
|
|
|
62
64
|
route(
|
|
63
65
|
/#{LitaGithub::R::A_REG}org\s+?team\s+?rm(?<org>\s+?[a-zA-Z0-9_\-]+)?(?<team>\s+?[a-zA-Z0-9_\-]+)/,
|
|
64
|
-
:org_team_rm,
|
|
66
|
+
:org_team_rm,
|
|
67
|
+
command: true,
|
|
68
|
+
confirmation: true,
|
|
65
69
|
help: {
|
|
66
70
|
'gh org team rm PagerDuty ops' => 'delete the Operations team',
|
|
67
71
|
'gh org team rm PagerDuty 42' => 'delete the team with id 42'
|
|
@@ -71,7 +75,9 @@ module Lita
|
|
|
71
75
|
# rubocop:disable Metrics/LineLength
|
|
72
76
|
route(
|
|
73
77
|
/#{LitaGithub::R::A_REG}org\s+?user\s+?add(?<org>\s+?[a-zA-Z0-9_\-]+)?(?<team>\s?[a-zA-Z0-9_\-]+)\s+?(?<username>[a-zA-Z0-9_\-]+)/,
|
|
74
|
-
:org_user_add,
|
|
78
|
+
:org_user_add,
|
|
79
|
+
command: true,
|
|
80
|
+
confirmation: { allow_self: false },
|
|
75
81
|
help: {
|
|
76
82
|
'gh org user add PagerDuty everyone theckman' => 'add the user theckman to the PagerDuty/everyone team -- this requires confirmation from another user. NOTE: This will add the member to the organization if they are not already!!',
|
|
77
83
|
'gh org user add PagerDuty 42 theckman' => "same as above, except with the team's ID instead of the slug"
|
|
@@ -80,7 +86,9 @@ module Lita
|
|
|
80
86
|
|
|
81
87
|
route(
|
|
82
88
|
/#{LitaGithub::R::A_REG}org\s+?user\s+?rm(?<org>\s+?[a-zA-Z0-9_\-]+)?(?<team>\s?[a-zA-Z0-9_\-]+)\s+?(?<username>[a-zA-Z0-9_\-]+)/,
|
|
83
|
-
:org_user_rm,
|
|
89
|
+
:org_user_rm,
|
|
90
|
+
comamnd: true,
|
|
91
|
+
confirmation: { allow_self: false },
|
|
84
92
|
help: {
|
|
85
93
|
'gh org team rm PagerDuty everyone theckman' => 'remove the user theckman from the PagerDuty/everyone team, if this is their last team will remove them from the org. Requires confirmation from another user.',
|
|
86
94
|
'gh org team rm PagerDuty 42 theckman' => "same as above, except with the team's ID instead of the slug"
|
|
@@ -90,7 +98,9 @@ module Lita
|
|
|
90
98
|
|
|
91
99
|
route(
|
|
92
100
|
/#{LitaGithub::R::A_REG}org\s+?eject(?<org>\s+?[a-zA-Z0-9_\-]+)?(?<username>\s+?[a-zA-Z0-9_\-]+)/,
|
|
93
|
-
:org_eject_user,
|
|
101
|
+
:org_eject_user,
|
|
102
|
+
command: true,
|
|
103
|
+
confirmation: { allow_self: false },
|
|
94
104
|
help: {
|
|
95
105
|
'gh org eject PagerDuty theckman' => 'forcibly removes the user from all groups in the organization -- ' \
|
|
96
106
|
'this is meant for someone leaving the organization. Requires ' \
|
|
@@ -44,7 +44,9 @@ module Lita
|
|
|
44
44
|
|
|
45
45
|
route(
|
|
46
46
|
/(?:#{LitaGithub::R::A_REG}(?:pr merge|shipit)|shipit)\s+?#{LitaGithub::R::REPO_REGEX}\s+?#(?<pr>\d+?)$/,
|
|
47
|
-
:pr_merge,
|
|
47
|
+
:pr_merge,
|
|
48
|
+
command: true,
|
|
49
|
+
confirmation: true,
|
|
48
50
|
help: {
|
|
49
51
|
'gh shipit PagerDuty/lita-github #42' => 'ship it!',
|
|
50
52
|
'gh pr merge PagerDuty/lita-github #42' => 'ship it!',
|
|
@@ -51,7 +51,9 @@ module Lita
|
|
|
51
51
|
|
|
52
52
|
route(
|
|
53
53
|
/#{LitaGithub::R::A_REG}repo\s+?delete\s+?#{LitaGithub::R::REPO_REGEX}/,
|
|
54
|
-
:repo_delete,
|
|
54
|
+
:repo_delete,
|
|
55
|
+
command: true,
|
|
56
|
+
confirmation: true,
|
|
55
57
|
help: {
|
|
56
58
|
'gh repo delete PagerDuty/lita-github' => 'Delete the PagerDuty/lita-github repo'
|
|
57
59
|
}
|
|
@@ -79,7 +81,9 @@ module Lita
|
|
|
79
81
|
# rubocop:disable Metrics/LineLength
|
|
80
82
|
route(
|
|
81
83
|
/#{LitaGithub::R::A_REG}repo\s+?team\s+?(?<action>add|rm)\s+?(?<team>[a-zA-Z0-9_\-]+?)(\s+?to)?\s+?#{LitaGithub::R::REPO_REGEX}/,
|
|
82
|
-
:repo_team_router,
|
|
84
|
+
:repo_team_router,
|
|
85
|
+
command: true,
|
|
86
|
+
confirmation: true,
|
|
83
87
|
help: {
|
|
84
88
|
'gh repo team add everyone PagerDuty/lita-test' => 'add a team using slug to your repo',
|
|
85
89
|
'gh repo team add 42 PagerDuty/lita-test' => 'add a team using ID to your repo',
|
|
@@ -90,7 +94,9 @@ module Lita
|
|
|
90
94
|
|
|
91
95
|
route(
|
|
92
96
|
/#{LitaGithub::R::A_REG}repo\s+update\s+?(?<field>description|homepage)\s+?#{LitaGithub::R::REPO_REGEX}\s+?(?<content>.*)$/,
|
|
93
|
-
:repo_update_router,
|
|
97
|
+
:repo_update_router,
|
|
98
|
+
command: true,
|
|
99
|
+
confirmation: true,
|
|
94
100
|
help: {
|
|
95
101
|
'gh repo description PagerDuty/lita-github' => 'get the repo description'
|
|
96
102
|
}
|
data/lita-github.gemspec
CHANGED
|
@@ -37,14 +37,14 @@ Gem::Specification.new do |s|
|
|
|
37
37
|
|
|
38
38
|
s.add_development_dependency 'bundler', '~> 1.5'
|
|
39
39
|
s.add_development_dependency 'rake', '~> 10.2'
|
|
40
|
-
s.add_development_dependency 'rubocop', '~> 0.
|
|
40
|
+
s.add_development_dependency 'rubocop', '~> 0.28.0'
|
|
41
41
|
s.add_development_dependency 'rspec', '~> 3.0'
|
|
42
42
|
s.add_development_dependency 'fuubar', '~> 2.0'
|
|
43
43
|
s.add_development_dependency 'pry', '~> 0.10', '>= 0.10.1'
|
|
44
44
|
s.add_development_dependency 'codeclimate-test-reporter', '~> 0.4', '>= 0.4.0'
|
|
45
45
|
s.add_development_dependency 'yard', '~> 0.8.7'
|
|
46
46
|
|
|
47
|
-
s.add_runtime_dependency 'lita', '~>
|
|
47
|
+
s.add_runtime_dependency 'lita', '~> 4.0'
|
|
48
48
|
s.add_runtime_dependency 'octokit', '~> 3.3'
|
|
49
49
|
s.add_runtime_dependency 'rotp', '~> 2.0'
|
|
50
50
|
s.add_runtime_dependency 'lita-confirmation'
|
data/spec/spec_helper.rb
CHANGED
|
@@ -18,12 +18,12 @@ require 'spec_helper'
|
|
|
18
18
|
|
|
19
19
|
describe Lita::Handlers::GithubIssues, lita_handler: true do
|
|
20
20
|
# issues_list command routing
|
|
21
|
-
it {
|
|
22
|
-
it {
|
|
23
|
-
it {
|
|
24
|
-
it {
|
|
25
|
-
it {
|
|
26
|
-
it {
|
|
21
|
+
it { is_expected.to route_command('gh issues GrapeDuty/lita-test').to(:issues_list) }
|
|
22
|
+
it { is_expected.to route_command('gh issues lita-test').to(:issues_list) }
|
|
23
|
+
it { is_expected.to route_command('gh issues lita-test key:value keys:"values"').to(:issues_list) }
|
|
24
|
+
it { is_expected.to route_command('gh repo issues GrapeDuty/lita-test').to(:issues_list) }
|
|
25
|
+
it { is_expected.to route_command('gh repo issues lita-test').to(:issues_list) }
|
|
26
|
+
it { is_expected.to route_command('gh repo issues lita-test key:value keys:"values"').to(:issues_list) }
|
|
27
27
|
|
|
28
28
|
let(:gh_org) { 'GapeDuty' }
|
|
29
29
|
let(:gh_repo) { 'lita-test' }
|
|
@@ -18,38 +18,38 @@ require 'spec_helper'
|
|
|
18
18
|
|
|
19
19
|
describe Lita::Handlers::GithubOrg, lita_handler: true do
|
|
20
20
|
# org_team_list routing
|
|
21
|
-
it {
|
|
22
|
-
it {
|
|
23
|
-
it {
|
|
24
|
-
it {
|
|
25
|
-
it {
|
|
26
|
-
it {
|
|
21
|
+
it { is_expected.to route_command('gh teams PagerDuty').to(:org_teams_list) }
|
|
22
|
+
it { is_expected.to route_command('gh org teams GrapeDuty').to(:org_teams_list) }
|
|
23
|
+
it { is_expected.to route_command('gh org team list GrapeDuty').to(:org_teams_list) }
|
|
24
|
+
it { is_expected.to route_command('gh teams').to(:org_teams_list) }
|
|
25
|
+
it { is_expected.to route_command('gh org teams').to(:org_teams_list) }
|
|
26
|
+
it { is_expected.to route_command('gh org team list').to(:org_teams_list) }
|
|
27
27
|
|
|
28
28
|
# org_team_add routing
|
|
29
|
-
it {
|
|
30
|
-
it {
|
|
29
|
+
it { is_expected.to route_command('gh org team add GrapeDuty name:"All Staff" perms:pull').to(:org_team_add) }
|
|
30
|
+
it { is_expected.to route_command('gh org team add name:"All Staff" perms:pull').to(:org_team_add) }
|
|
31
31
|
|
|
32
32
|
# org_team_rm routing
|
|
33
|
-
it {
|
|
34
|
-
it {
|
|
35
|
-
it {
|
|
36
|
-
it {
|
|
33
|
+
it { is_expected.to route_command('gh org team rm GrapeDuty ops').to(:org_team_rm) }
|
|
34
|
+
it { is_expected.to route_command('gh org team rm GrapeDuty 42').to(:org_team_rm) }
|
|
35
|
+
it { is_expected.to route_command('gh org team rm ops').to(:org_team_rm) }
|
|
36
|
+
it { is_expected.to route_command('gh org team rm 42').to(:org_team_rm) }
|
|
37
37
|
|
|
38
38
|
# org_user_add routing
|
|
39
|
-
it {
|
|
40
|
-
it {
|
|
41
|
-
it {
|
|
42
|
-
it {
|
|
39
|
+
it { is_expected.to route_command('gh org user add GrapeDuty heckmantest theckman').to(:org_user_add) }
|
|
40
|
+
it { is_expected.to route_command('gh org user add heckmantest theckman').to(:org_user_add) }
|
|
41
|
+
it { is_expected.to route_command('gh org user add GrapeDuty 42 theckman').to(:org_user_add) }
|
|
42
|
+
it { is_expected.to route_command('gh org user add 42 theckman').to(:org_user_add) }
|
|
43
43
|
|
|
44
44
|
# org_user_rm routing
|
|
45
|
-
it {
|
|
46
|
-
it {
|
|
47
|
-
it {
|
|
48
|
-
it {
|
|
45
|
+
it { is_expected.to route_command('gh org user rm GrapeDuty heckmantest theckman').to(:org_user_rm) }
|
|
46
|
+
it { is_expected.to route_command('gh org user rm heckmantest theckman').to(:org_user_rm) }
|
|
47
|
+
it { is_expected.to route_command('gh org user rm GrapeDuty 42 theckman').to(:org_user_rm) }
|
|
48
|
+
it { is_expected.to route_command('gh org user rm 42 theckman').to(:org_user_rm) }
|
|
49
49
|
|
|
50
50
|
# org_eject_user routing
|
|
51
|
-
it {
|
|
52
|
-
it {
|
|
51
|
+
it { is_expected.to route_command('gh org eject GrapeDuty theckman').to(:org_eject_user) }
|
|
52
|
+
it { is_expected.to route_command('gh org eject theckman').to(:org_eject_user) }
|
|
53
53
|
|
|
54
54
|
let(:github_org) { Lita::Handlers::GithubOrg.new('robot') }
|
|
55
55
|
let(:disabled_err) { 'Sorry, this function has either been disabled or not enabled in the config' }
|
|
@@ -18,20 +18,20 @@ require 'spec_helper'
|
|
|
18
18
|
|
|
19
19
|
describe Lita::Handlers::GithubPR, lita_handler: true do
|
|
20
20
|
# pr_merge command routing
|
|
21
|
-
it {
|
|
22
|
-
it {
|
|
23
|
-
it {
|
|
24
|
-
it {
|
|
25
|
-
it {
|
|
26
|
-
it {
|
|
21
|
+
it { is_expected.to route_command('gh shipit GrapeDuty/lita-test #42').to(:pr_merge) }
|
|
22
|
+
it { is_expected.to route_command('gh shipit lita-test #42').to(:pr_merge) }
|
|
23
|
+
it { is_expected.to route_command('gh pr merge lita-test #42').to(:pr_merge) }
|
|
24
|
+
it { is_expected.to route_command('gh pr merge GrapeDuty/lita-test #42').to(:pr_merge) }
|
|
25
|
+
it { is_expected.to route_command('shipit GrapeDuty/lita-test #42').to(:pr_merge) }
|
|
26
|
+
it { is_expected.to route_command('shipit lita-test #42').to(:pr_merge) }
|
|
27
27
|
|
|
28
28
|
# pr_info command routing
|
|
29
|
-
it {
|
|
30
|
-
it {
|
|
29
|
+
it { is_expected.to route_command('gh pr info GrapeDuty/lita-test #42').to(:pr_info) }
|
|
30
|
+
it { is_expected.to route_command('gh pr info lita-test #42').to(:pr_info) }
|
|
31
31
|
|
|
32
32
|
# pr_list command routing
|
|
33
|
-
it {
|
|
34
|
-
it {
|
|
33
|
+
it { is_expected.to route_command('gh pr list GrapeDuty/lita-test').to(:pr_list) }
|
|
34
|
+
it { is_expected.to route_command('gh pr list lita-test').to(:pr_list) }
|
|
35
35
|
|
|
36
36
|
let(:github_pr) { Lita::Handlers::GithubPR.new('robot') }
|
|
37
37
|
let(:github_org) { 'GrapeDuty' }
|
|
@@ -18,57 +18,57 @@ require 'spec_helper'
|
|
|
18
18
|
|
|
19
19
|
describe Lita::Handlers::GithubRepo, lita_handler: true do
|
|
20
20
|
# repo_create command routing
|
|
21
|
-
it {
|
|
22
|
-
it {
|
|
23
|
-
it {
|
|
24
|
-
it {
|
|
25
|
-
it {
|
|
21
|
+
it { is_expected.to route_command('gh repo create GrapeDuty/lita-test').to(:repo_create) }
|
|
22
|
+
it { is_expected.to route_command('gh repo new GrapeDuty/lita-test').to(:repo_create) }
|
|
23
|
+
it { is_expected.to route_command('gh repo new lita-test').to(:repo_create) }
|
|
24
|
+
it { is_expected.to route_command('gh repo new GrapeDuty/lita-test private:true team:heckman').to(:repo_create) }
|
|
25
|
+
it { is_expected.to route_command('gh repo new GrapeDuty/lita-test private:true randomunparseabletext ').to(:repo_create) }
|
|
26
26
|
|
|
27
27
|
# repo_delete command routing
|
|
28
|
-
it {
|
|
29
|
-
it {
|
|
28
|
+
it { is_expected.to route_command('gh repo delete GrapeDuty/lita-test').to(:repo_delete) }
|
|
29
|
+
it { is_expected.to route_command('gh repo delete lita-test').to(:repo_delete) }
|
|
30
30
|
|
|
31
31
|
# repo_info command routing
|
|
32
|
-
it {
|
|
33
|
-
it {
|
|
32
|
+
it { is_expected.to route_command('gh repo info GrapeDuty/lita-test').to(:repo_info) }
|
|
33
|
+
it { is_expected.to route_command('gh repo info lita-test').to(:repo_info) }
|
|
34
34
|
|
|
35
35
|
# repo_teams_list routing
|
|
36
|
-
it {
|
|
37
|
-
it {
|
|
38
|
-
it {
|
|
39
|
-
it {
|
|
36
|
+
it { is_expected.to route_command('gh repo teams GrapeDuty/lita-test').to(:repo_teams_list) }
|
|
37
|
+
it { is_expected.to route_command('gh repo team list GrapeDuty/lita-test').to(:repo_teams_list) }
|
|
38
|
+
it { is_expected.to route_command('gh repo teams lita-test').to(:repo_teams_list) }
|
|
39
|
+
it { is_expected.to route_command('gh repo team list lita-test').to(:repo_teams_list) }
|
|
40
40
|
|
|
41
41
|
# repo_team_router routing
|
|
42
|
-
it {
|
|
43
|
-
it {
|
|
44
|
-
it {
|
|
45
|
-
it {
|
|
46
|
-
it {
|
|
47
|
-
it {
|
|
48
|
-
it {
|
|
49
|
-
it {
|
|
50
|
-
it {
|
|
51
|
-
it {
|
|
52
|
-
it {
|
|
53
|
-
it {
|
|
54
|
-
it {
|
|
55
|
-
it {
|
|
56
|
-
it {
|
|
57
|
-
it {
|
|
42
|
+
it { is_expected.to route_command('gh repo team add everyone GrapeDuty/lita-test').to(:repo_team_router) }
|
|
43
|
+
it { is_expected.to route_command('gh repo team add everyone to GrapeDuty/lita-test').to(:repo_team_router) }
|
|
44
|
+
it { is_expected.to route_command('gh repo team add everyone lita-test').to(:repo_team_router) }
|
|
45
|
+
it { is_expected.to route_command('gh repo team add everyone to lita-test').to(:repo_team_router) }
|
|
46
|
+
it { is_expected.to route_command('gh repo team add 42 GrapeDuty/lita-test').to(:repo_team_router) }
|
|
47
|
+
it { is_expected.to route_command('gh repo team add 42 to GrapeDuty/lita-test').to(:repo_team_router) }
|
|
48
|
+
it { is_expected.to route_command('gh repo team add 42 lita-test').to(:repo_team_router) }
|
|
49
|
+
it { is_expected.to route_command('gh repo team add 42 to lita-test').to(:repo_team_router) }
|
|
50
|
+
it { is_expected.to route_command('gh repo team rm everyone GrapeDuty/lita-test').to(:repo_team_router) }
|
|
51
|
+
it { is_expected.to route_command('gh repo team rm everyone to GrapeDuty/lita-test').to(:repo_team_router) }
|
|
52
|
+
it { is_expected.to route_command('gh repo team rm everyone lita-test').to(:repo_team_router) }
|
|
53
|
+
it { is_expected.to route_command('gh repo team rm everyone to lita-test').to(:repo_team_router) }
|
|
54
|
+
it { is_expected.to route_command('gh repo team rm 42 GrapeDuty/lita-test').to(:repo_team_router) }
|
|
55
|
+
it { is_expected.to route_command('gh repo team rm 42 to GrapeDuty/lita-test').to(:repo_team_router) }
|
|
56
|
+
it { is_expected.to route_command('gh repo team rm 42 lita-test').to(:repo_team_router) }
|
|
57
|
+
it { is_expected.to route_command('gh repo team rm 42 to lita-test').to(:repo_team_router) }
|
|
58
58
|
|
|
59
59
|
# repo_update_router routing
|
|
60
60
|
it do
|
|
61
|
-
|
|
61
|
+
is_expected.to route_command(
|
|
62
62
|
'gh repo update homepage GrapeDuty/lita-test https://github.com/GrapeDuty/lita-test'
|
|
63
63
|
).to(:repo_update_router)
|
|
64
64
|
end
|
|
65
65
|
it do
|
|
66
|
-
|
|
66
|
+
is_expected.to route_command(
|
|
67
67
|
'gh repo update homepage lita-test https://github.com/GrapeDuty/lita-test'
|
|
68
68
|
).to(:repo_update_router)
|
|
69
69
|
end
|
|
70
|
-
it {
|
|
71
|
-
it {
|
|
70
|
+
it { is_expected.to route_command('gh repo update description GrapeDuty/lita-test Some description here').to(:repo_update_router) }
|
|
71
|
+
it { is_expected.to route_command('gh repo update description lita-test Some description here').to(:repo_update_router) }
|
|
72
72
|
|
|
73
73
|
let(:github_repo) { Lita::Handlers::GithubRepo.new('robot') }
|
|
74
74
|
let(:github_org) { 'GrapeDuty' }
|
|
@@ -20,18 +20,18 @@ describe Lita::Handlers::Github, lita_handler: true do
|
|
|
20
20
|
let(:github) { Lita::Handlers::Github.new('robot') }
|
|
21
21
|
|
|
22
22
|
# status routing
|
|
23
|
-
it {
|
|
24
|
-
it {
|
|
23
|
+
it { is_expected.to route_command('gh status').to(:status) }
|
|
24
|
+
it { is_expected.to route_command('github status').to(:status) }
|
|
25
25
|
|
|
26
26
|
# version routing
|
|
27
|
-
it {
|
|
27
|
+
it { is_expected.to route_command('gh version').to(:version) }
|
|
28
28
|
|
|
29
29
|
# token routing
|
|
30
|
-
it {
|
|
30
|
+
it { is_expected.to route_command('gh token').to(:token_generate) }
|
|
31
31
|
|
|
32
32
|
# whois routing
|
|
33
|
-
it {
|
|
34
|
-
it {
|
|
33
|
+
it { is_expected.to route_command('gh whois theckman').to(:whois) }
|
|
34
|
+
it { is_expected.to route_command('gh user theckman').to(:whois) }
|
|
35
35
|
|
|
36
36
|
describe '#default_config' do
|
|
37
37
|
it 'should set default team to nil' do
|
metadata
CHANGED
|
@@ -1,14 +1,14 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: lita-github
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.0
|
|
4
|
+
version: 0.1.0
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Tim Heckman
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2014-
|
|
11
|
+
date: 2014-12-22 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: bundler
|
|
@@ -44,14 +44,14 @@ dependencies:
|
|
|
44
44
|
requirements:
|
|
45
45
|
- - "~>"
|
|
46
46
|
- !ruby/object:Gem::Version
|
|
47
|
-
version: 0.
|
|
47
|
+
version: 0.28.0
|
|
48
48
|
type: :development
|
|
49
49
|
prerelease: false
|
|
50
50
|
version_requirements: !ruby/object:Gem::Requirement
|
|
51
51
|
requirements:
|
|
52
52
|
- - "~>"
|
|
53
53
|
- !ruby/object:Gem::Version
|
|
54
|
-
version: 0.
|
|
54
|
+
version: 0.28.0
|
|
55
55
|
- !ruby/object:Gem::Dependency
|
|
56
56
|
name: rspec
|
|
57
57
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -140,14 +140,14 @@ dependencies:
|
|
|
140
140
|
requirements:
|
|
141
141
|
- - "~>"
|
|
142
142
|
- !ruby/object:Gem::Version
|
|
143
|
-
version: '
|
|
143
|
+
version: '4.0'
|
|
144
144
|
type: :runtime
|
|
145
145
|
prerelease: false
|
|
146
146
|
version_requirements: !ruby/object:Gem::Requirement
|
|
147
147
|
requirements:
|
|
148
148
|
- - "~>"
|
|
149
149
|
- !ruby/object:Gem::Version
|
|
150
|
-
version: '
|
|
150
|
+
version: '4.0'
|
|
151
151
|
- !ruby/object:Gem::Dependency
|
|
152
152
|
name: octokit
|
|
153
153
|
requirement: !ruby/object:Gem::Requirement
|
|
@@ -257,7 +257,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
257
257
|
version: '0'
|
|
258
258
|
requirements: []
|
|
259
259
|
rubyforge_project:
|
|
260
|
-
rubygems_version: 2.
|
|
260
|
+
rubygems_version: 2.4.3
|
|
261
261
|
signing_key:
|
|
262
262
|
specification_version: 4
|
|
263
263
|
summary: GitHub repo/org management in Lita; handler not ready for production
|