gitcycle 0.2.13 → 0.2.14
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/README.md +12 -2
- data/features/gitcycle.feature +18 -0
- data/features/steps/gitcycle_steps.rb +6 -0
- data/gitcycle.gemspec +1 -1
- data/lib/gitcycle.rb +26 -3
- metadata +4 -4
data/README.md
CHANGED
@@ -146,6 +146,13 @@ Gitcycle automatically knows if you are checking out an upstream branch:
|
|
146
146
|
Todo
|
147
147
|
----
|
148
148
|
|
149
|
+
* Conflict recording not working
|
150
|
+
* Add comment on lighthouse with issue URL
|
151
|
+
* Allow QA branches to be created from any branch and allow any issue to merge into it
|
152
|
+
* Collab fork should change gitc ready to auo merge to the parent fork. gitc pull should pull from br and parent fork. gitc push should push to your same fork.
|
153
|
+
Lighthouse ticket changes to pending-qa if ticket is not the same as the parent.
|
154
|
+
* Hook to run after gitc qa pass, so I can write a script for amit that will auto merge master into rc
|
155
|
+
* gitc merge chrisped/branch-with-reverts # to quickly revert changes
|
149
156
|
* Label issues with ticket milestone
|
150
157
|
* Issues aren't assigned to people
|
151
158
|
* Add comment on lighthouse with issue URL
|
@@ -156,5 +163,8 @@ Todo
|
|
156
163
|
* Instead of detecting CONFLICT, use error status $? != 0
|
157
164
|
* gitc ready - possibly do syntax checks
|
158
165
|
$ gitc st - shortcut
|
159
|
-
*
|
160
|
-
*
|
166
|
+
* issues aren't assigned to people
|
167
|
+
* There's still a Tagging Issue I tried to fix parseLabel http://d.pr/8eOS , Pass should remove Pending, but remove the Branch Name
|
168
|
+
* gitc qa pass 1234 # doesnt update lighthouse and screws up git issue tags
|
169
|
+
* [issue number] it marks it pending-qa and failed.. not correct. I'll take a look at this over the weekend -Tung
|
170
|
+
* gitc qa pass # since we're changing this to pass all the tickets, we need to loop through all the merged issues and update the lighthouse state to pending-qa
|
data/features/gitcycle.feature
CHANGED
@@ -183,9 +183,11 @@ Scenario: QA issue
|
|
183
183
|
When I cd to the owner repo
|
184
184
|
And I checkout master
|
185
185
|
And I execute gitcycle with "qa issue.id"
|
186
|
+
And I enter "y"
|
186
187
|
Then gitcycle runs
|
187
188
|
And output includes
|
188
189
|
"""
|
190
|
+
Do you want to create a QA branch from 'master'? (y/n)
|
189
191
|
Retrieving branch information from gitcycle.
|
190
192
|
Deleting old QA branch 'qa_master_config.user'.
|
191
193
|
Adding remote repo 'config.owner/config.repo'.
|
@@ -201,6 +203,22 @@ Scenario: QA issue
|
|
201
203
|
Type 'gitc qa fail' to reject all issues in this branch.
|
202
204
|
"""
|
203
205
|
|
206
|
+
Scenario: QA issue pass
|
207
|
+
When I cd to the owner repo
|
208
|
+
And I checkout qa_master_config.user
|
209
|
+
And I execute gitcycle with "qa pass"
|
210
|
+
Then gitcycle runs
|
211
|
+
And output includes
|
212
|
+
"""
|
213
|
+
Retrieving branch information from gitcycle.
|
214
|
+
Checking out branch 'master'.
|
215
|
+
Adding remote repo 'config.user/config.repo'.
|
216
|
+
Fetching remote 'config.user'.
|
217
|
+
Merging remote branch 'ticket.id' from 'config.user/config.repo'.
|
218
|
+
Pushing branch 'master'.
|
219
|
+
Labeling all issues as 'Pass'.
|
220
|
+
"""
|
221
|
+
|
204
222
|
Scenario: QA issue list
|
205
223
|
When I cd to the owner repo
|
206
224
|
And I checkout master
|
@@ -175,6 +175,12 @@ Then /^gitcycle runs$/ do
|
|
175
175
|
end
|
176
176
|
end
|
177
177
|
|
178
|
+
Then /^gitcycle runs with exit$/ do
|
179
|
+
$execute.each do |cmd|
|
180
|
+
lambda { run_gitcycle(cmd) }.should raise_error SystemExit
|
181
|
+
end
|
182
|
+
end
|
183
|
+
|
178
184
|
Then /^gitcycle\.yml should be valid$/ do
|
179
185
|
gitcycle = YAML.load(File.read(GITCYCLE))
|
180
186
|
|
data/gitcycle.gemspec
CHANGED
data/lib/gitcycle.rb
CHANGED
@@ -595,8 +595,14 @@ class Gitcycle
|
|
595
595
|
if options[:qa_branch]
|
596
596
|
qa_branch = options[:qa_branch]
|
597
597
|
else
|
598
|
+
source = branches(:current => true)
|
599
|
+
|
600
|
+
unless yes?("\nDo you want to create a QA branch from '#{source}'?")
|
601
|
+
source = q("What branch would you like to base this QA branch off of?")
|
602
|
+
end
|
603
|
+
|
598
604
|
puts "\nRetrieving branch information from gitcycle.\n".green
|
599
|
-
qa_branch = get('qa_branch', 'issues' => issues)
|
605
|
+
qa_branch = get('qa_branch', 'issues' => issues, 'source' => source)
|
600
606
|
end
|
601
607
|
|
602
608
|
source = qa_branch['source']
|
@@ -623,16 +629,22 @@ class Gitcycle
|
|
623
629
|
puts "\n"
|
624
630
|
end
|
625
631
|
|
632
|
+
warnings = {}
|
633
|
+
|
626
634
|
qa_branch['branches'][range].each do |branch|
|
627
635
|
issue = branch['issue']
|
628
636
|
owner, repo = branch['repo'].split(':')
|
629
637
|
home = branch['home']
|
630
|
-
|
638
|
+
|
639
|
+
if source != branch['source']
|
640
|
+
warnings[branch['source']] ||= []
|
641
|
+
warnings[branch['source']] << branch['issue']
|
642
|
+
end
|
631
643
|
|
632
644
|
output = merge_remote_branch(
|
633
645
|
:owner => home,
|
634
646
|
:repo => repo,
|
635
|
-
:branch => branch,
|
647
|
+
:branch => branch['branch'],
|
636
648
|
:issue => issue,
|
637
649
|
:issues => qa_branch['branches'].collect { |b| b['issue'] },
|
638
650
|
:type => :to_qa
|
@@ -641,6 +653,17 @@ class Gitcycle
|
|
641
653
|
|
642
654
|
puts "\nType '".yellow + "gitc qa pass".green + "' to approve all issues in this branch.\n".yellow
|
643
655
|
puts "Type '".yellow + "gitc qa fail".red + "' to reject all issues in this branch.\n".yellow
|
656
|
+
|
657
|
+
unless warnings.empty?
|
658
|
+
puts "\n#{"WARNING:".red} If you pass this QA branch, the following branches will merge into '#{source.yellow}':\n"
|
659
|
+
|
660
|
+
warnings.each do |(branch, issues)|
|
661
|
+
issues.collect! { |issue| "##{issue}" }
|
662
|
+
puts " #{branch.yellow} (#{issues.join(', ')})"
|
663
|
+
end
|
664
|
+
|
665
|
+
puts "\nBe sure this is correct!\n".yellow
|
666
|
+
end
|
644
667
|
end
|
645
668
|
end
|
646
669
|
end
|
metadata
CHANGED
@@ -1,13 +1,13 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitcycle
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
hash:
|
4
|
+
hash: 11
|
5
5
|
prerelease:
|
6
6
|
segments:
|
7
7
|
- 0
|
8
8
|
- 2
|
9
|
-
-
|
10
|
-
version: 0.2.
|
9
|
+
- 14
|
10
|
+
version: 0.2.14
|
11
11
|
platform: ruby
|
12
12
|
authors:
|
13
13
|
- Winton Welsh
|
@@ -15,7 +15,7 @@ autorequire:
|
|
15
15
|
bindir: bin
|
16
16
|
cert_chain: []
|
17
17
|
|
18
|
-
date: 2012-02-
|
18
|
+
date: 2012-02-13 00:00:00 -08:00
|
19
19
|
default_executable:
|
20
20
|
dependencies:
|
21
21
|
- !ruby/object:Gem::Dependency
|