Skip to content

Commit

Permalink
Add PR description link in failed workflow comment
Browse files Browse the repository at this point in the history
  • Loading branch information
josh-wong committed Sep 1, 2024
1 parent a0af6ac commit cc6a4ec
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion .github/workflows/check-checklist.yml
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,12 @@ jobs:
});
const assignee = pullRequest.assignee ? `@${pullRequest.assignee.login}` : 'No assignee';
const uncheckedItems = process.env.unchecked_items.split('\n').map(item => `- ${item}`).join('\n');
const prLink = `https://github.com/${context.repo.owner}/${context.repo.repo}/pull/${context.issue.number}`;
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: `${assignee}, not all items in the checklist have been checked👀\n\nPlease review the following unchecked items in the PR description:\n${uncheckedItems}`
body: `${assignee}, not all items in the checklist have been checked👀\n\nPlease review the unchecked items in the [PR description](${prLink})`
})
- name: Fail the job if not all items are checked
Expand Down

0 comments on commit cc6a4ec

Please sign in to comment.