[API] add protected info to /api/v1/repos/{owner}/{repo}/branches #8154
Labels
modifies/api
This PR adds API routes or modifies them
type/proposal
The new feature has not been accepted yet but needs to be discussed first.
Description
Currently, there's no way of knowing what branches are protected in a repo for simple users.
A PR is in the works (#7093) for configuring such information, but that is only for repo owner because it exposes whitelists and other sensitive information.
My proposal is to change
/api/v1/repos/{owner}/{repo}/branches
and add the last two fields (protected
andrequired_approvals
), so anyone with read permissions on the repo can access this information:The text was updated successfully, but these errors were encountered: