Skip to content

Fix auto-merge: compare required checks by app_id instead of app name#2553

Merged
hiroshinishio merged 1 commit intomainfrom
wes
Apr 19, 2026
Merged

Fix auto-merge: compare required checks by app_id instead of app name#2553
hiroshinishio merged 1 commit intomainfrom
wes

Conversation

@hiroshinishio
Copy link
Copy Markdown
Collaborator

@hiroshinishio hiroshinishio commented Apr 19, 2026

Summary

  • Fix critical bug: auto-merge handler compared check suite app names (e.g. "CircleCI Checks") against required status check context strings (e.g. "build_deploy_development_workflow"), which never matched. Now compares by app_id available in both data sources.
  • Add app_ids: set[int] | None to StatusChecksResult dataclass, extracted from branch protection API response
  • Add MergeableState Literal type in its own module, used in PullRequest TypedDict and BLOCKED_STATE_REASONS
  • Replace vague not in condition with explicit in BLOCKED_STATE_REASONS check
  • Improve all log messages to state consequences ("returning because...", "proceeding to merge because...")
  • Delete unused get_check_runs module
  • 50 tests covering real repo scenarios (website PRs GitAuto: Low Test Coverage: services/github/comments/get_comments.py #809-Low Test Coverage: services/slack/slack.py #811, Foxquilt with CircleCI app_id=18001)

Social Media Post (GitAuto)

Auto-merge bug fix: required check comparison now uses app_id

  • Fixed a bug where auto-merge compared app names against check context strings, which never matched
  • Required status checks now correctly matched by app_id from branch protection API
  • Added 50 tests covering real customer scenarios including CircleCI and GitHub Actions

The handler compared check suite app names (e.g. "CircleCI Checks") against
required status check context strings (e.g. "build_deploy_development_workflow"),
which never matched. Now compares by app_id available in both data sources.

Also: add MergeableState Literal type, improve log messages, add real-repo
test cases for website (PRs #809-#811) and Foxquilt with 50 total tests.
@hiroshinishio hiroshinishio self-assigned this Apr 19, 2026
@hiroshinishio hiroshinishio merged commit eedb4df into main Apr 19, 2026
1 check passed
@hiroshinishio hiroshinishio deleted the wes branch April 19, 2026 00:44
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