gitarro 0.1.74 → 0.1.75
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/lib/gitarro/backend.rb +11 -0
- metadata +2 -2
checksums.yaml
CHANGED
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
---
|
|
2
2
|
SHA1:
|
|
3
|
-
metadata.gz:
|
|
4
|
-
data.tar.gz:
|
|
3
|
+
metadata.gz: ed419f911053ebb5d8200fc796551497997c9729
|
|
4
|
+
data.tar.gz: 52e295adcba4a6a843bdcad5dbb92b0188219226
|
|
5
5
|
SHA512:
|
|
6
|
-
metadata.gz:
|
|
7
|
-
data.tar.gz:
|
|
6
|
+
metadata.gz: 67ee1c87c953823fcbc5d84a5060680e22c53c05e9eac9b7409c567ae92f9cb8704d46247b17af005a9b27af25f04397ea28b06664c8b1df8232137903a75851
|
|
7
|
+
data.tar.gz: b278e774fad74f68b6644db1ec915ce7ecb5ac62ab174981893f373e704bbf7985147682b04bcd744731f4c45455f4e033cefb6cb3b1432cc3e019373019665d
|
data/lib/gitarro/backend.rb
CHANGED
|
@@ -84,6 +84,7 @@ class TestExecutor
|
|
|
84
84
|
|
|
85
85
|
# this will clone the repo and execute the tests
|
|
86
86
|
def pr_test(pr)
|
|
87
|
+
export_pr_data_to_hidden_file(pr)
|
|
87
88
|
clone_repo(@noshallow, pr)
|
|
88
89
|
# export variables
|
|
89
90
|
export_pr_variables(pr)
|
|
@@ -117,6 +118,16 @@ class TestExecutor
|
|
|
117
118
|
git.del_pr_branch(pr.base.ref, pr.head.ref)
|
|
118
119
|
end
|
|
119
120
|
|
|
121
|
+
def export_pr_data_to_hidden_file(pr)
|
|
122
|
+
# save this file in local dir where gitarro is executed.
|
|
123
|
+
File.open('.gitarro_vars', 'w') do |file|
|
|
124
|
+
file.write("GITARRO_PR_AUTHOR: #{pr.head.user.login}\n" \
|
|
125
|
+
"GITARRO_PR_TITLE: #{pr.title}\n" \
|
|
126
|
+
"GITARRO_PR_NUMBER: #{pr.number}\n" \
|
|
127
|
+
"GITARRO_PR_TARGET_REPO: #{@repo}\n")
|
|
128
|
+
end
|
|
129
|
+
end
|
|
130
|
+
|
|
120
131
|
def export_pr_variables(pr)
|
|
121
132
|
ENV['GITARRO_PR_AUTHOR'] = pr.head.user.login.to_s
|
|
122
133
|
ENV['GITARRO_PR_TITLE'] = pr.title.to_s
|
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.75
|
|
5
5
|
platform: ruby
|
|
6
6
|
authors:
|
|
7
7
|
- Dario Maiocchi
|
|
8
8
|
autorequire:
|
|
9
9
|
bindir: bin
|
|
10
10
|
cert_chain: []
|
|
11
|
-
date: 2018-03-
|
|
11
|
+
date: 2018-03-15 00:00:00.000000000 Z
|
|
12
12
|
dependencies:
|
|
13
13
|
- !ruby/object:Gem::Dependency
|
|
14
14
|
name: english
|