Skip to content

Commit 0cbc934

Browse files
committed
Revert "[SPARK-37879][INFRA] Show test report in GitHub Actions builds from PRs"
This reverts commit ebd7fca.
1 parent 85efc85 commit 0cbc934

File tree

1 file changed

+7
-6
lines changed

1 file changed

+7
-6
lines changed

.github/workflows/notify_test_workflow.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -38,15 +38,16 @@ jobs:
3838
with:
3939
github-token: ${{ secrets.GITHUB_TOKEN }}
4040
script: |
41-
const endpoint = 'GET /repos/:owner/:repo/commits/:ref/check-runs'
41+
const endpoint = 'GET /repos/:owner/:repo/actions/workflows/:id/runs?&branch=:branch'
4242
4343
// TODO: Should use pull_request.user and pull_request.user.repos_url?
4444
// If a different person creates a commit to another forked repo,
4545
// it wouldn't be able to detect.
4646
const params = {
4747
owner: context.payload.pull_request.head.repo.owner.login,
4848
repo: context.payload.pull_request.head.repo.name,
49-
ref: context.payload.pull_request.head.ref,
49+
id: 'build_and_test.yml',
50+
branch: context.payload.pull_request.head.ref,
5051
}
5152
5253
console.log('Ref: ' + context.payload.pull_request.head.ref)
@@ -67,7 +68,7 @@ jobs:
6768
const head_sha = context.payload.pull_request.head.sha
6869
let status = 'queued'
6970
70-
if (!runs || runs.data.check_runs.filter(r => r.name === "Configure jobs").length === 0) {
71+
if (!runs || runs.data.workflow_runs.length === 0) {
7172
status = 'completed'
7273
const conclusion = 'action_required'
7374
@@ -99,15 +100,15 @@ jobs:
99100
}
100101
})
101102
} else {
102-
const runID = runs.data.check_runs.filter(r => r.name === "Configure jobs")[0].id
103+
const runID = runs.data.workflow_runs[0].id
103104
104-
if (runs.data.check_runs[0].head_sha != context.payload.pull_request.head.sha) {
105+
if (runs.data.workflow_runs[0].head_sha != context.payload.pull_request.head.sha) {
105106
throw new Error('There was a new unsynced commit pushed. Please retrigger the workflow.');
106107
}
107108
108109
const runUrl = 'https://github.com/'
109110
+ context.payload.pull_request.head.repo.full_name
110-
+ '/runs/'
111+
+ '/actions/runs/'
111112
+ runID
112113
113114
github.checks.create({

0 commit comments

Comments
 (0)