Skip to content

Commit

Permalink
Changelog action
Browse files Browse the repository at this point in the history
  • Loading branch information
Alexendoo committed Nov 19, 2024
1 parent 53994bd commit 5d9c710
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/pr_description.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,19 @@
name: Check Pull Request Description

on:
pull_request:
# synchronize is not technically needed, but
types: [opened, edited, synchronize]

jobs:
changelog:
runs-on: ubuntu-latest

steps:
- run: |
body=$(jq -r <<< '${{ toJson(github.event.pull_request.body) }}')
if [[ -z $(grep -oP 'changelog: *\K\S+' <<< "$body") ]]; then
echo '::error title=Pull Request body is missing `changelog: ...`::Please write a short comment explaining your change (or "none" for internal only changes)'
exit 1
fi

0 comments on commit 5d9c710

Please sign in to comment.