diff --git a/.github/PULL_REQUEST_TEMPLATE.md b/.github/PULL_REQUEST_TEMPLATE.md index 6a10d8f..ce48f02 100644 --- a/.github/PULL_REQUEST_TEMPLATE.md +++ b/.github/PULL_REQUEST_TEMPLATE.md @@ -6,5 +6,4 @@ Please explain the changes you made here and link to any relevant issues. ### Checklist -- [ ] CI tests are passing - [ ] README.md has been updated after any changes to variables and outputs. See https://github.com/terraform-aws-modules/terraform-aws-eks/#doc-generation diff --git a/.github/workflows/changelog-check.yaml b/.github/workflows/changelog-check.yaml index 34fe605..c884de9 100644 --- a/.github/workflows/changelog-check.yaml +++ b/.github/workflows/changelog-check.yaml @@ -1,20 +1,38 @@ name: CHANGELOG Checks on: + push: + branches: + - master pull_request: paths: - CHANGELOG.md + pull_request_target: jobs: - changelog-check: - name: CHANGELOG Check + comment: + name: Comment runs-on: ubuntu-latest steps: + - name: Find Existing PR Comment + id: prc + uses: peter-evans/find-comment@v1 + with: + issue-number: ${{ github.event.pull_request.number }} + comment-author: "github-actions[bot]" + body-includes: "The `CHANGELOG.md` file contents are handled by the maintainers during merge." + - name: PR Comment + if: ${{ steps.prc.outputs.comment-id == '' }} + uses: peter-evans/create-or-update-comment@v1 + env: + GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} + with: + issue-number: ${{ github.event.pull_request.number }} + body: | + Thank you for your contribution! + + The `CHANGELOG.md` file contents are handled by the maintainers during merge. This is to prevent pull request merge conflicts. + Please see the Contributing Guide for additional pull request review items. + + Remove any changes to the `CHANGELOG.md` file and commit them in this pull request. - name: Fail the check if changelog change - run: |- - echo "Thank you for your contribution!" - echo "" - echo "The 'CHANGELOG.md' file contents are handled by the maintainers during merge. This is to prevent pull request merge conflicts." - echo "Please see the Contributing Guide for additional pull request review items." - echo "" - echo "Remove any changes to the 'CHANGELOG.md' file and commit them in this pull request." - exit 1 + run: exit 1