GitLab API

GitlabTool

Actions1095

Projects → patchApiV4ProjectsIdProtectedBranchesName

AI-generated

Summary

Update the settings of a protected branch for a specific GitLab project by specifying the project ID or URL-encoded path and the branch name.

Inputs

  • id (required) — The ID or URL-encoded path of the GitLab project containing the protected branch to update.
  • name (required) — The name of the protected branch to update.
  • patchApiV4ProjectsIdProtectedBranchesName (required) — The request body containing properties to modify the protected branch's configuration.

Output shape

a JSON object representing the updated protected branch details returned by the GitLab API

Requires authentication unless 'Skip Authentication' is enabled. Uses the PATCH HTTP method on the /api/v4/projects/{id}/protected_branches/{name} endpoint. The response includes the full updated protected branch resource as returned from GitLab.

Links

Discussion