everypolitician-pull_request 0.1.0 → 0.2.0
Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml
CHANGED
@@ -1,7 +1,7 @@
|
|
1
1
|
---
|
2
2
|
SHA1:
|
3
|
-
metadata.gz:
|
4
|
-
data.tar.gz:
|
3
|
+
metadata.gz: f0f118d7f5c1153eb2d5fdda7553fb308dd447a6
|
4
|
+
data.tar.gz: 80154d1941abdffab0de37882141e8b70e124996
|
5
5
|
SHA512:
|
6
|
-
metadata.gz:
|
7
|
-
data.tar.gz:
|
6
|
+
metadata.gz: 0e121428905079e2cfe39a00d7729742f5949470cb94c65c8ae02db5baf1462bd30d7b282285252f87fd40ba585bbf882af37a386d51b6578df2088c38a98a61
|
7
|
+
data.tar.gz: 90aeafd6ff798790bf05680ac0e9802282fd55f887fd63a42ba340238a0da087b5033b80ee689df61ff9478b78ecdb23242284c9cfb7bc50463df11d3f4c569f
|
@@ -30,6 +30,26 @@ module Everypolitician
|
|
30
30
|
end
|
31
31
|
end
|
32
32
|
|
33
|
+
def post_to_github
|
34
|
+
comment = github.add_comment(
|
35
|
+
everypolitician_data_repo,
|
36
|
+
pull_request_number,
|
37
|
+
as_markdown
|
38
|
+
)
|
39
|
+
puts "Success! Comment posted at #{comment[:html_url]}"
|
40
|
+
rescue Octokit::Unauthorized
|
41
|
+
abort 'unauthorized: Please set GITHUB_ACCESS_TOKEN in the ' \
|
42
|
+
'environment and try again. https://github.com/settings/tokens'
|
43
|
+
end
|
44
|
+
|
45
|
+
def post_to_github_from_travis
|
46
|
+
if pull_request_number && pull_request_number != 'false'
|
47
|
+
post_to_github
|
48
|
+
else
|
49
|
+
warn 'Not building a pull request, skipping pull_request_summary'
|
50
|
+
end
|
51
|
+
end
|
52
|
+
|
33
53
|
private
|
34
54
|
|
35
55
|
def github
|
metadata
CHANGED
@@ -1,14 +1,14 @@
|
|
1
1
|
--- !ruby/object:Gem::Specification
|
2
2
|
name: everypolitician-pull_request
|
3
3
|
version: !ruby/object:Gem::Version
|
4
|
-
version: 0.
|
4
|
+
version: 0.2.0
|
5
5
|
platform: ruby
|
6
6
|
authors:
|
7
7
|
- Chris Mytton
|
8
8
|
autorequire:
|
9
9
|
bindir: exe
|
10
10
|
cert_chain: []
|
11
|
-
date: 2016-09-
|
11
|
+
date: 2016-09-13 00:00:00.000000000 Z
|
12
12
|
dependencies:
|
13
13
|
- !ruby/object:Gem::Dependency
|
14
14
|
name: everypolitician-popolo
|