Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .github/CODEOWNERS
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
/.github/CODEOWNERS @neo4j/drivers
/.github/workflows/ @neo4j/drivers
13 changes: 13 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -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"
55 changes: 55 additions & 0 deletions .github/workflows/changelog_entry.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,55 @@
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:
- uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- 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}.<type>.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"
echo "Checking changelog entries contain '<ISSUES_LIST>' placeholder on the first line..."
missing=()
while IFS= read -r file; do
if ! head -n 1 "$file" | grep -qF '<ISSUES_LIST>'; then
missing+=("$file")
fi
done <<< "$matching"
if [ ${#missing[@]} -gt 0 ]; then
echo "::error::The following changelog entries must contain '<ISSUES_LIST>' 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
1 change: 1 addition & 0 deletions changelog.d/1337.testing.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Some summary of the change<ISSUES_LIS>.
1 change: 1 addition & 0 deletions changelog.d/42.test.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Some summary of the change<ISSUES_LIST>.
Loading