dev.knotless.protectBranch

Adds the branch to the protected branches of the repository's dev.knotless.repo record, in place of any rule it had, as `knotless branch protect` does: through the gateway it then only moves forward, is never deleted, and unless merges is set takes no merge commits; with queue, pulls land on it only through the merge queue; with reviews, a pull merges into it only once reviewed as they ask. Its owner can, logged in to this appview's web pages: the appview writes with the session it keeps for that account, which the pages' session cookie names. For an organization's repository, so can an admin who joined it, logged in to the pages or with a service token from their own PDS for this method: the appview's gateway, which the organization delegated its writes to, writes as the organization.

Details · procedure
Kindprocedure
Authorityknotless.dev
Indexed

Showing version bafyreihn43dicthkq53pfoeqgmbkhnzv2zwfg4tt43on3ejd2ufaz4bc5a. Show the latest

Procedure

procedure · POST

Input

application/json

branch

requiredstring

The branch, without refs/heads/.

  • maxLength: 255

merges

boolean

Whether it takes merge commits; otherwise pulls merge into it squashed.

queue

boolean

Whether pulls land on it only through the merge queue.

repo

requiredstring · at-uri

The repository's dev.knotless.repo record, as dev.knotless.getRepo takes it.

The reviews a pull needs before it merges into the branch. Absent, none.

Output

application/json

rules

requiredarray

The protected branches now.

itemsref

Errors

NotFound

No such repository.

AuthenticationRequired

No account is logged in to the pages, or its session has ended.

Forbidden

The account logged in is not the repository's owner.

Similar lexicons

semantic match

Lexicons whose schemas describe something close to this one. Check them before publishing a new one that overlaps.