Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add workflow to check for expected @wordpress/components CHANGELOG updates #49443

Merged
merged 4 commits into from
Apr 5, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
30 changes: 30 additions & 0 deletions .github/workflows/check-components-changelog.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,30 @@
name: Verify @wordpress/components CHANGELOG update

on:
pull_request:
types: [opened, synchronize]
paths:
- 'packages/components/**'
- '!packages/components/src/**/stories/**'
- '!packages/components/src**/test/**'
jobs:
check:
name: Check CHANGELOG diff
runs-on: ubuntu-latest
steps:
- name: 'Get PR commit count'
run: echo "PR_COMMIT_COUNT=$(( ${{ github.event.pull_request.commits }} + 1 ))" >> "${GITHUB_ENV}"
- name: Checkout code
uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
ref: ${{ github.event.pull_request.head.ref }}
fetch-depth: ${{ env.PR_COMMIT_COUNT }}
- name: 'Fetch relevant history from origin'
run: git fetch origin ${{ github.event.pull_request.base.ref }}
- name: Run git diff
run: |
changelog_path="packages/components/CHANGELOG.md"
if git diff --quiet ${{ github.event.pull_request.base.sha }} HEAD -- "$changelog_path"; then
echo "Please add a CHANGELOG entry to $changelog_path"
exit 1
fi