Skip to content

Commit

Permalink
Adds github_pull_request
Browse files Browse the repository at this point in the history
Adds support for github_pull_request that must be passed in via `env:` in the action itself.

Signed-off-by: Troy Fontaine <troy.fontaine@mogo.ca>
  • Loading branch information
troyfontaine committed May 28, 2020
1 parent d629a1b commit 825c9f9
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions lib/slather/coverage_service/coveralls.rb
Original file line number Diff line number Diff line change
Expand Up @@ -41,6 +41,11 @@ def github_job_id
end
private :github_job_id

def github_pull_request
ENV['CI_PULL_REQUEST'] || ""
end
private :github_pull_request

def jenkins_branch_name
branch_name = ENV['GIT_BRANCH'] || ENV['BRANCH_NAME']
if branch_name.include? 'origin/'
Expand Down Expand Up @@ -241,6 +246,7 @@ def coveralls_coverage_data
:repo_token => coverage_access_token,
:source_files => coverage_files.map(&:as_json),
:service_build_url => github_build_url,
:service_pull_request => github_pull_request,
:git => github_git_info
}.to_json
else
Expand Down

0 comments on commit 825c9f9

Please sign in to comment.