-
Notifications
You must be signed in to change notification settings - Fork 860
chore(workflows): run changelog check in CI for every public package
#9041
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
Conversation
|
💡 This check is meant to be triggered by PRs. So a possible way to test it is simply basing a new branch off this one, and making appropriate changes:
maybe some other cases worth testing. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This looks good to me, Arturo! 🟢 Thanks for doing this.
I'd wait for Tomasz to review.
Co-authored-by: Weronika Olejniczak <[email protected]>
Co-authored-by: Weronika Olejniczak <[email protected]>
to clean up workflow in changelog.yml
changelog in CI for every public packagechangelog check in CI for every public package
|
|
||
| # Find all public packages and check for changes | ||
| public_packages=() | ||
| for dir in packages/*/; do |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Not a change request]
Yarn workspaces can technically have packages in different places than just the packages directory - they can be nested, or live somewhere else depending on configuration. The recommended approach would be to use yarn workspaces list --json and parse it like we do here - https://github.com/elastic/eui/blob/main/packages/release-cli/src/yarn_utils.ts#L19. However, for the purpose of this PR I don't consider this necessary
| set -e | ||
|
|
||
| # Get the list of changed files | ||
| changed_files=$(git diff --name-only origin/main...HEAD) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
[Not a change request]
This could be simplified by relying on yarn's --since argument that lists packages changed since a specific ref (docs).
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you, Arturo, for updating the changelog checker logic! The changes seem correct, and none of my comments are blocking. Let's get this merged and see how it works live :D
|
Thank you @weronikaolejniczak and @tkajtoch for reviewing this one! Merging… 🤞 |
Summary
This PR updates the "Changelog required" workflow.
As of now, the check will pass if there's a changelog file present anywhere in
packages/*, regardless of the number of public packages that actually contain changes. This update makes sure the check in done for every public package that has changes.For example, the check will fail with "❌ Changelog file for PR # is missing in package 'eui-theme-borealis'" if:
euiandeui-theme-borealiseuiImportant
PR made with the help of AI, but carefully reviewed by a human (myself)
Why are we making this change?
To avoid issues while publishing packages, where a package expected to be published does not… (see #9007)
Resolves https://github.com/elastic/eui-private/issues/416
Impact to users
No impact, this is a change affecting only how the repo works.
QA
Do you know a good way to test this before actually merging? 😑