capabilities.work

Replace the teams allowed to push to a branch

One step with GitHub. We can help you get access.

Get something done

Replace the teams allowed to push to a branch

with GitHub · Software Construction Management

Use GitHub: its GitHub v3 REST Repos API lets you replace the teams allowed to push to a branch in a single step (PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams). capabilities.work can help you get signed up and connected.

  • Can I overwrite the whole list of teams that may push to a protected branch?
  • Does setting a new team list remove teams that could push before?
Say it to your AI assistant
  • Replace the teams allowed to push to {branch} in {owner}/{repo}.
  • Reset the team push allowlist on branch {branch} of {owner}/{repo} to a new set.
For your developer

PUT /repos/{owner}/{repo}/branches/{branch}/protection/restrictions/teams in GitHub v3 REST Repos API. Full spec on APIs.io.