gitarro 0.1.84 → 0.1.85

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.
Files changed (4) hide show
  1. checksums.yaml +4 -4
  2. data/bin/gitarro +1 -1
  3. data/lib/gitarro/backend.rb +7 -9
  4. metadata +3 -3
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 76a009c633d69576084ebb47ccd9162935371adde4fdc6345cd5c170db43bf16
4
- data.tar.gz: b8111a0583e8ce8f379f34f511e8979d68e2d21eca2f369fc93d2a6c003fe1c7
3
+ metadata.gz: 2559fce40754b64d75bb04d8f3bda7444e28b5f29333724d24411aaf815cda62
4
+ data.tar.gz: f52c91ed53608fef91d89e0c8939d0997f57919f09a1584bb6c565c42be45076
5
5
  SHA512:
6
- metadata.gz: 76275e058bb4b7a33f2cac0fc32bd568e047b3bd79fdff2ead753a5987d0bfc795ba38619780bf7d55364ccbf4899612c7a04320dc7abc95acd6279afb94ceea
7
- data.tar.gz: ba53a4161351cf6b1a88716d95f0296df056e1daafa275dd14d7d6d5059a4bf432c0cf67e030a89175f2cdcda2179b42a4671385d89bd3e66d2cc19bd4c80a5f
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.pr_equal_spefic_branch?(pr)
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)
@@ -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 pr_equal_spefic_branch?(pr)
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 always rerun tests against the pr number if this exists
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
- pr_on_number = @client.pull_request(@repo, @pr_number)
210
- puts "Got triggered by PR_NUMBER OPTION, rerunning on #{@pr_number}"
211
- print_test_required
212
- gbexec.export_pr_data(pr_on_number)
213
- launch_test_and_setup_status(pr_on_number)
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.84
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-02-27 00:00:00.000000000 Z
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