Skip to content

RFE: support for allow_force_push in ProjectProtectedBranchManager #2466

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
nickbroon opened this issue Feb 2, 2023 · 1 comment · Fixed by #2468
Closed

RFE: support for allow_force_push in ProjectProtectedBranchManager #2466

nickbroon opened this issue Feb 2, 2023 · 1 comment · Fixed by #2468
Labels

Comments

@nickbroon
Copy link
Contributor

Description of the problem, including code/CLI snippet

Allow setting the allow_force_push boolean attribute when creating protected branches.

Attribute is documented here:
https://docs.gitlab.com/ee/api/protected_branches.html#protect-repository-branches

And is missing from here:
https://github.com/python-gitlab/python-gitlab/blob/main/gitlab/v4/objects/branches.py#L35

Expected Behavior

Actual Behavior

Specifications

  • python-gitlab version: 3.13.0
  • API version you are using (v3/v4): v4
  • Gitlab server version (or gitlab.com): gitlab.com
@JohnVillalovos
Copy link
Member

As a note, this is only an issue for the CLI. Users of the API can pass this parameter in the call.

JohnVillalovos added a commit that referenced this issue Feb 3, 2023
For the CLI: add `allow_force_push` as an optional argument for
creating a protected branch.

API reference:
https://docs.gitlab.com/ee/api/protected_branches.html#protect-repository-branches

Closes: #2466
@nejch nejch closed this as completed in 929e07d Feb 3, 2023
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Feb 5, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants