You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
However, I can't get the branch rules to apply in a private repository. I did not test in a public repository.
I see it in the code here:
if [ -d "${APP_CONFIG}/branch-protection" ]; then
for filepath in "${APP_CONFIG}/branch-protection/"*; do
branch=$(basename "${filepath}" ".json")
log:api "${repo}" "Configuring branch protection rules for '${branch}'"
"${_GH}" api -X PUT "/repos/:owner/:repo/branches/${branch}/protection" \
--input="${filepath}" >/dev/null
done
fi
But in the API docs, there is no GitHub CLI access, only cURL and JavaScript, so I am wondering it if would work on any repo public or private.
Hi,
Thanks for the cool tool.
However, I can't get the branch rules to apply in a private repository. I did not test in a public repository.
I see it in the code here:
But in the API docs, there is no GitHub CLI access, only cURL and JavaScript, so I am wondering it if would work on any repo public or private.
https://docs.github.com/en/rest/branches/branch-protection?apiVersion=2022-11-28#update-branch-protection
For anyone else reading this, I used the cURL command to configure the repo like this:
The text was updated successfully, but these errors were encountered: