gitarro 0.1.84 → 0.1.85
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/bin/gitarro +1 -1
- data/lib/gitarro/backend.rb +7 -9
- metadata +3 -3
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA256:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: 2559fce40754b64d75bb04d8f3bda7444e28b5f29333724d24411aaf815cda62
|
4
|
+
data.tar.gz: f52c91ed53608fef91d89e0c8939d0997f57919f09a1584bb6c565c42be45076
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: ad01fcbbf254c3b8d3a0efacefdbb83e13dd8961f1e0310681dd96e73793f2d3261c7f55effc75fb30e38f06bb843c04456edba7a2805837ba6952273ce8d558
|
7
|
+
data.tar.gz: 1f4d107cf5dd7364ee1d964d3c71bc884d7472980269598179ac0a52bb025bc234360db56be8b0feef2c489515991d0e19025fe038f6a7b9fd8a891e7ced3461
|
data/bin/gitarro
CHANGED
@@ -16,7 +16,7 @@ exit 0 if prs.empty?
|
|
16
16
|
prs.each do |pr|
|
17
17
|
puts '=' * 30 + "\n" + "TITLE_PR: #{pr.title}, NR: #{pr.number}\n" + '=' * 30
|
18
18
|
# check if prs contains the branch given otherwise just break
|
19
|
-
next unless b.
|
19
|
+
next unless b.pr_equal_specific_branch?(pr)
|
20
20
|
|
21
21
|
# this check the last commit state, catch for review or not reviewd status.
|
22
22
|
comm_st = b.client.status(b.repo, pr.head.sha)
|
data/lib/gitarro/backend.rb
CHANGED
@@ -173,7 +173,7 @@ class Backend
|
|
173
173
|
# public method for check if pr belong to user specified branch
|
174
174
|
# if the pr belong to the branch continue tests
|
175
175
|
# otherwise just skip tests without setting any status
|
176
|
-
def
|
176
|
+
def pr_equal_specific_branch?(pr)
|
177
177
|
return true if @branch.nil?
|
178
178
|
return true if @branch == pr.base.ref
|
179
179
|
|
@@ -202,15 +202,15 @@ class Backend
|
|
202
202
|
launch_test_and_setup_status(pr)
|
203
203
|
end
|
204
204
|
|
205
|
-
# public
|
205
|
+
# public tests against the pr number passed by parameter
|
206
206
|
def triggered_by_pr_number?
|
207
207
|
return false if @pr_number.nil?
|
208
208
|
|
209
|
-
|
210
|
-
|
211
|
-
|
212
|
-
|
213
|
-
|
209
|
+
# Note that the test will only run if it pass the checks on unreviewed_new_pr
|
210
|
+
pr_on_number = @client.pull_request(@repo, @pr_number)
|
211
|
+
puts "Got triggered by PR_NUMBER OPTION, PR: #{@pr_number}"
|
212
|
+
comm_st = @client.status(@repo, pr_on_number.head.sha)
|
213
|
+
unreviewed_new_pr?(pr_on_number, comm_st)
|
214
214
|
end
|
215
215
|
|
216
216
|
def unreviewed_new_pr?(pr, comm_st)
|
@@ -261,8 +261,6 @@ class Backend
|
|
261
261
|
def retriggered_by_checkbox?(pr, context)
|
262
262
|
return false unless pr.body.include? "[x] Re-run test \"#{context}\""
|
263
263
|
|
264
|
-
return true if @check
|
265
|
-
|
266
264
|
skipped = ''
|
267
265
|
unless empty_files_changed_by_pr?(pr)
|
268
266
|
skipped = '(Test skipped, there are no changes to test)'
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: gitarro
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.1.
|
4
|
+
version: 0.1.85
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Dario Maiocchi
|
8
8
|
autorequire:
|
9
9
|
bindir: bin
|
10
10
|
cert_chain: []
|
11
|
-
date: 2019-
|
11
|
+
date: 2019-03-25 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: english
|
@@ -169,7 +169,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
169
169
|
version: '0'
|
170
170
|
requirements: []
|
171
171
|
rubyforge_project:
|
172
|
-
rubygems_version: 2.7.6
|
172
|
+
rubygems_version: 2.7.6.2
|
173
173
|
signing_key:
|
174
174
|
specification_version: 4
|
175
175
|
summary: gitarro gem
|