Skip to content

Seeing "Pull request is not in the correct state to enable auto-merge" with gh pr merge {x} --auto #3858

@jefftriplett

Description

@jefftriplett

Describe the bug

For some of my repos, when I try to gh merge I'm seeing, "Pull request is not in the correct state to enable auto-merge".

I'll use this repo as an example: djangocon/2021.djangocon.us#6

❯ gh --version
gh version 1.11.0 (2021-06-03)
https://github.com/cli/cli/releases/tag/v1.11.0

Steps to reproduce the behavior

  1. Type this '...'

gh pr merge 6 --auto

  1. View the output '....'
? What merge method would you like to use? Create a merge commit
? Delete the branch locally and on GitHub? Yes
? What's next? Submit
Pull request is not in the correct state to enable auto-merge
  1. See error
Pull request is not in the correct state to enable auto-merge

Expected vs actual behavior

I would expect for the PR to be merged.

I haven't spottend a pattern yet but I frequently see this error.

Logs

Paste the activity from your command line. Redact if needed.

❯ gh pr list

Showing 5 of 5 open pull requests in djangocon/2021.djangocon.us

#12  2021 Sponsor updates pre-conference :pencil:  dawnwages:master
#9   Bump lodash from 4.17.19 to 4.17.21           dependabot/npm_and_yarn/lodash-4.17.21
#8   Bump ssri from 6.0.1 to 6.0.2                 dependabot/npm_and_yarn/ssri-6.0.2
#7   Bump y18n from 3.2.1 to 3.2.2                 dependabot/npm_and_yarn/y18n-3.2.2
#6   Bump elliptic from 6.5.2 to 6.5.4             dependabot/npm_and_yarn/elliptic-6.5.4


❯ gh pr merge 6 --auto
? What merge method would you like to use? Create a merge commit
? Delete the branch locally and on GitHub? Yes
? What's next? Submit
Pull request is not in the correct state to enable auto-merge

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingpriority-2Affects more than a few users but doesn't prevent core functions

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions