gitarro 0.1.71 → 0.1.72
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/gitarro +2 -0
- data/lib/gitarro/backend.rb +11 -0
- data/lib/gitarro/git_op.rb +1 -1
- data/lib/gitarro/opt_parser.rb +7 -0
- metadata +3 -3
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: df668789d444148092fe85a0ec354a210c8bf07d
|
|
4
|
+
data.tar.gz: 946e22c1f04311db87a7a7e68c758e8db8af2044
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: ccd9fdd3a9b7a6cbf3295f61554c3742db607393805e5c3bccd98e13b1a4637bae89d3078ca53cbed3249b1664186c6eb1202ca2f46b405829d5a225fb448f96
|
|
7
|
+
data.tar.gz: 35307631c827d2009c6c1bd9a5477949636b7d6345999d996794594cbc3a0e89bf576208e4660f1fd8c0f06f9807a3d99f8970adda2aead8b5c383b1b33ec4d2
|
data/bin/gitarro
CHANGED
|
@@ -13,6 +13,8 @@ exit 0 if prs.empty?
|
|
|
13
13
|
|
|
14
14
|
prs.each do |pr|
|
|
15
15
|
puts '=' * 30 + "\n" + "TITLE_PR: #{pr.title}, NR: #{pr.number}\n" + '=' * 30
|
|
16
|
+
# check if prs contains the branch given otherwise just break
|
|
17
|
+
break unless b.pr_equal_spefic_branch?(pr)
|
|
16
18
|
# this check the last commit state, catch for review or not reviewd status.
|
|
17
19
|
comm_st = b.client.status(b.repo, pr.head.sha)
|
|
18
20
|
# pr number trigger.
|
data/lib/gitarro/backend.rb
CHANGED
|
@@ -151,6 +151,17 @@ class Backend
|
|
|
151
151
|
@gbexec = TestExecutor.new(@options)
|
|
152
152
|
end
|
|
153
153
|
|
|
154
|
+
# public method for check if pr belong to user specified branch
|
|
155
|
+
# if the pr belong to the branch continue tests
|
|
156
|
+
# otherwise just skip tests without setting any status
|
|
157
|
+
def pr_equal_spefic_branch?(pr)
|
|
158
|
+
return true if @branch.nil?
|
|
159
|
+
return true if @branch == pr.base.ref
|
|
160
|
+
puts "branch \"#{pr.base.ref}\" should match github-branch \"#{@branch}\" (given) !!!"
|
|
161
|
+
puts "skipping tests !!!"
|
|
162
|
+
false
|
|
163
|
+
end
|
|
164
|
+
|
|
154
165
|
# public method for get prs opened and matching the changed_since
|
|
155
166
|
# condition
|
|
156
167
|
def open_newer_prs
|
data/lib/gitarro/git_op.rb
CHANGED
data/lib/gitarro/opt_parser.rb
CHANGED
|
@@ -48,6 +48,12 @@ module OptionalOptions
|
|
|
48
48
|
end
|
|
49
49
|
end
|
|
50
50
|
|
|
51
|
+
def branch_opt(opt)
|
|
52
|
+
opt.on('-b', "--branch 'GITHUB BRANCH'", 'GitHub Branch') do |b|
|
|
53
|
+
@options[:branch] = b
|
|
54
|
+
end
|
|
55
|
+
end
|
|
56
|
+
|
|
51
57
|
def git_opt(opt)
|
|
52
58
|
desc = 'Specify a location where gitarro will clone the GitHub project. '\
|
|
53
59
|
'If the dir does not exists, gitarro will create one. '\
|
|
@@ -99,6 +105,7 @@ module OptionalOptions
|
|
|
99
105
|
opt.separator "\n Optional options:"
|
|
100
106
|
desc_opt(opt)
|
|
101
107
|
check_opt(opt)
|
|
108
|
+
branch_opt(opt)
|
|
102
109
|
no_shallow(opt)
|
|
103
110
|
file_opt(opt)
|
|
104
111
|
url_opt(opt)
|
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.72
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dario Maiocchi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date:
|
|
11
|
+
date: 2018-03-09 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: english
|
|
@@ -168,7 +168,7 @@ required_rubygems_version: !ruby/object:Gem::Requirement
|
|
|
168
168
|
version: '0'
|
|
169
169
|
requirements: []
|
|
170
170
|
rubyforge_project:
|
|
171
|
-
rubygems_version: 2.5.1
|
|
171
|
+
rubygems_version: 2.5.2.1
|
|
172
172
|
signing_key:
|
|
173
173
|
specification_version: 4
|
|
174
174
|
summary: gitarro gem
|