Skip to content

ToggleLockBranch: Disable Auto-Merge on existing PRs #75

@pavel-mikula-sonarsource

Description

When a branch is locked/unlocked, the action should:

  • iterate all PRs targeting that branch
  • disable AutoMerge, if it is enabled. For locking AND unlocking.

https://docs.github.com/en/graphql/reference/mutations#disablepullrequestautomerge

For testing: Validate what will happen if the repo doesn't have Auto-Merge enabled.

In case master is frozen (for example due to release), we don't want any PR to accidentally be merged faster than a version bump.

The disabling should happen

  • when locking the branch, to clearly indicate that PRs will not be merged after
  • when unlocking the branch, to prevent unexpected auto-merge for PRs that were configured for auto-merge in the meantime

Metadata

Metadata

Assignees

No one assigned

    Labels

    ImprovementChange of existing functionality

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions