Skip to content

fix(github): respect automergeStrategy with platform automerge#44563

Open
jetersen wants to merge 3 commits into
renovatebot:mainfrom
jetersen:fix/41177-github-platform-automerge-strategy
Open

fix(github): respect automergeStrategy with platform automerge#44563
jetersen wants to merge 3 commits into
renovatebot:mainfrom
jetersen:fix/41177-github-platform-automerge-strategy

Conversation

@jetersen

@jetersen jetersen commented Jul 14, 2026

Copy link
Copy Markdown

Changes

Use the configured automergeStrategy when enabling GitHub platform-native automerge, falling back to the repository-detected merge method when the strategy is auto or unsupported.

Add a regression test proving that an explicit rebase strategy overrides the detected squash method in the enablePullRequestAutoMerge GraphQL mutation.

Document that supported platforms apply automergeStrategy to platform-native automerge, with cross-references from both related option sections.

Context

Related discussion: #41177

  • This closes an existing Issue, Closes: #
  • This doesn’t close an Issue, but I accept the risk that this PR may be closed if maintainers disagree with its opening or implementation

AI assistance disclosure

Did you use AI tools to create any part of this pull request?

  • No — I did not use AI for this contribution.
  • Yes — minimal assistance (e.g., IDE autocomplete, small code completions, grammar fixes).
  • Yes — substantive assistance (AI-generated non-trivial portions of code, tests, or documentation).
  • Yes — other (please describe):

Codex, based on GPT-5, was used to inspect the codebase, implement the change, add the regression test and documentation, and prepare this pull request description.

Documentation

  • I have updated the documentation, or
  • No documentation update is required

How I’ve tested my work

  • Code inspection only, or
  • Newly added/modified unit tests, or
  • No unit tests, but ran on a real repository, or
  • Both unit tests + ran on a real repository

Full pnpm test using the repository-pinned Node 24.18.0 toolchain:

  • 942 test files passed
  • 24,195 tests passed; 1 expected failure
  • 100% statements, functions, and lines coverage

The documentation updates also pass pnpm check --all docs/usage/configuration-options.md.

@github-actions github-actions Bot requested a review from viceice July 14, 2026 09:27
@cla-assistant

cla-assistant Bot commented Jul 14, 2026

Copy link
Copy Markdown

CLA assistant check
All committers have signed the CLA.

@viceice viceice left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

needs docs update, check automerge strategy docs

@jetersen

Copy link
Copy Markdown
Author

@viceice not sure which of the two commits you prefer for wording the docs, but let me know and I'll update it.

@viceice viceice left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

supportedPlatforms: ['azure', 'bitbucket', 'forgejo', 'gitea', 'github'],

I thought it was missing here, but isn't.

@jetersen

Copy link
Copy Markdown
Author

@viceice at least after checking who supports respecting automergeStrategy with platform automerge, here is the list:

  • Azure, Gitea and Forgejo already passes automergeStrategy to native automerge.
  • This PR brings GitHub into alignment with them.
  • Bitbucket Server and GitLab support platformAutomerge but not automergeStrategy.

Getting Bitbucket Server and GitLab supported in a follow up PRs but I can't make promise on Bitbucket Server. But at least it would be good to align on the platform support.

@viceice viceice requested a review from jamietanna July 14, 2026 13:47
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