octopolo 1.5.2 → 1.5.3
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.travis.yml +1 -1
- data/CHANGELOG.markdown +6 -0
- data/lib/octopolo/scripts/deployable.rb +6 -13
- data/lib/octopolo/version.rb +1 -1
- data/octopolo.gemspec +1 -0
- data/spec/octopolo/scripts/deployable_spec.rb +7 -8
- metadata +17 -2
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 4330e2b0cb3d14e82b15bb69dcd74828dd7461c5
|
4
|
+
data.tar.gz: f4952a0a8428fda3a22e66ffad602233bfb4028c
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bb55714ef20937deb3fd455762d3b9aa6a2b9bc5f8d6145a326589b1d2929d6ee7c61b66b859652209fb1be0feaa0b5c4bcfe5e75044764be6af49b62f1229d5
|
7
|
+
data.tar.gz: a04932843c942b34aa80f361bbdbdc410380131d91684a3ecdaf2c8304b4a38ec58e271d0021df02d3065530fb0abbaed52d5c7a5e7ebaad8d717a4d1c5b3b6c
|
data/.travis.yml
CHANGED
data/CHANGELOG.markdown
CHANGED
@@ -35,28 +35,21 @@ module Octopolo
|
|
35
35
|
CLI.say 'Pull request status checks have not passed. Cannot be marked deployable.'
|
36
36
|
exit!
|
37
37
|
end
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
end
|
42
|
-
else
|
43
|
-
merge
|
44
|
-
end
|
38
|
+
|
39
|
+
merge_result = merge
|
40
|
+
add_deployable_label if config.deployable_label && merge_result
|
45
41
|
end
|
46
42
|
end
|
47
43
|
|
48
44
|
def merge
|
49
|
-
PullRequestMerger.
|
45
|
+
PullRequestMerger.new(Git::DEPLOYABLE_PREFIX, Integer(@pull_request_id), :user_notifications => config.user_notifications).perform
|
50
46
|
end
|
51
47
|
private :merge
|
52
48
|
|
53
|
-
def
|
49
|
+
def add_deployable_label
|
54
50
|
pull_request.add_labels(Deployable.deployable_label)
|
55
|
-
unless yield
|
56
|
-
pull_request.remove_labels(Deployable.deployable_label)
|
57
|
-
end
|
58
51
|
end
|
59
|
-
private :
|
52
|
+
private :add_deployable_label
|
60
53
|
|
61
54
|
def deployable?
|
62
55
|
pull_request.mergeable? && pull_request.status_checks_passed?
|
data/lib/octopolo/version.rb
CHANGED
data/octopolo.gemspec
CHANGED
@@ -26,6 +26,7 @@ Gem::Specification.new do |gem|
|
|
26
26
|
gem.add_dependency 'semantic', '~> 1.3'
|
27
27
|
|
28
28
|
gem.add_development_dependency 'rake', '~> 10.1'
|
29
|
+
gem.add_development_dependency 'bundler', '~> 1.16'
|
29
30
|
gem.add_development_dependency 'rspec', '~> 2.99'
|
30
31
|
gem.add_development_dependency 'guard', '~> 2.6'
|
31
32
|
gem.add_development_dependency 'guard-rspec', '~> 4.3'
|
@@ -19,7 +19,7 @@ module Octopolo
|
|
19
19
|
allow(subject).to receive(:cli) { cli }
|
20
20
|
allow(subject).to receive(:config) { config }
|
21
21
|
allow(Octopolo::GitHub::PullRequest).to receive(:new) { pull_request }
|
22
|
-
|
22
|
+
allow_any_instance_of(PullRequestMerger).to receive(:perform) { true }
|
23
23
|
allow(Octopolo::GitHub).to receive(:check_connection) { true }
|
24
24
|
end
|
25
25
|
|
@@ -43,7 +43,7 @@ module Octopolo
|
|
43
43
|
end
|
44
44
|
|
45
45
|
it "takes the pull requests ID from the current branch" do
|
46
|
-
PullRequestMerger.
|
46
|
+
expect_any_instance_of(PullRequestMerger).to receive(:perform)
|
47
47
|
end
|
48
48
|
end
|
49
49
|
|
@@ -67,17 +67,17 @@ module Octopolo
|
|
67
67
|
|
68
68
|
context "when merge to deployable fails" do
|
69
69
|
before do
|
70
|
-
|
70
|
+
allow_any_instance_of(PullRequestMerger).to receive(:perform) { false }
|
71
71
|
end
|
72
72
|
|
73
|
-
it "
|
74
|
-
pull_request.
|
73
|
+
it "does not add any labels" do
|
74
|
+
pull_request.should_not_receive(:add_labels)
|
75
75
|
end
|
76
76
|
end
|
77
77
|
|
78
78
|
context "when the merge to deployable succeeds" do
|
79
|
-
it "
|
80
|
-
pull_request.
|
79
|
+
it "adds a label" do
|
80
|
+
pull_request.should_receive(:add_labels)
|
81
81
|
end
|
82
82
|
end
|
83
83
|
|
@@ -134,7 +134,6 @@ module Octopolo
|
|
134
134
|
pull_request.should_receive(:add_labels)
|
135
135
|
end
|
136
136
|
end
|
137
|
-
|
138
137
|
end
|
139
138
|
end
|
140
139
|
end
|
metadata
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: octopolo
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 1.5.
|
4
|
+
version: 1.5.3
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Patrick Byrne
|
@@ -10,7 +10,7 @@ authors:
|
|
10
10
|
autorequire:
|
11
11
|
bindir: bin
|
12
12
|
cert_chain: []
|
13
|
-
date: 2018-
|
13
|
+
date: 2018-03-26 00:00:00.000000000 Z
|
14
14
|
dependencies:
|
15
15
|
- !ruby/object:Gem::Dependency
|
16
16
|
name: gli
|
@@ -138,6 +138,20 @@ dependencies:
|
|
138
138
|
- - "~>"
|
139
139
|
- !ruby/object:Gem::Version
|
140
140
|
version: '10.1'
|
141
|
+
- !ruby/object:Gem::Dependency
|
142
|
+
name: bundler
|
143
|
+
requirement: !ruby/object:Gem::Requirement
|
144
|
+
requirements:
|
145
|
+
- - "~>"
|
146
|
+
- !ruby/object:Gem::Version
|
147
|
+
version: '1.16'
|
148
|
+
type: :development
|
149
|
+
prerelease: false
|
150
|
+
version_requirements: !ruby/object:Gem::Requirement
|
151
|
+
requirements:
|
152
|
+
- - "~>"
|
153
|
+
- !ruby/object:Gem::Version
|
154
|
+
version: '1.16'
|
141
155
|
- !ruby/object:Gem::Dependency
|
142
156
|
name: rspec
|
143
157
|
requirement: !ruby/object:Gem::Requirement
|
@@ -206,6 +220,7 @@ extensions: []
|
|
206
220
|
extra_rdoc_files: []
|
207
221
|
files:
|
208
222
|
- ".gitignore"
|
223
|
+
- ".octopolo.yml"
|
209
224
|
- ".ruby-gemset"
|
210
225
|
- ".ruby-version"
|
211
226
|
- ".soyuz.yml"
|