From 19c12efd4741d733b9fc8ffa4779deae9b788375 Mon Sep 17 00:00:00 2001 From: An Tran Date: Mon, 2 Feb 2026 19:05:40 +1000 Subject: [PATCH 1/4] ci: enfore changelog entry on PR --- .github/workflows/changelog-requirement.yml | 33 +++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/changelog-requirement.yml diff --git a/.github/workflows/changelog-requirement.yml b/.github/workflows/changelog-requirement.yml new file mode 100644 index 000000000..f0a42284b --- /dev/null +++ b/.github/workflows/changelog-requirement.yml @@ -0,0 +1,33 @@ +name: Changelog Requirement + +on: + pull_request: + types: [ opened, synchronize, labeled, unlabeled ] + paths: + - 'gateway/**' + +jobs: + require-changelog: + if: ${{ !contains(github.event.*.labels.*.name, 'skip-changelog') }} + name: Requires changelog + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + fetch-depth: 2 + + - name: Find changelog files + id: changelog-file + uses: tj-actions/changed-files@24d32ffd492484c1d75e0c0b894501ddb9d30d62 # v47 + with: + # Avoid using single or double quotes for multiline patterns + files: | + CHANGELOG.md + + - name: Check changelog existence + if: steps.changelog-file.outputs.any_changed == 'false' + run: | + echo("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/3scale/apicast/blob/master/CHANGELOG.md)." + echo "Note, we hard-wrap at 80 chars and use 2 spaces after the last line." + echo "If you believe this PR requires no changelog entry, label it with \"skip-changelog\"." + exit 1 From 5268c6c6c5db3717e52275dd082cb2ae39d47042 Mon Sep 17 00:00:00 2001 From: An Tran Date: Tue, 3 Feb 2026 12:25:27 +1000 Subject: [PATCH 2/4] Fix ci --- .github/workflows/changelog-requirement.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog-requirement.yml b/.github/workflows/changelog-requirement.yml index f0a42284b..1e5be5db8 100644 --- a/.github/workflows/changelog-requirement.yml +++ b/.github/workflows/changelog-requirement.yml @@ -27,7 +27,7 @@ jobs: - name: Check changelog existence if: steps.changelog-file.outputs.any_changed == 'false' run: | - echo("Please include a CHANGELOG entry. \nYou can find it at [CHANGELOG.md](https://github.com/3scale/apicast/blob/master/CHANGELOG.md)." + echo("Please include a CHANGELOG entry. You can find it at [CHANGELOG.md](https://github.com/3scale/apicast/blob/master/CHANGELOG.md)." echo "Note, we hard-wrap at 80 chars and use 2 spaces after the last line." echo "If you believe this PR requires no changelog entry, label it with \"skip-changelog\"." exit 1 From fade6b7fc69eed1faed917c2e2bf1a65f8b46eb6 Mon Sep 17 00:00:00 2001 From: An Tran Date: Tue, 3 Feb 2026 12:31:12 +1000 Subject: [PATCH 3/4] Another fix --- .github/workflows/changelog-requirement.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/changelog-requirement.yml b/.github/workflows/changelog-requirement.yml index 1e5be5db8..f7c4ca593 100644 --- a/.github/workflows/changelog-requirement.yml +++ b/.github/workflows/changelog-requirement.yml @@ -27,7 +27,7 @@ jobs: - name: Check changelog existence if: steps.changelog-file.outputs.any_changed == 'false' run: | - echo("Please include a CHANGELOG entry. You can find it at [CHANGELOG.md](https://github.com/3scale/apicast/blob/master/CHANGELOG.md)." - echo "Note, we hard-wrap at 80 chars and use 2 spaces after the last line." - echo "If you believe this PR requires no changelog entry, label it with \"skip-changelog\"." + echo "Please include a CHANGELOG entry. You can find it at [CHANGELOG.md](https://github.com/3scale/apicast/blob/master/CHANGELOG.md)." >> $GITHUB_STEP_SUMMARY + echo "Note, we hard-wrap at 80 chars and use 2 spaces after the last line." >> $GITHUB_STEP_SUMMARY + echo "If you believe this PR requires no changelog entry, label it with \"skip-changelog\"." >> $GITHUB_STEP_SUMMARY exit 1 From e8a0d4a421d44f2782ddb35aee48725dd50056af Mon Sep 17 00:00:00 2001 From: An Tran Date: Wed, 4 Feb 2026 12:55:43 +1000 Subject: [PATCH 4/4] Update changelog-requirement.yml --- .github/workflows/changelog-requirement.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/changelog-requirement.yml b/.github/workflows/changelog-requirement.yml index f7c4ca593..0153f6d29 100644 --- a/.github/workflows/changelog-requirement.yml +++ b/.github/workflows/changelog-requirement.yml @@ -8,7 +8,7 @@ on: jobs: require-changelog: - if: ${{ !contains(github.event.*.labels.*.name, 'skip-changelog') }} + if: ${{ !contains(github.event.pull_request.labels.*.name, 'skip-changelog') }} name: Requires changelog runs-on: ubuntu-latest steps: