Skip to content

Commit 910c014

Browse files
ShahanaFarooquicdecker
authored andcommitted
ci: Prebuild action fails if Changelog is missing from all commits of a PR
Changelog-None.
1 parent d067066 commit 910c014

File tree

1 file changed

+10
-0
lines changed

1 file changed

+10
-0
lines changed

.github/workflows/ci.yaml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,16 @@ jobs:
4242
git fetch origin ${{ github.base_ref }}
4343
git rebase origin/${{ github.base_ref }}
4444
45+
- name: Check changelog
46+
run: |
47+
base_ref="${{ github.base_ref }}"
48+
if [ -z "$base_ref" ]; then
49+
base_ref="master"
50+
fi
51+
if [[ -z "$(git log origin/$base_ref..HEAD --oneline --grep='Changelog-')" && "$(git rev-parse --abbrev-ref HEAD)" != "$base_ref" ]]; then
52+
echo "::error::'Changelog' entry is missing in all commits" && exit 1
53+
fi
54+
4555
- name: Set up Python 3.8
4656
uses: actions/setup-python@v5
4757
with:

0 commit comments

Comments
 (0)