Skip to content

Commit-queue should automatically handle PRs with merge commits from the target branch #967

Description

@pimterry

Some contributors merge into their PR branch from main rather than rebasing. We might not recommend this, but it shouldn't be a major issue. Unfortunately it seems that the commit-queue label can't handle this, and fails with:

error: commit ... is a merge but no -m option was given.
fatal: cherry-pick failed

Here's a example I just ran into: nodejs/node#59375 (comment). More examples here.

AFAICT this then always requires manually landing the PR, but it feels like we should be able to handle these automatically without much trouble.

Activity

  1. aduh95 commented on Aug 12, 2025

    @aduh95
    Contributor

    it feels like we should be able to handle these automatically without much trouble.

    It would require changing how to pick up commits quite a lot though, and would only work for --fixupAll/commit-queue-squash landing sessions. Currently we download the patches from https://github.com/nodejs/node/pulls/${PR_ID}.patch, but in order to support merge commits, we'd probably have to fetch to actual PR head branch

  2. targos commented on Aug 12, 2025

    @targos
    Member

    I thought merge commits weren't supported by the Jenkins CI workflows anyway but it looks like it wasn't an issue for that PR

  3. aduh95 commented on Aug 12, 2025

    @aduh95
    Contributor

    I thought merge commits weren't supported by the Jenkins CI workflows anyway but it looks like it wasn't an issue for that PR

    Maybe a side effect of having COMMIT_SHA_CHECK is that the CI now supports merge commits?

  4. richardlau commented on Aug 12, 2025

    @richardlau
    Member

    I thought merge commits weren't supported by the Jenkins CI workflows anyway but it looks like it wasn't an issue for that PR

    FWIW the Jenkins CI doesn't explicitly block merge commits but it does attempt to rebase PRs onto the base branch (e.g. main) and it's that rebase that more often than not fails for merge commits.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions