File tree 2 files changed +4
-16
lines changed 2 files changed +4
-16
lines changed Original file line number Diff line number Diff line change 61
61
env :
62
62
WEBHOOK_URL : ${{ secrets.JSCORE_CHAT_WEBHOOK_URL }}
63
63
RELEASE_TRACKER_URL : ${{ secrets.RELEASE_TRACKER_URL }}
64
+ VERSION_OR_TAG : ${{ github.event.client_payload.versionOrTag }}
64
65
# run in root
65
66
working-directory : ' .'
66
67
- name : Tests failed
69
70
env :
70
71
WEBHOOK_URL : ${{ secrets.JSCORE_CHAT_WEBHOOK_URL }}
71
72
RELEASE_TRACKER_URL : ${{ secrets.RELEASE_TRACKER_URL }}
73
+ VERSION_OR_TAG : ${{ github.event.client_payload.versionOrTag }}
72
74
# run in root
73
75
working-directory : ' .'
Original file line number Diff line number Diff line change @@ -37,22 +37,8 @@ async function notifyTestResults() {
37
37
status = 'succeeded' ;
38
38
}
39
39
40
- let message = `E2E Tests ${ status } ` ;
41
- let versionOrTag ;
42
-
43
- // Add version if it can find it in the workflow_dispatch event data.
44
- if ( process . env . GITHUB_EVENT_PATH ) {
45
- const wrPayload = require ( process . env . GITHUB_EVENT_PATH ) ;
46
- if ( wrPayload . inputs && wrPayload . inputs . versionOrTag ) {
47
- message += ` for release ${ wrPayload . inputs . versionOrTag } .` ;
48
- versionOrTag = wrPayload . inputs . versionOrTag ;
49
- } else {
50
- console . log ( `Couldn't find versionOrTag in event payload.` ) ;
51
- }
52
- } else {
53
- console . log ( `Couldn't find event payload.` ) ;
54
- }
55
- message += ` ${ workflowUrl } ` ;
40
+ const versionOrTag = process . env . VERSION_OR_TAG ;
41
+ const message = `E2E Tests ${ status } for release ${ versionOrTag } . ${ workflowUrl } ` ;
56
42
57
43
const chatPromise = new Promise ( ( resolve , reject ) => {
58
44
console . log ( `Sending message to chat: ${ message } ` ) ;
You can’t perform that action at this time.
0 commit comments