Skip to content
1 min read

fj protect

Manage branch protection rules

fj protect [OPTIONS] <COMMAND>

Every command also accepts the global flags: --host, --debug, --no-pager, --json-fields.

fj protect list

List branch protection rules

fj protect list [OPTIONS]

Options

  • -R, --repo <REPO> — Target repository as <owner>/<name>. Inferred from the git remote when omitted
  • --json — Emit JSON instead of a table

fj protect view

Show a single rule

fj protect view [OPTIONS] <BRANCH>

Arguments

  • <BRANCH> — Branch name (or pattern)

Options

  • -R, --repo <REPO> — Target repository as <owner>/<name>. Inferred from the git remote when omitted
  • --json — Emit JSON instead of a table

fj protect set

Create or update a rule

fj protect set [OPTIONS] <BRANCH>

Arguments

  • <BRANCH> — Branch name (or pattern)

Options

  • -R, --repo <REPO> — Target repository as <owner>/<name>. Inferred from the git remote when omitted
  • --require-signed — Require signed commits
  • --block-outdated — Block merges from outdated branches
  • --required-approvals <REQUIRED_APPROVALS> — Minimum required approvals [default: 0]
  • --no-push — Disable direct pushes
  • --status-check <CONTEXT> — Required status check context (repeatable). Enables status checks

fj protect delete

Delete a rule

fj protect delete [OPTIONS] <BRANCH>

Arguments

  • <BRANCH> — Branch name (or pattern)

Options

  • -R, --repo <REPO> — Target repository as <owner>/<name>. Inferred from the git remote when omitted
  • --yes — Skip the confirmation prompt
Contributors
  • Stephen Way