saddler-reporter-github 0.1.0 → 0.1.1

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: 5a54f0b00d0a8ccf4dd9bca6b35949d26e0891e5
4
- data.tar.gz: 6a866714ea731c76b352c3c78e7bf7ca2fe95a22
3
+ metadata.gz: 9f3d99778199ea1e833e11f7aa2cd6e091382d27
4
+ data.tar.gz: 6a6ae90f0f67e915039aace30f11d7a2dc78b027
5
5
  SHA512:
6
- metadata.gz: 56cdca0dcff8a4bdff2ffdf8c62199fa44b752ae8de3d73872d8cfe7b1b06977f67fabb473b23f0e77d7a4a1443abcc0008d2417c0baff68c027857c33767c7b
7
- data.tar.gz: 44cf9e2690347d8d448f5096b688375fb6f48c251a3a2887fa9564271a9410224fb0727ac8e17cab90954f7b134f390aeebb40036425dd9edfcc221586c9155d
6
+ metadata.gz: 513aabc1f63421c963a4e580e82524de5215c0818bafde2d0885e516d75d12cc6be485c389436545837018c6b6576e308e072dabb9188e44b49626ed36cbd8e3
7
+ data.tar.gz: 7a123d94a41d3ba90e2107a114fba4a54ddf34158f610ebe809c9c341191c31e9526cb700c13c84ab7c2200d004d13bc323f05a76d1b844528caba4cc101e506
@@ -56,7 +56,7 @@ module Saddler
56
56
 
57
57
  def pull_id
58
58
  @pull_id ||= begin
59
- pull_id = ENV['PULL_REQUEST_ID']
59
+ pull_id = env_pull_id
60
60
  if pull_id
61
61
  pull_id.to_i
62
62
  elsif @repo.current_branch
@@ -81,6 +81,14 @@ module Saddler
81
81
  def access_token
82
82
  ENV['GITHUB_ACCESS_TOKEN']
83
83
  end
84
+
85
+ def env_pull_id
86
+ if ENV['PULL_REQUEST_ID']
87
+ ENV['PULL_REQUEST_ID']
88
+ elsif ENV['TRAVIS_PULL_REQUEST'] && ENV['TRAVIS_PULL_REQUEST'] != 'false'
89
+ ENV['TRAVIS_PULL_REQUEST']
90
+ end
91
+ end
84
92
  end
85
93
  end
86
94
  end
@@ -1,7 +1,7 @@
1
1
  module Saddler
2
2
  module Reporter
3
3
  module Github
4
- VERSION = '0.1.0'
4
+ VERSION = '0.1.1'
5
5
  end
6
6
  end
7
7
  end
metadata CHANGED
@@ -1,7 +1,7 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: saddler-reporter-github
3
3
  version: !ruby/object:Gem::Version
4
- version: 0.1.0
4
+ version: 0.1.1
5
5
  platform: ruby
6
6
  authors:
7
7
  - sanemat