Update branch protection REST api issue for "Specify who can force push" #128770
Unanswered
rmandvikar
asked this question in
API and Webhooks
Replies: 1 comment
-
Any update on this please? |
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
Select Topic Area
Question
Body
In GitHub REST api (using curl) I'd like to update the branch protection's "Specify who can force push" portion.
![image](https://private-user-images.githubusercontent.com/1754194/340121776-6f14b50b-4a4a-4b9f-9464-a060c37de484.png?jwt=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJpc3MiOiJnaXRodWIuY29tIiwiYXVkIjoicmF3LmdpdGh1YnVzZXJjb250ZW50LmNvbSIsImtleSI6ImtleTUiLCJleHAiOjE3MTk3NjIzNTcsIm5iZiI6MTcxOTc2MjA1NywicGF0aCI6Ii8xNzU0MTk0LzM0MDEyMTc3Ni02ZjE0YjUwYi00YTRhLTRiOWYtOTQ2NC1hMDYwYzM3ZGU0ODQucG5nP1gtQW16LUFsZ29yaXRobT1BV1M0LUhNQUMtU0hBMjU2JlgtQW16LUNyZWRlbnRpYWw9QUtJQVZDT0RZTFNBNTNQUUs0WkElMkYyMDI0MDYzMCUyRnVzLWVhc3QtMSUyRnMzJTJGYXdzNF9yZXF1ZXN0JlgtQW16LURhdGU9MjAyNDA2MzBUMTU0MDU3WiZYLUFtei1FeHBpcmVzPTMwMCZYLUFtei1TaWduYXR1cmU9N2VmZDU1MTFkMWEyZTY0OTc5YTE5NWEyOGJjMDJkOGJlZWE3Yjc5NWI4ZDA3YjFjMzlkZTQ3MjI0YWIxYmQ4OSZYLUFtei1TaWduZWRIZWFkZXJzPWhvc3QmYWN0b3JfaWQ9MCZrZXlfaWQ9MCZyZXBvX2lkPTAifQ.bTNfyAbMz9N2I9PHjiG_Ht4zj0t9-LkOR-En1YnH-Cs)
Which json property in the PUT body below is for "Specify who can force push" from the screenshot above?
https://docs.github.com/en/[email protected]/rest/branches/branch-protection?apiVersion=2022-11-28#update-branch-protection
It seems this functionality was added in the GitHub UI relatively recently, but the REST api and/or docs, perhaps, were not updated.
See https://github.blog/changelog/2021-12-21-specify-who-can-force-push-to-a-repository/
Versions used:
GitHub Enterprise Server 3.12.4
REST api, using cURL
Beta Was this translation helpful? Give feedback.
All reactions