Skip to content

ci: ask users to provide towncrier snippet #11

ci: ask users to provide towncrier snippet

ci: ask users to provide towncrier snippet #11

Workflow file for this run

---
name: Check that ChangeLog has been modified
on:
pull_request:
branches:
- main
jobs:
changed_files:
runs-on: ubuntu-latest
name: Test that towncrier file exists
if: ${{ ! contains(github.event.pull_request.labels.*.name, 'no-release-notes') }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Get changed files
id: changed-files
uses: tj-actions/changed-files@v42
with:
since_last_remote_commit: true
- name: Detect the missing Release Notes entry
env:
ALL_CHANGED_FILES: ${{ steps.changed-files.outputs.all_changed_files }}
run: |
status=false
for file in ${ALL_CHANGED_FILES}; do
case $file in
*release-notes-next*)
status=true
;;
esac
done
if $status; then
echo "Thank you for providing the release note snippet!"
else
echo "Please provide release notes snippet, per the instructions"
echo https://rpm-software-management.github.io/mock/Release-Notes-New-Entry
fi
$status