Add check for CHANGELOG.md change when changelog label applied to PR (#33675)
* Add check for CHANGELOG.md change when changelog label applied to PR * Update changelog
This commit is contained in:
parent
59cb3b57ee
commit
e5dfc9cb27
|
@ -0,0 +1,10 @@
|
||||||
|
#!/bin/bash
|
||||||
|
set -uo pipefail
|
||||||
|
|
||||||
|
CHANGELOG_FILE="CHANGELOG.md"
|
||||||
|
echo "Checking: git diff --exit-code origin/${BASE_REF} -- ${CHANGELOG_FILE}"
|
||||||
|
|
||||||
|
if git diff --exit-code "origin/${BASE_REF}" -- "${CHANGELOG_FILE}"; then
|
||||||
|
>&2 echo "Error: this pull request requires an entry in $CHANGELOG_FILE, but no entry was found"
|
||||||
|
exit 1
|
||||||
|
fi
|
|
@ -0,0 +1,20 @@
|
||||||
|
name: Require changelog entry
|
||||||
|
|
||||||
|
on:
|
||||||
|
pull_request:
|
||||||
|
types: [opened, synchronize, reopened, labeled, unlabeled]
|
||||||
|
|
||||||
|
jobs:
|
||||||
|
check-changelog:
|
||||||
|
if: contains(github.event.pull_request.labels.*.name, 'changelog')
|
||||||
|
runs-on: ubuntu-latest
|
||||||
|
|
||||||
|
steps:
|
||||||
|
- uses: actions/checkout@v3
|
||||||
|
with:
|
||||||
|
fetch-depth: 0
|
||||||
|
- name: Check if changes to CHANGELOG.md
|
||||||
|
shell: bash
|
||||||
|
env:
|
||||||
|
BASE_REF: ${{ github.event.pull_request.base.ref }}
|
||||||
|
run: .github/scripts/check-changelog.sh
|
|
@ -14,6 +14,7 @@ Release channels have their own copy of this changelog:
|
||||||
<a name="edge-channel"></a>
|
<a name="edge-channel"></a>
|
||||||
## [1.18.0] - Unreleased
|
## [1.18.0] - Unreleased
|
||||||
* Changes
|
* Changes
|
||||||
|
* Added a github check to support `changelog` label
|
||||||
* Upgrade Notes
|
* Upgrade Notes
|
||||||
|
|
||||||
## [1.17.0]
|
## [1.17.0]
|
||||||
|
|
Loading…
Reference in New Issue