Skip to content

[CI] Stabilise computing the list of changed files for ruff.#21068

Merged
hageboeck merged 1 commit intoroot-project:masterfrom
hageboeck:ruff_merge_base
Jan 29, 2026
Merged

[CI] Stabilise computing the list of changed files for ruff.#21068
hageboeck merged 1 commit intoroot-project:masterfrom
hageboeck:ruff_merge_base

Conversation

@hageboeck
Copy link
Member

When a user branched from master a while ago, the diff step in the ruff action will compute the list of changed files wrongly. Here, we use the fact that the checkout action uses a merge commit on top of the target branch, so computing the diff between the last two commits encompasses all the files touched in the PR.

An example of the failure case can be seen in this PR: #20992
It doesn't touch any Python files, but the ruff check failed.

@hageboeck hageboeck self-assigned this Jan 29, 2026
@hageboeck hageboeck added the skip ci Skip the full builds on the actions runners label Jan 29, 2026
@github-actions
Copy link

github-actions bot commented Jan 29, 2026

Test Results

0 tests   0 ✅  0s ⏱️
0 suites  0 💤
0 files    0 ❌

Results for commit 29b7cca.

♻️ This comment has been updated with latest results.

@hageboeck hageboeck removed the skip ci Skip the full builds on the actions runners label Jan 29, 2026
When a user branched from master a while ago, the diff step in the ruff
action can compute the list of changed files wrongly.
Here, we use the fact that the checkout action uses a merge commit on
top of the target branch, so computing the diff between the last two
commits encompasses all the files touched in the PR.
@hageboeck hageboeck requested a review from siliataider January 29, 2026 13:28
@hageboeck hageboeck marked this pull request as ready for review January 29, 2026 13:29
@hageboeck hageboeck requested a review from dpiparo as a code owner January 29, 2026 13:29
Copy link
Contributor

@siliataider siliataider left a comment

Choose a reason for hiding this comment

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

LGTM thanks!

@hageboeck hageboeck merged commit 27ee136 into root-project:master Jan 29, 2026
9 of 31 checks passed
@hageboeck hageboeck deleted the ruff_merge_base branch January 29, 2026 14:12
siliataider added a commit to siliataider/root that referenced this pull request Feb 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants