git-branch-protect

Installation
SKILL.md

Git Branch Protect

Overview

Keep one active release/X.Y.Z mergeable, keep every other release branch closed, and keep trunk push closed. GitLab and GitHub combine overlapping rules differently, so the host procedure lives in one reference file. Read that file before any API call.

The condition is the live protection rule on the host. Read it with glab or gh and compare it with the operation's effect. There is no committed config file.

Pairing: after the remote branch exists, git-release-start asks this skill to read the default and the new branch. After the tag and the trunk merge have both succeeded, git-release-finish asks it to read whether that branch is frozen, and it reads trunk during fingerprinting. A release skill naming an operation is a request to compare the live rule. The write itself waits for the user. Neither release skill calls rollback.

Use when / Do not use for

Use when:

  • The user asks to freeze a release branch, open one release branch for merge, set main or master protection, or roll a release branch back to an older commit
  • git-release-start or git-release-finish needs the live rule compared with the expected push and merge result

Do not use for:

Installs
8
GitHub Stars
6
First Seen
11 days ago