Skip to content

Commit

Permalink
Add workflow to check for expected @wordpress/components CHANGELOG up…
Browse files Browse the repository at this point in the history
…dates (#49443)

Co-authored-by: Marco Ciampini <marco.ciampo@gmail.com>
  • Loading branch information
chad1008 and ciampo authored Apr 5, 2023
1 parent afc51f7 commit 0cb1c2e
Showing 1 changed file with 30 additions and 0 deletions.
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

1 comment on commit 0cb1c2e

@github-actions
Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Flaky tests detected in 0cb1c2e.
Some tests passed with failed attempts. The failures may not be related to this commit but are still reported for visibility. See the documentation for more information.

🔍 Workflow run URL: https://github.com/WordPress/gutenberg/actions/runs/4620928534
📝 Reported issues:

Please sign in to comment.