Commit c8a17f5f authored by Zach Pomerantz's avatar Zach Pomerantz Committed by GitHub

build: use context.sha (#6900)

parent 552a3899
......@@ -21,7 +21,7 @@ jobs:
const statuses = await github.rest.repos.listCommitStatusesForRef({
owner: context.repo.owner,
repo: context.repo.repo,
ref: context.payload.head_commit.sha
ref: context.sha
})
const status = statuses.data.find(status => status.context === 'Test / promotion')?.state || 'missing'
core.info('Status: ' + status)
......
......@@ -179,7 +179,7 @@ jobs:
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.payload.head_commit.sha,
sha: context.sha,
state: 'pending',
context: 'Test / promotion',
description: 'Running tests...',
......@@ -197,7 +197,7 @@ jobs:
github.rest.repos.createCommitStatus({
owner: context.repo.owner,
repo: context.repo.repo,
sha: context.payload.head_commit.sha,
sha: context.sha,
state: ${{ env.STATUS }} ? 'success' : 'failure',
context: 'Test / promotion',
description: ${{ env.STATUS }} ? 'All tests passed' : 'One or more tests failed and are blocking promotion',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment