-
-
Notifications
You must be signed in to change notification settings - Fork 113
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
Support Disabling\Enabling enforce_admins As Part of Push #508
Comments
Alternatively, I think it makes more sense to just add a generic way to run GitHub API calls pre\post push, and not something specific for WDYT? |
I think it would be better if you handle that outside of the action, by running the call in a step before and after the action's The action usually takes a couple of seconds to run, so the timing should not cause too many issues unless you're dealing with frequent concurrency (which can, and in your case should, be prevented for this kinds of operations) You can make sure the rule is always reset to the original status by using |
Got it. |
For anyone who might have the same issue, I've worked around it by migrating the GitHub repo from More details here: |
That's awesome! Thanks for sharing ❤️ |
Hi,
In my use case, I do
git push
from GitHub Actions workflows tomaster
branches.I have branch protection rules on
master
, so as part of the workflow I first disable theenforce_admins
setting, thengit push
, and finally enableenforce_admins
.I modify
enforce_admins
as follows:Is it something that can be added to the action?
So that if the action tries to push, and gets a
protected branch hook declined
response, it'll try to disableenforce_admins
, push again, and reenableenforce_admins
at the end.The text was updated successfully, but these errors were encountered: