From 27822a1cc5fbdf1c37c8bc8f3a9747364f568f36 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Fri, 22 May 2026 07:35:22 +0200 Subject: [PATCH 1/5] CI: Add check for changelog entry --- .github/workflows/changelog_entry.yaml | 39 ++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) create mode 100644 .github/workflows/changelog_entry.yaml diff --git a/.github/workflows/changelog_entry.yaml b/.github/workflows/changelog_entry.yaml new file mode 100644 index 0000000..87614d1 --- /dev/null +++ b/.github/workflows/changelog_entry.yaml @@ -0,0 +1,39 @@ +name: Changelog Entry + +on: + pull_request: + types: [opened, synchronize, reopened, labeled, unlabeled] + +permissions: + contents: read + pull-requests: read + +jobs: + check: + name: Check changelog entry + runs-on: ubuntu-latest + steps: + - name: Verify changelog entry or "no changelog" label + env: + GH_TOKEN: ${{ github.token }} + REPO: ${{ github.repository }} + PR_NUMBER: ${{ github.event.pull_request.number }} + LABELS: ${{ toJson(github.event.pull_request.labels.*.name) }} + run: | + set -euo pipefail + if echo "$LABELS" | jq -e 'index("no changelog")' > /dev/null; then + echo "PR is labeled 'no changelog' - skipping check." + exit 0 + fi + expected="^changelog\\.d/${PR_NUMBER}\\.[^/]+\\.md$" + matching=$(gh api "repos/$REPO/pulls/$PR_NUMBER/files" --paginate \ + | jq -r '.[] | select(.status == "added") | .filename' \ + | grep -E "$expected" \ + || true) + if [ -z "$matching" ]; then + echo "::error::PR must add a file named 'changelog.d/${PR_NUMBER}..md' or carry the 'no changelog' label." + echo "See changelog.d/README.md for how to create an entry." + exit 1 + fi + echo "Found new changelog entry/entries:" + echo "$matching" From 7bdaf0a296f23ee433436393e8c080a91b58ec31 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Fri, 22 May 2026 08:11:58 +0200 Subject: [PATCH 2/5] Check `` on first line of each entry. --- .github/workflows/changelog_entry.yaml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/.github/workflows/changelog_entry.yaml b/.github/workflows/changelog_entry.yaml index 87614d1..e2b8f9d 100644 --- a/.github/workflows/changelog_entry.yaml +++ b/.github/workflows/changelog_entry.yaml @@ -13,6 +13,7 @@ jobs: name: Check changelog entry runs-on: ubuntu-latest steps: + - uses: actions/checkout@v4 - name: Verify changelog entry or "no changelog" label env: GH_TOKEN: ${{ github.token }} @@ -37,3 +38,18 @@ jobs: fi echo "Found new changelog entry/entries:" echo "$matching" + echo "Checking changelog entries contain '' placeholder on the first line..." + missing=() + while IFS= read -r file; do + if ! head -n 1 "$file" | grep -qF ''; then + missing+=("$file") + fi + done <<< "$matching" + if [ ${#missing[@]} -gt 0 ]; then + echo "::error::The following changelog entries must contain '' on the first line:" + for f in "${missing[@]}"; do + echo " - $f" + done + echo "See changelog.d/README.md for the expected format." + exit 1 + fi From 4bda290c467178cf471fc435f08827c39b946018 Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Fri, 22 May 2026 08:14:16 +0200 Subject: [PATCH 3/5] Add incorrect changelog entry --- changelog.d/88.dev.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/88.dev.md diff --git a/changelog.d/88.dev.md b/changelog.d/88.dev.md new file mode 100644 index 0000000..73709ba --- /dev/null +++ b/changelog.d/88.dev.md @@ -0,0 +1 @@ +Testing From f2c7fd02b47e6f06a2ed8d0aa23a7732440c72ba Mon Sep 17 00:00:00 2001 From: Robsdedude Date: Fri, 22 May 2026 08:33:40 +0200 Subject: [PATCH 4/5] Pin GHA sha, add dependabot & codeowners --- .github/CODEOWNERS | 2 ++ .github/dependabot.yml | 13 +++++++++++++ .github/workflows/changelog_entry.yaml | 2 +- changelog.d/88.dev.md | 1 - 4 files changed, 16 insertions(+), 2 deletions(-) create mode 100644 .github/CODEOWNERS create mode 100644 .github/dependabot.yml delete mode 100644 changelog.d/88.dev.md diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS new file mode 100644 index 0000000..ff2c165 --- /dev/null +++ b/.github/CODEOWNERS @@ -0,0 +1,2 @@ +/.github/CODEOWNERS @neo4j/drivers +/.github/workflows/ @neo4j/drivers diff --git a/.github/dependabot.yml b/.github/dependabot.yml new file mode 100644 index 0000000..a47f72b --- /dev/null +++ b/.github/dependabot.yml @@ -0,0 +1,13 @@ +version: 2 +updates: + - package-ecosystem: "github-actions" + directory: "/" + schedule: + interval: daily + cooldown: + default-days: 3 + open-pull-requests-limit: 5 + labels: + - "no changelog" + assignees: + - "robsdedude" diff --git a/.github/workflows/changelog_entry.yaml b/.github/workflows/changelog_entry.yaml index e2b8f9d..ea04737 100644 --- a/.github/workflows/changelog_entry.yaml +++ b/.github/workflows/changelog_entry.yaml @@ -13,7 +13,7 @@ jobs: name: Check changelog entry runs-on: ubuntu-latest steps: - - uses: actions/checkout@v4 + - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 - name: Verify changelog entry or "no changelog" label env: GH_TOKEN: ${{ github.token }} diff --git a/changelog.d/88.dev.md b/changelog.d/88.dev.md deleted file mode 100644 index 73709ba..0000000 --- a/changelog.d/88.dev.md +++ /dev/null @@ -1 +0,0 @@ -Testing From d9932a9a2124cec275b874f4bdcbee4200aae714 Mon Sep 17 00:00:00 2001 From: MaxAake <61233757+MaxAake@users.noreply.github.com> Date: Fri, 22 May 2026 10:55:04 +0200 Subject: [PATCH 5/5] test --- changelog.d/1337.testing.md | 1 + changelog.d/42.test.md | 1 + 2 files changed, 2 insertions(+) create mode 100644 changelog.d/1337.testing.md create mode 100644 changelog.d/42.test.md diff --git a/changelog.d/1337.testing.md b/changelog.d/1337.testing.md new file mode 100644 index 0000000..66033c2 --- /dev/null +++ b/changelog.d/1337.testing.md @@ -0,0 +1 @@ +Some summary of the change. \ No newline at end of file diff --git a/changelog.d/42.test.md b/changelog.d/42.test.md new file mode 100644 index 0000000..953c78e --- /dev/null +++ b/changelog.d/42.test.md @@ -0,0 +1 @@ +Some summary of the change. \ No newline at end of file