99import org .gitlab4j .api .models .AccessLevel ;
1010import org .gitlab4j .api .models .ProtectedBranch ;
1111
12+ /**
13+ * This class provides an entry point to all the Protected Branches API calls.
14+ * @see <a https://docs.gitlab.com/ee/api/protected_branches.html">Protected branches API at GitLab</a>
15+ */
1216public class ProtectedBranchesApi extends AbstractApi {
1317
1418 public ProtectedBranchesApi (GitLabApi gitLabApi ) {
@@ -62,7 +66,7 @@ public Stream<ProtectedBranch> getProtectedBranchesStream(Object projectIdOrPath
6266 * <pre><code>GitLab Endpoint: DELETE /projects/:id/protected_branches/:name</code></pre>
6367 *
6468 * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
65- * @param branchName the name of the branch to un-protect
69+ * @param branchName the name of the branch to un-protect, can be a wildcard
6670 * @throws GitLabApiException if any exception occurs
6771 */
6872 public void unprotectBranch (Integer projectIdOrPath , String branchName ) throws GitLabApiException {
@@ -75,7 +79,7 @@ public void unprotectBranch(Integer projectIdOrPath, String branchName) throws G
7579 * <pre><code>GitLab Endpoint: POST /projects/:id/protected_branches</code></pre>
7680 *
7781 * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
78- * @param branchName the name of the branch to protect
82+ * @param branchName the name of the branch to protect, can be a wildcard
7983 * @return the branch info for the protected branch
8084 * @throws GitLabApiException if any exception occurs
8185 */
@@ -89,7 +93,7 @@ public ProtectedBranch protectBranch(Integer projectIdOrPath, String branchName)
8993 * <pre><code>GitLab Endpoint: POST /projects/:id/protected_branches</code></pre>
9094 *
9195 * @param projectIdOrPath the project in the form of an Integer(ID), String(path), or Project instance
92- * @param branchName the name of the branch to protect
96+ * @param branchName the name of the branch to protect, can be a wildcard
9397 * @param pushAccessLevel Access levels allowed to push (defaults: 40, maintainer access level)
9498 * @param mergeAccessLevel Access levels allowed to merge (defaults: 40, maintainer access level)
9599 * @return the branch info for the protected branch
0 commit comments