lib/bubbler_ruby/api.rb in bubbler_ruby-0.1.2 vs lib/bubbler_ruby/api.rb in bubbler_ruby-0.1.3
- old
+ new
@@ -43,9 +43,11 @@
end
# CIRCLE_PR_NUMBER=2 (Only populated on forked PRs)
# CIRCLE_PULL_REQUEST= https://github.com/mark579/pull/2
def self.circleci_pr_number
+ return unless ENV['CIRCLE_PR_NUMBER'] || ENV['CIRCLE_PULL_REQUEST']
+
return ENV['CIRCLE_PR_NUMBER'] if ENV['CIRCLE_PR_NUMBER']
return ENV['CIRCLE_PULL_REQUEST'].split('/').last
end
# CIRCLE_PROJECT_REPONAME=rails-bubbler-test