Skip to content

[ci] Improve change detection logic in run-for-change script - #85619

Merged
unstubbable merged 1 commit into
canaryfrom
hl/extract-change-detection-logic
Oct 31, 2025
Merged

unstubbable merged 1 commit into
canaryfrom
hl/extract-change-detection-logic

Conversation

@unstubbable

@unstubbable unstubbable commented Oct 31, 2025 •

Copy link
Copy Markdown
Contributor

This PR extracts the existing git change detection logic from the get-changed-tests script into a separate module. This allows reusing the same logic in the run-for-change script, ensuring consistent behavior across the two scripts to determine changed files. Specifically, this ensures that in stacked PRs, the docs-only change detection (and the test-only change detection in the upstack PR) works correctly by diffing against the appropriate base branch.

Copy link
Copy Markdown
Contributor Author

Comment thread scripts/get-changed-tests.mjs Outdated
@unstubbable
unstubbable force-pushed the hl/extract-change-detection-logic branch from 801c516 to 95469b2 Compare October 31, 2025 12:32
vercel[bot]

This comment was marked as resolved.

@unstubbable
unstubbable force-pushed the hl/extract-change-detection-logic branch from 95469b2 to 165ce02 Compare October 31, 2025 12:44
vercel[bot]

This comment was marked as resolved.

@unstubbable
unstubbable force-pushed the hl/extract-change-detection-logic branch from 165ce02 to 63da77e Compare October 31, 2025 12:51
This PR extracts the existing git change detection logic from the
`get-changed-tests` script into a separate module. This allows reusing
the same logic in the `run-for-change` script, ensuring consistent
behavior across the two scripts to determine changed files.
Specifically, this ensures that in stacked PRs, the docs-only change
detection (and the test-only change detection in the upstack PR) works
correctly by diffing against the appropriate base branch.
@unstubbable
unstubbable force-pushed the hl/extract-change-detection-logic branch from 63da77e to eaca0c2 Compare October 31, 2025 12:54
@ijjk

ijjk commented Oct 31, 2025 •

Copy link
Copy Markdown
Member

Tests Passed

@unstubbable
unstubbable marked this pull request as ready for review October 31, 2025 13:36
@unstubbable
unstubbable requested review from eps1lon and ijjk October 31, 2025 13:36
@unstubbable
unstubbable merged commit 5c045fb into canary Oct 31, 2025
542 of 552 checks passed
@unstubbable
unstubbable deleted the hl/extract-change-detection-logic branch October 31, 2025 17:10
huozhi pushed a commit that referenced this pull request Nov 12, 2025
This PR extracts the existing git change detection logic from the `get-changed-tests` script into a separate module. This allows reusing the same logic in the `run-for-change` script, ensuring consistent behavior across the two scripts to determine changed files. Specifically, this ensures that in stacked PRs, the docs-only change detection (and the test-only change detection in the upstack PR) works correctly by diffing against the appropriate base branch.
@github-actions github-actions Bot locked as resolved and limited conversation to collaborators Nov 15, 2025
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

created-by: Next.js team PRs by the Next.js team. locked

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants