prima-twig 0.4.4 → 0.4.5
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/twig-deploy +3 -1
- data/bin/twig-open-pr +1 -1
- data/bin/twig-pick-issue +2 -2
- data/lib/prima_twig.rb +8 -8
- 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: a32d18fcef8d136da5db4abe503ac2d69244dfe2
|
4
|
+
data.tar.gz: 0b31818942b8e19c0685abcf8c5eb0839b7e4e4d
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 766c0b9fe36c04b6b9114e4f835daa415c375bee59bae7dac7be9472ea8c59568d936ce898dd7f0b47c40d29e9deed4c7f380184e91e2539483b92988d39e771
|
7
|
+
data.tar.gz: 4580fbe446b5ea2b1d14cd712c624e7b367c513bf62e9fa4b681bb35e4432c638321a903279fb80105218d4f81974a93b4eedf0e8a084f82c5fe3c5ea074a34a
|
data/bin/twig-deploy
CHANGED
@@ -77,7 +77,9 @@ class Review
|
|
77
77
|
|
78
78
|
output "Il comando per il deploy sara': #{deploy_command}".yellow
|
79
79
|
|
80
|
-
|
80
|
+
exit unless @prima.yesno "Sei sicuro di voler effettuare il deploy in produzione?".blue
|
81
|
+
|
82
|
+
exec_step deploy_command
|
81
83
|
|
82
84
|
stack_name_web = 'ecs-task-web-production'
|
83
85
|
stack_name_consumer = 'ecs-task-consumer-production'
|
data/bin/twig-open-pr
CHANGED
@@ -105,7 +105,7 @@ class OpenPR
|
|
105
105
|
head = @prima.current_branch_name
|
106
106
|
body = ask('Body: ')
|
107
107
|
unless @prima.twig.get_branch_property(current_branch_name, 'issue').nil?
|
108
|
-
body << " Issue di riferimento: ##{@prima.twig.get_branch_property(current_branch_name, 'issue')}"
|
108
|
+
body << " Issue di riferimento: primait/board##{@prima.twig.get_branch_property(current_branch_name, 'issue')}"
|
109
109
|
end
|
110
110
|
pr = @prima.create_pull_request base_branch, head, title, body
|
111
111
|
@prima.assign_pull_request_to_me(pr.number)
|
data/bin/twig-pick-issue
CHANGED
@@ -83,9 +83,9 @@ class PickIssue
|
|
83
83
|
@prima.twig.set_branch_property(branch_name, 'diff-branch', base_branch_name)
|
84
84
|
@prima.rugged.checkout(branch_name)
|
85
85
|
@prima.update_issue_with_label(issue_number, Prima::LABEL_WIP)
|
86
|
-
puts "Aggiunta label \"#{ Prima::LABEL_WIP }\" sulla issue ##{ issue_number }".green
|
86
|
+
puts "Aggiunta label \"#{ Prima::LABEL_WIP }\" sulla issue primait/board##{ issue_number }".green
|
87
87
|
@prima.assign_issue_to_me(issue_number)
|
88
|
-
puts "Issue ##{ issue_number } assegnata a #{ @prima.user_login }".green
|
88
|
+
puts "Issue primait/board##{ issue_number } assegnata a #{ @prima.user_login }".green
|
89
89
|
end
|
90
90
|
|
91
91
|
def choose_issue(issues)
|
data/lib/prima_twig.rb
CHANGED
@@ -165,13 +165,13 @@ class Prima
|
|
165
165
|
end
|
166
166
|
|
167
167
|
def issue_has_label?(issue, label)
|
168
|
-
labels = @gh.labels_for_issue
|
168
|
+
labels = @gh.labels_for_issue 'primait/board', issue.to_i
|
169
169
|
not labels.find_index{ |l| l.name == label }.nil?
|
170
170
|
end
|
171
171
|
|
172
172
|
def put_issue_in_review(issue)
|
173
173
|
update_issue_with_label(issue, Prima::LABEL_REVIEW)
|
174
|
-
gh.remove_label
|
174
|
+
gh.remove_label 'primait/board', issue, Prima::LABEL_WIP
|
175
175
|
end
|
176
176
|
|
177
177
|
def get_property(name)
|
@@ -184,13 +184,13 @@ class Prima
|
|
184
184
|
|
185
185
|
def update_issue_with_label(issue, label)
|
186
186
|
unless issue_has_label?(issue, label)
|
187
|
-
gh.add_labels_to_an_issue
|
187
|
+
gh.add_labels_to_an_issue 'primait/board', issue, [ label ]
|
188
188
|
end
|
189
189
|
end
|
190
190
|
|
191
191
|
def delete_label_from_issue(issue_number, label)
|
192
192
|
if issue_has_label?(issue_number, label)
|
193
|
-
@gh.remove_label
|
193
|
+
@gh.remove_label 'primait/board', issue_number, label
|
194
194
|
end
|
195
195
|
end
|
196
196
|
|
@@ -200,7 +200,7 @@ class Prima
|
|
200
200
|
end
|
201
201
|
|
202
202
|
def assign_issue_to_me(issue)
|
203
|
-
@gh.update_issue(
|
203
|
+
@gh.update_issue('primait/board', issue, :assignee => user_login)
|
204
204
|
end
|
205
205
|
|
206
206
|
def assign_pull_request_to_me(pr_number)
|
@@ -208,11 +208,11 @@ class Prima
|
|
208
208
|
end
|
209
209
|
|
210
210
|
def list_issues
|
211
|
-
results = @gh.list_issues
|
211
|
+
results = @gh.list_issues 'primait/board', state: :open, :per_page => 20, :page => 1
|
212
212
|
unless @gh.last_response.rels[:last].nil?
|
213
213
|
number_of_pages = @gh.last_response.rels[:last].href.match(/page=(\d+)/)[1]
|
214
214
|
for i in 2..number_of_pages.to_i
|
215
|
-
results.concat @gh.list_issues(
|
215
|
+
results.concat @gh.list_issues('primait/board', state: :open, :per_page => 20, :page => i)
|
216
216
|
end
|
217
217
|
end
|
218
218
|
results
|
@@ -223,7 +223,7 @@ class Prima
|
|
223
223
|
end
|
224
224
|
|
225
225
|
def get_issue(issue_number)
|
226
|
-
@gh.issue
|
226
|
+
@gh.issue 'primait/board', issue_number
|
227
227
|
end
|
228
228
|
|
229
229
|
def get_pr_commits(pr_number)
|