diff --git a/.changes/unreleased/internal-20240720-181428.yaml b/.changes/unreleased/internal-20240720-181428.yaml new file mode 100644 index 0000000..8c57156 --- /dev/null +++ b/.changes/unreleased/internal-20240720-181428.yaml @@ -0,0 +1,5 @@ +kind: internal +body: Enforces CHANGELOG entries on PRs +time: 2024-07-20T18:14:28.964448+02:00 +custom: + Issue: "" diff --git a/.github/workflows/check-changelog.yml b/.github/workflows/check-changelog.yml new file mode 100644 index 0000000..3053d84 --- /dev/null +++ b/.github/workflows/check-changelog.yml @@ -0,0 +1,25 @@ +name: Require CHANGELOG entry + +on: + pull_request: + types: + # On by default if you specify no types. + - "opened" + - "reopened" + - "synchronize" + # For `skip-label` only. + - "labeled" + - "unlabeled" + +jobs: + check-changelog: + runs-on: ubuntu-latest + steps: + - name: "Check for changelog entry" + uses: brettcannon/check-for-changed-files@v1 + with: + file-pattern: | + .changes/unreleased/*.yaml + CHANGELOG.md + skip-label: "skip changelog" + failure-message: "Missing a changelog file in ${file-pattern}; please add one or apply the ${skip-label} label to the pull request"