Skip to content

gh pr merge --auto command behaviour is confusing #3514

@jagobagascon

Description

@jagobagascon

CLI Feedback

I'm currently running CLI version: 1.9.2

What was confusing or gave you pause?

The way gh pr merge --auto behaves is a bit confusing. I know there's a PR #3367 to fix the fact that the command never fails, but I've found other scenarios where the command does not behave as I would expect:

If you run the command but the repo does not have any checks it does nothing.

If there are no checks at all then the PR should probably be merged.

If you run the command after the required checks have already passed it does nothing.

If I'm running gh pr merge --auto it probably means that I don't care when did the checks pass, I just want to accept the PR if they do/did, so this should merge the PR.

If you run the command but the checks defined are not set as required it does nothing.

I guess this is similar to the case without checks, here too I would expect the PR to be accepted and merged.

I'm not sure if any of these is a bug or it is the intended behaviour, that's why I added it as feedback!

Thanks in advance.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions