-
Notifications
You must be signed in to change notification settings - Fork 942
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
Allow update of AllowForcePush
parameter of protected branches
#1160
base: main
Are you sure you want to change the base?
Conversation
// | ||
// GitLab API docs: | ||
// https://docs.gitlab.com/ee/api/protected_branches.html#allow_force_push # FIXME: not documented yet but this is what is done by the UI | ||
type AllowForcePushOptions struct { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This could probably be merged with RequireCodeOwnerApprovals()
into a generic UpdateProtectedBranch()
function.
Turns out the API to update the |
8a58921
to
3c8e98b
Compare
This reverts commit 8fe58c3.
3c8e98b
to
43b4c4d
Compare
@pdecat so what is the status of this one? Should it be closed or can we work towards something that we can merge? Oeps, didn't mean to close the PR! Only wanted to add the above comment... |
It is waiting for https://gitlab.com/gitlab-org/gitlab/-/issues/350955 |
Check, thanks for the update! |
I have just tested the API (not this PR) and it works without problems with PATCH API request. I managed to toggle allow_force_push in both directions (false->true, true->false). |
@mitar Which API endpoint did you use?
|
|
Allowing the update of
AllowForcePush
parameter of protected branches was reverted from #1141 as that feature was not explicitly documented.I submitted an MR to document that feature: https://gitlab.com/gitlab-org/gitlab/-/merge_requests/62893
Technically, this simply reverts commit 8fe58c3.