bb-flow 0.3.0 → 0.3.1
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.
- checksums.yaml +4 -4
- data/CHANGELOG.md +5 -0
- data/Gemfile.lock +1 -1
- data/lib/bb_flow.rb +2 -2
- data/lib/bb_flow/pull_requester.rb +1 -11
- data/lib/bb_flow/trello.rb +10 -0
- data/lib/bb_flow/version.rb +1 -1
- metadata +2 -4
- data/bin/git-pr +0 -5
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 9e6ed3dc204478ddadb9b8cb61564fb27ff2927a
|
4
|
+
data.tar.gz: 7d06acd12287feb59d99f9c430e648e61f1b706e
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 953025e975703105b3ea538225680296659cc1178c78fd574de2469c591047e60ad539cd13acf76ebac2c527bb3be54634ac20d92f6ac81e91cc9dd3a8b0796a
|
7
|
+
data.tar.gz: 16af40a1f9a11bf61ba45464a82167a5d0e5cd7114213090fa8692fe7f9067b3fed5fd526d6925c0df00de9da6ccf64a4bd481d4d5c9881891a1e8dab2e85c95
|
data/CHANGELOG.md
CHANGED
data/Gemfile.lock
CHANGED
data/lib/bb_flow.rb
CHANGED
@@ -32,9 +32,9 @@ module BBFlow
|
|
32
32
|
when :commit
|
33
33
|
return puts Misc.execute('git commit') if Misc.execute('git diff-index HEAD --name-only --cached').empty?
|
34
34
|
|
35
|
-
message = (Options.get(:
|
35
|
+
message = (Options.get(:commit_message) || Misc.edit).strip
|
36
36
|
cards = Trello.cards
|
37
|
-
cards = Printer.select_items(cards, 'Which cards does this commit address?') unless cards.blank?
|
37
|
+
cards = Printer.select_items(cards, 'Which cards does this commit address?', formatter: Trello.method(:format_card)) unless cards.blank?
|
38
38
|
card_lines = cards.map do |card|
|
39
39
|
"Trello Card: #{card.name}, #{card.short_url}"
|
40
40
|
end.join("\n")
|
@@ -151,7 +151,7 @@ module BBFlow
|
|
151
151
|
Printer.select_items(
|
152
152
|
Trello.cards,
|
153
153
|
'Which cards does it implement?',
|
154
|
-
formatter: method(:
|
154
|
+
formatter: Trello.method(:format_card),
|
155
155
|
preselected: Trello.cards.map { |card| commit_messages.any? { |message| message.include?(card.short_url) } }
|
156
156
|
)
|
157
157
|
end
|
@@ -175,16 +175,6 @@ module BBFlow
|
|
175
175
|
|
176
176
|
labels.select { |label| Misc.git.current_branch.include?(label) || Trello.labels.include?(label) || specialized_predicates[label].call }
|
177
177
|
end
|
178
|
-
|
179
|
-
# @param [Trello::Card] card
|
180
|
-
#
|
181
|
-
# @return [Array<String>]
|
182
|
-
def format_trello_title(card)
|
183
|
-
prefix, _, title = card.name.rpartition(/(?<=\])\s*/) # At last closing square bracket.
|
184
|
-
_score, _, tags = prefix.rpartition(/(?<=\))\s*/) # After last parentheses.
|
185
|
-
|
186
|
-
[tags, title, card.short_url]
|
187
|
-
end
|
188
178
|
end
|
189
179
|
end
|
190
180
|
end
|
data/lib/bb_flow/trello.rb
CHANGED
@@ -20,6 +20,16 @@ module BBFlow
|
|
20
20
|
trello::List.find(done_list_id)
|
21
21
|
end
|
22
22
|
|
23
|
+
# @param [Trello::Card] card
|
24
|
+
#
|
25
|
+
# @return [Array<String>]
|
26
|
+
def format_card(card)
|
27
|
+
prefix, _, title = card.name.rpartition(/(?<=\])\s*/) # At last closing square bracket.
|
28
|
+
_score, _, tags = prefix.rpartition(/(?<=\))\s*/) # After last parentheses.
|
29
|
+
|
30
|
+
[tags, title, card.short_url]
|
31
|
+
end
|
32
|
+
|
23
33
|
private
|
24
34
|
|
25
35
|
# @return [Trello::Board]
|
data/lib/bb_flow/version.rb
CHANGED
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: bb-flow
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.3.
|
4
|
+
version: 0.3.1
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- gregolsen
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-01-
|
11
|
+
date: 2016-01-26 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: ansi-select
|
@@ -155,7 +155,6 @@ email:
|
|
155
155
|
- mihailov.in@gmail.com
|
156
156
|
executables:
|
157
157
|
- bb-flow
|
158
|
-
- git-pr
|
159
158
|
extensions: []
|
160
159
|
extra_rdoc_files: []
|
161
160
|
files:
|
@@ -171,7 +170,6 @@ files:
|
|
171
170
|
- Rakefile
|
172
171
|
- bb-flow.gemspec
|
173
172
|
- bin/bb-flow
|
174
|
-
- bin/git-pr
|
175
173
|
- lib/bb-flow.rb
|
176
174
|
- lib/bb_flow.rb
|
177
175
|
- lib/bb_flow/github.rb
|