Skip to content

Commit 726a3bb

Browse files
committed
Use originally extracted ref everywhere
1 parent 273306c commit 726a3bb

File tree

1 file changed

+2
-8
lines changed

1 file changed

+2
-8
lines changed

.github/workflows/validate.yml

Lines changed: 2 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -103,22 +103,16 @@ jobs:
103103
id: update-check-run
104104
if: ${{ always() }}
105105
env:
106-
number: ${{ github.event.client_payload.pull_request.number }}
107106
job: ${{ github.job }}
107+
ref: ${{ github.event.client_payload.pull_request.head.sha }}
108108
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
109109
conclusion: ${{ job.status }}
110110
with:
111111
github-token: ${{ secrets.GITHUB_TOKEN }}
112112
script: |
113-
const { data: pull } = await github.rest.pulls.get({
114-
...context.repo,
115-
pull_number: process.env.number
116-
});
117-
const ref = pull.head.sha;
118-
119113
const { data: checks } = await github.rest.checks.listForRef({
120114
...context.repo,
121-
ref
115+
process.env.ref
122116
});
123117
124118
const check = checks.check_runs.filter(c => c.name === process.env.job);

0 commit comments

Comments
 (0)