From fd40cc1a10fe309f565b50e5ad701a051926783a Mon Sep 17 00:00:00 2001 From: An Tran Date: Mon, 2 Feb 2026 19:05:40 +1000 Subject: [PATCH 1/2] 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..1e5be5db8 --- /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. 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 11fc3d5832bfd7ea38c5955343334bce2d371574 Mon Sep 17 00:00:00 2001 From: An Tran Date: Wed, 4 Feb 2026 12:53:01 +1000 Subject: [PATCH 2/2] ci: only trigger changelog workflow on pull request --- .github/workflows/changelog-requirement.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/changelog-requirement.yml b/.github/workflows/changelog-requirement.yml index 1e5be5db8..56bec01ce 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: @@ -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 "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