chore(devops): add check status for report merger to PRs (#23564)
The check summary has a link to the report and a link to the merge workflow run. Otherwise it's very hard to tell which merge workflow corresponds to given PR.
This commit is contained in:
parent
0b30f2017c
commit
7d2201561f
11
.github/workflows/create_test_report.yml
vendored
11
.github/workflows/create_test_report.yml
vendored
|
|
@ -99,17 +99,16 @@ jobs:
|
||||||
});
|
});
|
||||||
core.info('Posted comment: ' + response.html_url);
|
core.info('Posted comment: ' + response.html_url);
|
||||||
|
|
||||||
if (context.payload.workflow_run.event === 'push') {
|
const mergeWorkflowUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
|
||||||
const check = await github.rest.checks.create({
|
const check = await github.rest.checks.create({
|
||||||
...context.repo,
|
...context.repo,
|
||||||
name: '${{ github.event.workflow_run.name }}',
|
name: 'Merge report (${{ github.event.workflow_run.name }})',
|
||||||
head_sha: context.sha,
|
head_sha: '${{ github.event.workflow_run.head_sha }}',
|
||||||
status: 'completed',
|
status: 'completed',
|
||||||
conclusion: 'success',
|
conclusion: 'success',
|
||||||
details_url: reportUrl,
|
details_url: reportUrl,
|
||||||
output: {
|
output: {
|
||||||
title: '"${{ github.event.workflow_run.name }}" test results',
|
title: 'Merged test results (${{ github.event.workflow_run.name }})',
|
||||||
summary: '"${{ github.event.workflow_run.name }}" test results: ' + reportUrl,
|
summary: `Created [report](${reportUrl}). Merge [workflow run](${mergeWorkflowUrl}).`,
|
||||||
}
|
}
|
||||||
});
|
});
|
||||||
}
|
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue