[GHA] Checklist action (#5225)

This GHA will add the checklist that's currently in the PR template, as
a comment, on newly opened PRs.

Because it needs write access (to add the comment), it needs to run on
the `pull_request_target` action, which means you won't see the outcome
on _this_ PR, but only once it's merged in, you'll see it on subsequent
PRs - example -
https://github.com/daisy-row/vigilant-octo-umbrella/pull/51

---------

Signed-off-by: Sally MacFarlane <macfarla.github@gmail.com>
This commit is contained in:
Sally MacFarlane
2023-03-16 16:27:04 +10:00
committed by GitHub
parent d736203a9d
commit 57df469e0e
2 changed files with 21 additions and 14 deletions

View File

@@ -5,17 +5,4 @@
## Fixed Issue(s)
<!-- Please link to fixed issue(s) here using format: fixes #<issue number> -->
<!-- Example: "fixes #2" -->
## Documentation
- [ ] I thought about documentation and added the `doc-change-required` label to this PR if
[updates are required](https://wiki.hyperledger.org/display/BESU/Documentation).
## Acceptance Tests (Non Mainnet)
- [ ] I have considered running `./gradlew acceptanceTestNonMainnet` locally if my PR affects non-mainnet modules.
## Changelog
- [ ] I thought about the changelog and included a [changelog update if required](https://wiki.hyperledger.org/display/BESU/Changelog).
<!-- Example: "fixes #2" -->

View File

@@ -0,0 +1,20 @@
name: "comment on pr with checklist"
on:
pull_request_target:
types: [ opened ]
branches: [ main ]
jobs:
checklist:
name: "add checklist as a comment on newly opened PRs"
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v5
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: '- [ ] I thought about documentation and added the `doc-change-required` label to this PR if [updates are required](https://wiki.hyperledger.org/display/BESU/Documentation).\n- [ ] I have considered running `./gradlew acceptanceTestNonMainnet` locally if my PR affects non-mainnet modules.\n- [ ] I thought about the changelog and included a [changelog update if required](https://wiki.hyperledger.org/display/BESU/Changelog).'
})