Skip to content

chore(workflows): run changelog check in CI for every public package - #9041

Merged
acstll merged 5 commits into
elastic:mainfrom
acstll:changelog-ci-all-packages
Oct 27, 2025
Merged

acstll merged 5 commits into
elastic:mainfrom
acstll:changelog-ci-all-packages

Conversation

@acstll

@acstll acstll commented Sep 19, 2025

Copy link
Copy Markdown
Contributor

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:

  • the PR has changes in 2 packages: eui and eui-theme-borealis
  • there is only a changelog file for eui

Important

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? 😑

@acstll acstll self-assigned this Sep 19, 2025
@acstll acstll added the skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation) label Sep 19, 2025
@acstll
acstll marked this pull request as ready for review September 19, 2025 10:14
@acstll
acstll requested a review from a team as a code owner September 19, 2025 10:14
@weronikaolejniczak

Copy link
Copy Markdown
Contributor

💡 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:

  • changing eui and eui-theme-borealis, and supplying both changelogs (should pass)
  • changing eui and eui-theme-borealis, supplying a changelog for eui and using skip-changelog:eui-theme-borealis (should pass)
  • changing eui and eui-theme-borealis, using skip-changelog (should pass)
  • changing eui and eui-theme-borealis, not supplying a changelog for eui and using skip-changelog:eui-theme-borealis (should fail)
  • changing eui and eui-theme-borealis, supplying a changelog for eui and using skip-changelog:eui (should fail)

maybe some other cases worth testing.

Comment thread .github/workflows/changelog.yml Resolved

@weronikaolejniczak weronikaolejniczak left a comment

Copy link
Copy Markdown
Contributor

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.

acstll and others added 4 commits September 29, 2025 15:27
@acstll acstll changed the title chore(workflows): run changelog in CI for every public package chore(workflows): run changelog check in CI for every public package Sep 29, 2025

# Find all public packages and check for changes
public_packages=()
for dir in packages/*/; do

Copy link
Copy Markdown
Contributor

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)

Copy link
Copy Markdown
Contributor

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).

@tkajtoch tkajtoch left a comment

Copy link
Copy Markdown
Contributor

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

@acstll

acstll commented Oct 27, 2025

Copy link
Copy Markdown
Contributor Author

Thank you @weronikaolejniczak and @tkajtoch for reviewing this one! Merging… 🤞

@acstll
acstll merged commit 3c9c579 into elastic:main Oct 27, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

skip-changelog Use on PRs to skip changelog requirement (Don't delete - used for automation)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants