gitcycle 0.2.27 → 0.2.28
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/gitcycle.gemspec +1 -1
- data/lib/gitcycle.rb +30 -4
- metadata +2 -2
data/gitcycle.gemspec
CHANGED
data/lib/gitcycle.rb
CHANGED
|
@@ -316,9 +316,13 @@ class Gitcycle
|
|
|
316
316
|
if branch['collab']
|
|
317
317
|
puts "\nPushing branch '#{branch['home']}/#{branch['name']}'.\n".green
|
|
318
318
|
run("git push #{branch['home']} #{branch['name']} -q")
|
|
319
|
-
|
|
319
|
+
elsif branch
|
|
320
320
|
puts "\nPushing branch 'origin/#{branch['name']}'.\n".green
|
|
321
321
|
run("git push origin #{branch['name']} -q")
|
|
322
|
+
else
|
|
323
|
+
current_branch = branches(:current => true)
|
|
324
|
+
puts "\nPushing branch 'origin/#{current_branch}'.\n".green
|
|
325
|
+
run("git push origin #{current_branch} -q")
|
|
322
326
|
end
|
|
323
327
|
end
|
|
324
328
|
|
|
@@ -360,6 +364,7 @@ class Gitcycle
|
|
|
360
364
|
elsif branch =~ /^qa_/
|
|
361
365
|
puts "\nRetrieving branch information from gitcycle.\n".green
|
|
362
366
|
qa_branch = get('qa_branch', :source => branch.gsub(/^qa_/, ''))
|
|
367
|
+
qa_branch_name = "qa_#{qa_branch['source']}_#{qa_branch['user']}"
|
|
363
368
|
|
|
364
369
|
if pass_fail == 'pass'
|
|
365
370
|
checkout_or_track(:name => qa_branch['source'], :remote => 'origin')
|
|
@@ -375,10 +380,28 @@ class Gitcycle
|
|
|
375
380
|
|
|
376
381
|
if pass_fail == 'pass' && issues.empty?
|
|
377
382
|
owner, repo = qa_branch['repo'].split(':')
|
|
383
|
+
|
|
384
|
+
qa_branch['branches'].each do |b|
|
|
385
|
+
repo = b['repo'].split(':')[1]
|
|
386
|
+
|
|
387
|
+
add_remote_and_fetch(
|
|
388
|
+
:owner => b['home'],
|
|
389
|
+
:repo => repo
|
|
390
|
+
)
|
|
391
|
+
|
|
392
|
+
output = run("git log #{qa_branch_name}..#{b['home']}/#{repo}")
|
|
393
|
+
|
|
394
|
+
unless output.strip.empty?
|
|
395
|
+
puts "\nUn-merged changes detected in '#{repo}/#{b['home']}':".red
|
|
396
|
+
puts "\n#{output}"
|
|
397
|
+
puts "\nTo merge the change: git merge #{repo}/#{b['home']}".yellow
|
|
398
|
+
end
|
|
399
|
+
end
|
|
400
|
+
|
|
378
401
|
merge_remote_branch(
|
|
379
402
|
:owner => owner,
|
|
380
403
|
:repo => repo,
|
|
381
|
-
:branch =>
|
|
404
|
+
:branch => qa_branch_name,
|
|
382
405
|
:type => :from_qa
|
|
383
406
|
)
|
|
384
407
|
end
|
|
@@ -448,8 +471,11 @@ class Gitcycle
|
|
|
448
471
|
branch = pull
|
|
449
472
|
|
|
450
473
|
if branch && !branch['collab']
|
|
451
|
-
|
|
452
|
-
branch
|
|
474
|
+
# Recreate pull request if force == true
|
|
475
|
+
force = branch['labels'] && branch['labels'].include?('Pass')
|
|
476
|
+
force ||= branch['state'] && branch['state'] == 'closed'
|
|
477
|
+
|
|
478
|
+
branch = create_pull_request(branch, force)
|
|
453
479
|
end
|
|
454
480
|
|
|
455
481
|
if branch == false
|
metadata
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
|
2
2
|
name: gitcycle
|
|
3
3
|
version: !ruby/object:Gem::Version
|
|
4
|
-
version: 0.2.
|
|
4
|
+
version: 0.2.28
|
|
5
5
|
prerelease:
|
|
6
6
|
platform: ruby
|
|
7
7
|
authors:
|
|
@@ -9,7 +9,7 @@ authors:
|
|
|
9
9
|
autorequire:
|
|
10
10
|
bindir: bin
|
|
11
11
|
cert_chain: []
|
|
12
|
-
date: 2012-10-
|
|
12
|
+
date: 2012-10-21 00:00:00.000000000 Z
|
|
13
13
|
dependencies:
|
|
14
14
|
- !ruby/object:Gem::Dependency
|
|
15
15
|
name: cucumber
|