Skip to content

Commit

Permalink
core: Remove 'refs/head/' prefix in Git branch name.
Browse files Browse the repository at this point in the history
This should get the coverage to show up in the 'Overview' tab and fix #42.
  • Loading branch information
paambaati committed Oct 27, 2019
1 parent 091bdfb commit 538b501
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ function prepareEnv() {
if (process.env.GITHUB_SHA !== undefined)
env.GIT_COMMIT_SHA = process.env.GITHUB_SHA;
if (process.env.GITHUB_REF !== undefined)
env.GIT_BRANCH = process.env.GITHUB_REF;
env.GIT_BRANCH = process.env.GITHUB_REF.replace(/^refs\/head\//, ''); // Remove 'refs/head/' prefix (See https://github.com/paambaati/codeclimate-action/issues/42)

return env;
}
Expand Down

0 comments on commit 538b501

Please sign in to comment.