Skip to content

Commit

Permalink
Expand on data extraction from github action runs
Browse files Browse the repository at this point in the history
  • Loading branch information
mfherbst committed Nov 17, 2020
1 parent 36fc28a commit 9c716d2
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions src/coveralls.jl
Original file line number Diff line number Diff line change
Expand Up @@ -102,8 +102,14 @@ module Coveralls
data["git"]["branch"] = split(ENV["GIT_BRANCH"], "/")[2]
end
elseif haskey(ENV, "GITHUB_ACTION")
data["service_job_id"] = ENV["GITHUB_RUN_ID"]
data["service_name"] = "github"
data["git"] = parse_git_info(git_info)

event_path = open(JSON.Parser.parse, ENV["GITHUB_EVENT_PATH"])
github_pr_info = get(event_path, "pull_request", Dict())
github_pr = get(github_pr_info, "number", "")
isempty(github_pr) || (data["service_pull_request"] = github_pr)
else
data["git"] = parse_git_info(git_info)
end
Expand Down

0 comments on commit 9c716d2

Please sign in to comment.