[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>
pull/5231/head
Sally MacFarlane 2 years ago committed by GitHub
parent d736203a9d
commit 57df469e0e
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 15
      .github/pull_request_template.md
  2. 20
      .github/workflows/pr-checklist-on-open.yml

@ -5,17 +5,4 @@
## Fixed Issue(s) ## Fixed Issue(s)
<!-- Please link to fixed issue(s) here using format: fixes #<issue number> --> <!-- Please link to fixed issue(s) here using format: fixes #<issue number> -->
<!-- Example: "fixes #2" --> <!-- 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).

@ -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).'
})
Loading…
Cancel
Save