Skip to content

deps: Bump the aspnetcore group with 7 updates #257

deps: Bump the aspnetcore group with 7 updates

deps: Bump the aspnetcore group with 7 updates #257

Workflow file for this run

name: Changelog Check
# Verify-only: confirms a PR adds an entry under "## [Unreleased]" in CHANGELOG.md.
# It never writes to the repo, so it cannot trip branch protection on `main`.
# Replaces the old post-merge auto-writer, which always failed pushing to protected main
# and risked duplicate entries. Release cuts are still handled by release-changelog.yml.
on:
pull_request:
types: [opened, synchronize, reopened, labeled, unlabeled]
branches: [main]
permissions:
contents: read
jobs:
changelog:
name: Changelog entry present
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v6
with:
fetch-depth: 0
- name: Require a CHANGELOG entry under [Unreleased]
env:
# Passed via env (not inlined) to avoid shell injection from PR titles/labels.
TITLE: ${{ github.event.pull_request.title }}
LABELS: ${{ join(github.event.pull_request.labels.*.name, ',') }}
BASE_SHA: ${{ github.event.pull_request.base.sha }}
HEAD_SHA: ${{ github.event.pull_request.head.sha }}
run: |
set -euo pipefail
# 1) Exempt non-user-facing PR types (mirrors the previous skip set).
if printf '%s' "$TITLE" | grep -qiE '^(docs|style|chore|ci|test|build)(\(.*\))?[!]?:'; then
echo "Exempt PR type — skipping changelog check."
echo " title: $TITLE"
exit 0
fi
# 2) Manual escape hatch for legitimate exceptions.
if printf ',%s,' "$LABELS" | grep -q ',skip-changelog,'; then
echo "skip-changelog label present — skipping changelog check."
exit 0
fi
# 3) Extract the [Unreleased] block from both sides of the PR.
unreleased() {
git show "$1:CHANGELOG.md" 2>/dev/null \
| awk '/^## \[Unreleased\]/{f=1; next} f && /^## \[/{f=0} f'
}
base_block="$(unreleased "$BASE_SHA" || true)"
head_block="$(unreleased "$HEAD_SHA" || true)"
# 4) Top-level entries this PR newly adds under [Unreleased].
new_entries="$(comm -13 \
<(printf '%s\n' "$base_block" | grep -E '^- ' | sort -u) \
<(printf '%s\n' "$head_block" | grep -E '^- ' | sort -u) || true)"
if [ -n "$new_entries" ]; then
echo "Found new [Unreleased] entry/entries:"
printf '%s\n' "$new_entries"
exit 0
fi
echo "::error::This PR has no new entry under '## [Unreleased]' in CHANGELOG.md."
echo "Add a Keep a Changelog entry (e.g. under '### Fixed'), or:"
echo " - use a 'docs|style|chore|ci|test|build:' PR title for non-user-facing changes, or"
echo " - apply the 'skip-changelog' label for a legitimate exception."
exit 1