Yet more fixes to E2E
@@ -92,9 +92,13 @@ jobs:
env:
number: ${{ github.event.client_payload.pull_request.number }}
job: ${{ github.job }}
+ server_url: ${{ github.server_url }}
+ repo: ${{ github.repository }}
+ run_id: ${{ github.run_id }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
+ const url = `${process.env.server_url}/${process.env.repo}/actions/runs/${process.env.run_id}`
const { data: pull } = await github.pulls.get({
...context.repo,
pull_number: process.env.number
@@ -105,10 +109,11 @@ jobs:
ref
});
const check = checks.check_runs.filter(c => c.name === process.env.job);
- const { data: result } = await github.checks.update({
+ const { data: result } = await github.checks.create({
...context.repo,
- check_run_id: check[0].id,
+ name: process.env.job,
status: 'in_progress',
+ details_url: url,
});
return result;
@@ -166,10 +171,13 @@ jobs:
job: ${{ github.job }}
# Conveniently, job.status maps to https://developer.github.com/v3/checks/runs/#update-a-check-run
conclusion: ${{ job.status }}
- url: ${{ job.html_url }}
+ server_url: ${{ github.server_url }}
+ repo: ${{ github.repository }}
+ run_id: ${{ github.run_id }}
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
+ const url = `${process.env.server_url}/${process.env.repo}/actions/runs/${process.env.run_id}`
const { data: pull } = await github.pulls.get({
...context.repo,
pull_number: process.env.number
@@ -185,6 +193,6 @@ jobs:
check_run_id: check[0].id,
status: 'completed',
conclusion: process.env.conclusion,
- details_url: process.env.url,
+ details_url: url,
});
return result;
