AllowForcePushes returns "false" when "Allow force pushes" is checked and bypassForcePushAllowances is used #157488
Replies: 1 comment
-
💬 Your Product Feedback Has Been Submitted 🎉 Thank you for taking the time to share your insights with us! Your feedback is invaluable as we build a better GitHub experience for all our users. Here's what you can expect moving forward ⏩
Where to look to see what's shipping 👀
What you can do in the meantime 💻
As a member of the GitHub community, your participation is essential. While we can't promise that every suggestion will be implemented, we want to emphasize that your feedback is instrumental in guiding our decisions and priorities. Thank you once again for your contribution to making GitHub even better! We're grateful for your ongoing support and collaboration in shaping the future of our platform. ⭐ |
Beta Was this translation helpful? Give feedback.
-
Select Topic Area
Bug
Body
I am attempting to use the GraphQL API to enumerate Branch Protection Rules across a large number of organizations and repositories. I am seeing an unexpected result from AllowForcePushes (boolean) when any user is enabled under "Specify who can force push", showing within the result for bypassForcePushAllowances (object containing actors). In this condition, the UI does also show "Allow force pushes" to be ticked, which is the main point of concern.
Expected: AllowForcePushes returns true if "Allow force pushes" is ticked under any circumstances, including when any user is allowed within "Specify who can force push"
Actual: AllowForcePushes returns false unless "Everyone" is selected.
Here is a current configuration to demonstrate the discrepancy, along with the resulting response recorded using the GraphQL explorer:
While possible to work around by accounting for the return within bypassForcePushAllowances, this seems like an oversight and it would be far cleaner for AllowForcePushes to represent the overall status of the Branch Protection Rule.
Open to feedback or corrections if I am going about this incorrectly in any way.
Beta Was this translation helpful? Give feedback.
All reactions