thegarage-gitx 2.7.0 → 2.7.1
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 09fedfaebdd521708a24d8888081fc9fd069e6ff
|
4
|
+
data.tar.gz: 4f292966ed0b548879f59eb5462046920585a2cc
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: bc46244d36565c05ca6032ab4c8c47de3879d3972991c20b34346d1914534cb3ff4bb46526cadb672d5fa115dcbc85454548b24b8d817c9067464e8e8309cef5
|
7
|
+
data.tar.gz: 8fce08cfbe03c7dd3eeefc9a10302fe82ab0557df6840942149fa4079cae2ef41329bf30c6de4651bf726222c4ea2c887fa39a8e9d7254631704e7f73f6b067e
|
@@ -26,8 +26,7 @@ module Thegarage
|
|
26
26
|
integrate_branch(branch, integration_branch) unless options[:resume]
|
27
27
|
checkout_branch branch
|
28
28
|
|
29
|
-
|
30
|
-
create_integrate_comment(pull_request)
|
29
|
+
create_integrate_comment(branch) unless RESERVED_BRANCHES.include?(branch)
|
31
30
|
end
|
32
31
|
|
33
32
|
private
|
@@ -89,7 +88,8 @@ module Thegarage
|
|
89
88
|
run_cmd "git push origin #{target_branch}:#{target_branch}"
|
90
89
|
end
|
91
90
|
|
92
|
-
def create_integrate_comment(
|
91
|
+
def create_integrate_comment(branch)
|
92
|
+
pull_request = find_or_create_pull_request(branch)
|
93
93
|
comment = '[gitx] integrated into staging :twisted_rightwards_arrows:'
|
94
94
|
github_client.add_comment(github_slug, pull_request.number, comment)
|
95
95
|
end
|
@@ -56,6 +56,28 @@ describe Thegarage::Gitx::Cli::IntegrateCommand do
|
|
56
56
|
with(body: {body: '[gitx] integrated into staging :twisted_rightwards_arrows:'})
|
57
57
|
end
|
58
58
|
end
|
59
|
+
context 'when current_branch == master' do
|
60
|
+
let(:current_branch) { double('fake branch', name: 'master', head?: true) }
|
61
|
+
let(:local_branch_names) { ['master'] }
|
62
|
+
let(:authorization_token) { '123123' }
|
63
|
+
let(:remote_branch_names) { ['origin/staging'] }
|
64
|
+
before do
|
65
|
+
allow(cli).to receive(:authorization_token).and_return(authorization_token)
|
66
|
+
expect(fake_update_command).to receive(:update)
|
67
|
+
|
68
|
+
expect(cli).to receive(:run_cmd).with("git fetch origin").ordered
|
69
|
+
expect(cli).to receive(:run_cmd).with("git branch -D staging", allow_failure: true).ordered
|
70
|
+
expect(cli).to receive(:run_cmd).with("git checkout staging").ordered
|
71
|
+
expect(cli).to receive(:run_cmd).with("git merge master").ordered
|
72
|
+
expect(cli).to receive(:run_cmd).with("git push origin HEAD").ordered
|
73
|
+
expect(cli).to receive(:run_cmd).with("git checkout master").ordered
|
74
|
+
|
75
|
+
cli.integrate
|
76
|
+
end
|
77
|
+
it 'does not create pull request' do
|
78
|
+
expect(WebMock).to_not have_requested(:post, "https://api.github.com/repos/thegarage/thegarage-gitx/pulls")
|
79
|
+
end
|
80
|
+
end
|
59
81
|
context 'when a pull request doesnt exist for the feature-branch' do
|
60
82
|
let(:authorization_token) { '123123' }
|
61
83
|
let(:changelog) { '* made some fixes' }
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: thegarage-gitx
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 2.7.
|
4
|
+
version: 2.7.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Ryan Sonnek
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2014-
|
11
|
+
date: 2014-10-03 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: rugged
|