Skip to content

Skip branch updates for test-only pushes when strict=False#2319

Merged
hiroshinishio merged 2 commits intomainfrom
wes
Feb 24, 2026
Merged

Skip branch updates for test-only pushes when strict=False#2319
hiroshinishio merged 2 commits intomainfrom
wes

Conversation

@hiroshinishio
Copy link
Collaborator

@hiroshinishio hiroshinishio commented Feb 24, 2026

Summary

  • When a push to main only contains test file changes and the repo's branch protection doesn't require branches to be up-to-date (strict=False), skip updating all open GitAuto PR branches
  • Repos with strict=True (like Foxquilt) still get updates as before since they require up-to-date branches before merging
  • Refactored get_required_status_checks to return a StatusChecksResult dataclass instead of a tuple, exposing the strict flag from GitHub's branch protection API

Social Media Post (GitAuto)

Every merge to main triggered branch updates on all open GitAuto PRs - even when the merge was just test files. For repos that don't require up-to-date branches, that's pure CI waste. Now we check the branch protection strict setting and skip updates when it's safe to.

Social Media Post (Wes)

Noticed every test-only merge was triggering CI reruns on all open PRs. The branch update logic didn't distinguish between code changes and test changes. Added a check: if all changed files are tests and the repo doesn't enforce up-to-date branches, skip the update. Simple filter, fewer wasted CI runs.

@hiroshinishio hiroshinishio self-assigned this Feb 24, 2026
@hiroshinishio hiroshinishio merged commit dc0c7d4 into main Feb 24, 2026
1 check passed
@hiroshinishio hiroshinishio deleted the wes branch February 24, 2026 05:18
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.

1 participant