Skip to content

Detect GraphQL mutation failure in bot infra: failure enabling auto-merge or approving PRs #246

Closed
microsoft/go-infra
#662

Description

@dagood

I got errors (as I'd expect) enabling automerge and self-approving PRs while doing some dev work, but the sync command claimed overall success:

...
---- Enabling auto-merge with reviewer account...
...
---- Full response:
{"data":{"enablePullRequestAutoMerge":null},"errors":[{"type":"UNPROCESSABLE","path":["enablePullRequestAutoMerge"],"locations":[{"line":2,"column":4}],"message":"Pull request is not in the correct state to enable auto-merge"}]}
----
---- PR for master -> dev/auto-merge/microsoft/main: Done.

Completed successfully.

GitHub seems to be sending us a success response code (we already check if it's 2xx, but I haven't debugged further), but there are errors.

Related:

Activity

  1. dagood commented on Aug 14, 2025

    @dagood
    MemberAuthor

    Came up again recently in test runs of microsoft/go-infra#314 automerge + approval. The bot didn't have permission yet and the "doesn't exist" errors that were a result of that failed to cause the command to fail.

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

Metadata

Metadata

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