Skip to content

Commit

Permalink
[INFRA] Add log for notify_test_workflow.yml to trace error reason
Browse files Browse the repository at this point in the history
  • Loading branch information
Hisoka-X authored Sep 19, 2023
1 parent cae66b6 commit f19a9b5
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion .github/workflows/notify_test_workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -75,7 +75,7 @@ jobs:
const name = 'Build'
const head_sha = context.payload.pull_request.head.sha
let status = 'queued'
console.log('runs: ' + runs)
console.log('runs: ' + JSON.stringify(runs))
if (!runs || runs.data.workflow_runs.length === 0) {
status = 'completed'
const conclusion = 'action_required'
Expand Down Expand Up @@ -116,8 +116,10 @@ jobs:
// Here we get check run ID to provide Check run view instead of Actions view, see also SPARK-37879.
const check_runs = await github.request(check_run_endpoint, check_run_params)
console.log('check_runs: ' + JSON.stringify(check_runs))
const check_run_head = check_runs.data.check_runs.filter(r => r.name === "Run / License header")[0]
console.log('check_run_head: ' + JSON.stringify(check_run_head))
if (check_run_head.head_sha != context.payload.pull_request.head.sha) {
throw new Error('There was a new unsynced commit pushed. Please retrigger the workflow.');
}
Expand Down

0 comments on commit f19a9b5

Please sign in to comment.