mirror of
https://github.com/microsoft/playwright.git
synced 2024-10-27 13:50:25 +03:00
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
27
.github/workflows/create_test_report.yml
vendored
27
.github/workflows/create_test_report.yml
vendored
@ -99,17 +99,16 @@ jobs:
|
||||
});
|
||||
core.info('Posted comment: ' + response.html_url);
|
||||
|
||||
if (context.payload.workflow_run.event === 'push') {
|
||||
const check = await github.rest.checks.create({
|
||||
...context.repo,
|
||||
name: '${{ github.event.workflow_run.name }}',
|
||||
head_sha: context.sha,
|
||||
status: 'completed',
|
||||
conclusion: 'success',
|
||||
details_url: reportUrl,
|
||||
output: {
|
||||
title: '"${{ github.event.workflow_run.name }}" test results',
|
||||
summary: '"${{ github.event.workflow_run.name }}" test results: ' + reportUrl,
|
||||
}
|
||||
});
|
||||
}
|
||||
const mergeWorkflowUrl = `${context.serverUrl}/${context.repo.owner}/${context.repo.repo}/actions/runs/${context.runId}`;
|
||||
const check = await github.rest.checks.create({
|
||||
...context.repo,
|
||||
name: 'Merge report (${{ github.event.workflow_run.name }})',
|
||||
head_sha: '${{ github.event.workflow_run.head_sha }}',
|
||||
status: 'completed',
|
||||
conclusion: 'success',
|
||||
details_url: reportUrl,
|
||||
output: {
|
||||
title: 'Merged test results (${{ github.event.workflow_run.name }})',
|
||||
summary: `Created [report](${reportUrl}). Merge [workflow run](${mergeWorkflowUrl}).`,
|
||||
}
|
||||
});
|
||||
|
Loading…
Reference in New Issue
Block a user