github-trello-cl 0.1.0 → 0.1.1
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/.gitignore +2 -0
- data/Gemfile.lock +1 -1
- data/lib/trello.rb +16 -6
- data/trello.gemspec +1 -1
- metadata +1 -1
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 3d8c3748affea4f9c281643cc092098208ce9533
|
4
|
+
data.tar.gz: 471b00a6f2755d8a98a53b237f3dbed89aa95859
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 6e98ae8053c27fbf46c39fae697b62e7f19af65043517d43cbb3802f5cc52f9e78b3a2e926819809a5516cbc17d881ad7d56c549746673029acf51189c28308a
|
7
|
+
data.tar.gz: 2879f574dcf772741bc738e224d61b4c0dd4470c779365fb466d75ad1e31270b1e3be3e730d5f58fbad9b7d01c546dbb563271e1060c033d16b9b7a1f9c49bb0
|
data/.gitignore
CHANGED
data/Gemfile.lock
CHANGED
data/lib/trello.rb
CHANGED
@@ -153,7 +153,8 @@ module Trello
|
|
153
153
|
command :start do |c|
|
154
154
|
c.syntax = 'trello start 123 <branch>'
|
155
155
|
c.description = "Marks the specified card as 'in development' on Trello and associates the specified branch with the card."
|
156
|
-
c.option '--
|
156
|
+
c.option '--hotfix', 'Starts the card as a hotfix branch instead of a feature branch.'
|
157
|
+
c.option '--no-branch', 'Starts the card without creating a new branch.'
|
157
158
|
c.action do |args, options|
|
158
159
|
card_number, branch = args
|
159
160
|
|
@@ -161,13 +162,22 @@ module Trello
|
|
161
162
|
|
162
163
|
user = config['user']
|
163
164
|
|
164
|
-
unless
|
165
|
-
|
166
|
-
|
165
|
+
unless options['no-branch']
|
166
|
+
unless branch
|
167
|
+
abort 'You need a branch name. To start this card without a branch, set the --no-branch flag (-n).'
|
168
|
+
end
|
169
|
+
|
170
|
+
branch_prefix = options.hotfix ? 'hotfix' : 'feature'
|
171
|
+
prefixed_branch = "#{branch_prefix}/#{branch}"
|
167
172
|
|
168
|
-
|
173
|
+
unless system "git flow #{branch_prefix} start #{branch}"
|
174
|
+
abort "Failed to create branch locally - exiting."
|
175
|
+
end
|
176
|
+
end
|
169
177
|
|
170
|
-
|
178
|
+
response = Api::Integration.make_call(:post, "cards/#{card_number}/start", {user: user, branch: (options['no-branch'] ? nil : prefixed_branch)})
|
179
|
+
if response.success?
|
180
|
+
say "Started card #{card_number} with branch #{prefixed_branch}."
|
171
181
|
end
|
172
182
|
end
|
173
183
|
|
data/trello.gemspec
CHANGED
@@ -2,7 +2,7 @@ $LOAD_PATH << File.expand_path('../lib', __FILE__)
|
|
2
2
|
|
3
3
|
Gem::Specification.new do |s|
|
4
4
|
s.name = 'github-trello-cl'
|
5
|
-
s.version = '0.1.
|
5
|
+
s.version = '0.1.1'
|
6
6
|
s.date = '2015-02-23'
|
7
7
|
s.summary = "Interface with trello"
|
8
8
|
s.description = "A tool to allow people using Trello as a workflow to interface with it via command line access to an API"
|