Skip to content

GitHub workflows: Fix changelog checks for forked PRs - #80538

Merged
mirka merged 3 commits into
WordPress:trunkfrom
mirka:fix/fork-changelog-base-fetch-retest
Jul 21, 2026
Merged

GitHub workflows: Fix changelog checks for forked PRs#80538
mirka merged 3 commits into
WordPress:trunkfrom
mirka:fix/fork-changelog-base-fetch-retest

Conversation

@mirka

@mirka mirka commented Jul 21, 2026

Copy link
Copy Markdown
Member

What?

Fixes the optional package changelog workflow to fetch the base branch history from the base repository instead of the pull request author's fork.

Why?

When a pull request comes from a fork whose trunk branch is behind upstream, the current fetch may not include the pull request's base SHA. The subsequent three-dot diff cannot resolve the merge base and may incorrectly skip the changelog check. This occurred in #80472.

How?

Fetches the base branch from $GITHUB_SERVER_URL/$GITHUB_REPOSITORY.git. These variables identify the repository running the workflow, so forked and same-repository pull requests use the upstream base history consistently.

Testing Instructions

The fork's trunk was at ae9a734, while this PR's upstream base was 1048917. The baseline and fix commits can be seen in the PR history.

  1. Open the baseline workflow run without the fix.
  2. Confirm the Components check fetches trunk from mirka/gutenberg, fails to resolve 1048917...HEAD, and incorrectly succeeds after reporting no relevant changes.
  3. Open the workflow run after applying the fix.
  4. Confirm the Components check fetches trunk from WordPress/gutenberg, resolves the diff, and reaches the expected Please add a CHANGELOG entry to packages/components/CHANGELOG.md failure.

@mirka mirka self-assigned this Jul 21, 2026
@github-actions github-actions Bot added the [Package] Components /packages/components label Jul 21, 2026
@github-actions github-actions Bot removed the [Package] Components /packages/components label Jul 21, 2026
@mirka mirka added the [Type] Code Quality Issues or PRs that relate to code quality label Jul 21, 2026
@mirka
mirka marked this pull request as ready for review July 21, 2026 18:40
@mirka
mirka requested a review from desrosj as a code owner July 21, 2026 18:40
@github-actions

Copy link
Copy Markdown

The following accounts have interacted with this PR and/or linked issues. I will continue to update these lists as activity occurs. You can also manually ask me to refresh this list by adding the props-bot label.

If you're merging code through a pull request on GitHub, copy and paste the following into the bottom of the merge commit message.

Co-authored-by: mirka <0mirka00@git.wordpress.org>

To understand the WordPress project's expectations around crediting contributors, please review the Contributor Attribution page in the Core Handbook.

@mirka
mirka requested a review from a team July 21, 2026 18:40
@mirka
mirka merged commit 7546d82 into WordPress:trunk Jul 21, 2026
52 checks passed
@github-actions github-actions Bot added this to the Gutenberg 23.7 milestone Jul 21, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

[Type] Code Quality Issues or PRs that relate to code quality

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants

Sponsor
SponsoredKunjungi sekarang
Promo