File tree 1 file changed +5
-4
lines changed
1 file changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -65,11 +65,11 @@ if (process.env.TRAVIS) {
65
65
66
66
event = 'push'
67
67
pull_request_number = process . env . CI_PR_NUMBER
68
- sha = process . env . CI_COMMIT_ID ,
68
+ sha = process . env . CI_COMMIT_ID ,
69
69
buildUrl = process . env . CI_BUILD_URL
70
-
70
+
71
71
ci = 'codeship'
72
- } else if ( process . env . GITHUB_ACTION ) {
72
+ } else if ( process . env . GITHUB_ACTIONS ) {
73
73
// GitHub Actions
74
74
// Reference: https://developer.github.com/actions/creating-github-actions/accessing-the-runtime-environment/
75
75
@@ -79,7 +79,8 @@ if (process.env.TRAVIS) {
79
79
event = process . env . GITHUB_EVENT_NAME
80
80
commit_message = ''
81
81
pull_request_number = ''
82
- branch = process . env . GITHUB_REF
82
+ // GITHUB_HEAD_REF for pull requests. For commits, GITHUB_REF is of the form refs/heads/master, for example
83
+ branch = process . env . GITHUB_HEAD_REF || process . env . GITHUB_REF && process . env . GITHUB_REF . split ( '/' ) [ 2 ]
83
84
ci = 'github_actions'
84
85
} else if ( process . env . NETLIFY ) {
85
86
// Reference: https://www.netlify.com/docs/continuous-deployment/#environment-variables
You can’t perform that action at this time.
0 commit comments