From 9763372bd9abf2a9edd562dd08b3edfe1c9fa065 Mon Sep 17 00:00:00 2001 From: "Valentin D. Pinkman" Date: Wed, 16 Feb 2022 10:09:48 +0100 Subject: [PATCH] LIVE-945 Add checklist on PRs (#1705) --- .github/workflows/checklist-pr.yml | 52 ++++++++++++++++++++++++++++++ 1 file changed, 52 insertions(+) create mode 100644 .github/workflows/checklist-pr.yml diff --git a/.github/workflows/checklist-pr.yml b/.github/workflows/checklist-pr.yml new file mode 100644 index 0000000000..763f9d464e --- /dev/null +++ b/.github/workflows/checklist-pr.yml @@ -0,0 +1,52 @@ +name: "PR | Checklist" +on: + pull_request: + branches: + - develop + types: [opened, reopened] + +jobs: + comment-on-pr: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v2 + with: + ref: ${{ github.event.pull_request.head.sha }} + repository: ${{github.event.pull_request.head.repo.full_name}} + persist-credentials: false + - name: comment on PR (support and bugfix branches) + if: contains(github.head_ref, 'support/') || contains(github.head_ref, 'bugfix/') + uses: actions/github-script@v5 + with: + script: | + await github.rest.repos.createCommitComment({ + owner: "LedgerHQ", + repo: "ledger-live-common", + commit_sha: "${{ github.event.pull_request.head.sha }}", + body: ` + Thanks for your contribution. + To be able to merge in _develop_ branch, you need to: + + - [ ] pass the CI + - [ ] have a dev review + - [ ] have a QA review + ` + }); + - name: comment on PR (feature branches) + if: contains(github.head_ref, 'feat/') + uses: actions/github-script@v5 + with: + script: | + await github.rest.repos.createCommitComment({ + owner: "LedgerHQ", + repo: "ledger-live-common", + commit_sha: "${{ github.event.pull_request.head.sha }}", + body: ` + Thanks for your contribution. + To be groomed for next release, you need to: + + - [ ] pass the CI + - [ ] have a dev review + - [ ] have a QA review + ` + });