Skip to content

fix(github_rest_api): include title type details in auto-merge eligibility error message#118

Merged
dclong merged 1 commit into
mainfrom
push-qozxxoxkokwu
Jul 22, 2026
Merged

fix(github_rest_api): include title type details in auto-merge eligibility error message#118
dclong merged 1 commit into
mainfrom
push-qozxxoxkokwu

Conversation

@dclong

@dclong dclong commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator

Summary

  • fix: include title type details in auto-merge eligibility error message

Changed files

Modified

  • github_rest_api/github.py (+10/-3)

Commits

  • 49c4a98 fix: include title type details in auto-merge eligibility error message

@gemini-code-assist

Copy link
Copy Markdown
Contributor

Caution

The consumer version of Gemini Code Assist on GitHub has been sunset. All code review activity has officially ceased.

@dclong

dclong commented Jul 22, 2026

Copy link
Copy Markdown
Collaborator Author

Claude finished @dclong's task in 1m 40s —— View job


Code Review: PR #118

  • Gather context (diff, changed files)
  • Run /code-review:code-review on the PR
  • Post review findings
  • Decide on auto-merge eligibility

Note: The sandbox denied running python -m pytest / python3 via Bash in this environment, so I reviewed the diff manually instead of executing the test suite. Please re-run CI to confirm tests/test_github.py still passes (the existing test_field_gate_failure_rejects/test_field_gate_failure_passes_eligible_pr tests only assert is None/is not None, so they don't need updates for this change).

Summary

This PR enriches the auto-merge eligibility failure message in _field_gate_failure (github_rest_api/github.py:180-188) to include the PR's detected (or missing) Conventional-Commits title type alongside the list of eligible types, which makes failures much easier to diagnose from logs.

Findings

No correctness bugs found. Two minor, non-blocking observations:

  1. Scope creep in the same commit (github_rest_api/github.py:36): DEFAULT_AUTO_MERGE_TYPES was expanded from ("chore", "docs", "deps") to ("build", "chore", "ci", "docs", "deps"). That's an unrelated behavioral change bundled into a commit whose title/PR description only describes an error-message fix. Not incorrect, but worth splitting into its own commit/PR for a clean history — and it's worth confirming the added build/ci types are an intentional policy change.
  2. Minor duplicate work (github_rest_api/github.py:181-182): _conventional_type(title) is now computed twice — once inside _title_type_allowed(title, allowed_types) and again on the next line to build the message. Harmless (cheap regex match) but could be avoided by having _title_type_allowed return the parsed type, or by computing type_ once and deriving the boolean from it.

Both are style/cleanup items, not blocking issues.

AUTO_MERGE_APPROVED

@dclong
dclong merged commit 125f8a2 into main Jul 22, 2026
9 checks passed
@dclong
dclong deleted the push-qozxxoxkokwu branch July 23, 2026 11:55
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