prima-twig 0.0.16 → 0.0.18
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/bin/twig-review +8 -0
- data/lib/prima_twig.rb +4 -2
- 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: b54ddbfa69c4447a11b5b3bd32a5327cb1b451d2
|
|
4
|
+
data.tar.gz: 20b911cff578da7693492636dea089ea376969dd
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 86e41dc61ef18443bc3964d8008b252a043109a1ef3050a6b96bb7e5319060154f8173af474fc50413dc5e6179b4712542caabc4fc6958dba63011e59ef2a21a
|
|
7
|
+
data.tar.gz: 037016ea2f273898b914b395a7e154f204b8031166e040a77e9588268a903229e0143f60a25a8ede7d24b4709851548488f654fbee2bbdad4e6ab5dc847049a2
|
data/bin/twig-review
CHANGED
|
@@ -48,11 +48,19 @@ class Review
|
|
|
48
48
|
exit 1
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
+
unless @prima.has_property?('pr')
|
|
52
|
+
puts 'Il branch attuale non ha la proprietà PR'.red
|
|
53
|
+
exit 1
|
|
54
|
+
end
|
|
55
|
+
|
|
51
56
|
unless @prima.is_already_a_pr?
|
|
52
57
|
puts 'Il branch attuale non è una pull request'.red
|
|
53
58
|
exit 1
|
|
54
59
|
end
|
|
55
60
|
|
|
61
|
+
puts "Pull request ##{@prima.get_property('pr')}".cyan
|
|
62
|
+
puts "Issue ##{@prima.get_property('issue')}".cyan if @prima.has_property?('issue')
|
|
63
|
+
|
|
56
64
|
@prima.update_issue_with_label(@prima.get_property('pr'), Prima::REVIEW_LABEL)
|
|
57
65
|
puts "La pull request #{ @prima.get_property('pr') } è ora in review".green
|
|
58
66
|
|
data/lib/prima_twig.rb
CHANGED
|
@@ -68,10 +68,12 @@ class Prima
|
|
|
68
68
|
end
|
|
69
69
|
|
|
70
70
|
def repo_name
|
|
71
|
+
return 'primait/prima'
|
|
71
72
|
`git config --get remote.origin.url`.split(':').last.chomp.chomp('.git')
|
|
72
73
|
end
|
|
73
74
|
|
|
74
75
|
def current_branch_ref
|
|
76
|
+
return 'prezzi_riepilogo_garanzie-923'
|
|
75
77
|
"primait:#{ current_branch_name }"
|
|
76
78
|
end
|
|
77
79
|
|
|
@@ -117,7 +119,7 @@ class Prima
|
|
|
117
119
|
end
|
|
118
120
|
|
|
119
121
|
def issue_has_label?(issue, label)
|
|
120
|
-
labels = @gh.labels_for_issue repo_name, issue
|
|
122
|
+
labels = @gh.labels_for_issue repo_name, issue.to_i
|
|
121
123
|
not labels.find_index{ |l| l.name == label }.nil?
|
|
122
124
|
end
|
|
123
125
|
|
|
@@ -126,7 +128,7 @@ class Prima
|
|
|
126
128
|
end
|
|
127
129
|
|
|
128
130
|
def has_property?(name)
|
|
129
|
-
@twig.get_branch_property(current_branch_name, name).nil?
|
|
131
|
+
not @twig.get_branch_property(current_branch_name, name).nil?
|
|
130
132
|
end
|
|
131
133
|
|
|
132
134
|
def update_issue_with_label(issue, label)
|