Skip to content

Allow enabling auto-merge from GitHub Actions #6695

@martinvonz

Description

@martinvonz

Describe the feature or problem you’d like to solve

My project gets lots of PRs from Dependabot. The project has branch protections set up. I currently have to enable auto-merge (and confirm that I want it), then review the PR and approve it. I'd like to automate the first part, i.e. enabling auto-merge, from a GitHub Action. I tried doing that by running gh pr merge --auto but that fails like this:

Message: Resource not accessible by integration, Locations: [{Line:1 Column:72}]
Error: Process completed with exit code 1.

Proposed solution

Make it possible to enable auto-merge from a GitHub action, maybe via a specialized command (gh pr enable-automerge or something) if you don't want gh pr merge, since it seems it would need different permissions than gh pr merge. But you know better how to structure that :) I'm just saying that I don't need it to be in gh pr merge.

Additional context

Originally discussed with @mislav on #1314.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementa request to improve CLImore-info-neededMore info needed from user/contributorplatformProblems with the GitHub platform rather than the CLI client

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions