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: ...@@ -21,7 +21,7 @@ jobs:
const statuses = await github.rest.repos.listCommitStatusesForRef({ const statuses = await github.rest.repos.listCommitStatusesForRef({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, 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' const status = statuses.data.find(status => status.context === 'Test / promotion')?.state || 'missing'
core.info('Status: ' + status) core.info('Status: ' + status)
......
...@@ -179,7 +179,7 @@ jobs: ...@@ -179,7 +179,7 @@ jobs:
github.rest.repos.createCommitStatus({ github.rest.repos.createCommitStatus({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
sha: context.payload.head_commit.sha, sha: context.sha,
state: 'pending', state: 'pending',
context: 'Test / promotion', context: 'Test / promotion',
description: 'Running tests...', description: 'Running tests...',
...@@ -197,7 +197,7 @@ jobs: ...@@ -197,7 +197,7 @@ jobs:
github.rest.repos.createCommitStatus({ github.rest.repos.createCommitStatus({
owner: context.repo.owner, owner: context.repo.owner,
repo: context.repo.repo, repo: context.repo.repo,
sha: context.payload.head_commit.sha, sha: context.sha,
state: ${{ env.STATUS }} ? 'success' : 'failure', state: ${{ env.STATUS }} ? 'success' : 'failure',
context: 'Test / promotion', context: 'Test / promotion',
description: ${{ env.STATUS }} ? 'All tests passed' : 'One or more tests failed and are blocking 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