-
Notifications
You must be signed in to change notification settings - Fork 207
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
When using protected branches (1 peer review) auto fails #1491
Comments
Seems like the only way around this is to use the Github API to do the merge: |
Another option is to use a PAT instead of the gh action's token. |
|
I 🙏 it works lol |
This isn't really an Auto issue but rather a thought-out limitation of Github Actions:
workarounds: |
Yes I agree that it isn't autos issue, but given auto have a deep relationship with Github it should be considered. I like the automated merge PR. Seems like it's something that an auto plugin could support? If protected branches is enabled then create a release PR rather than pushing to master. Additionally, it could utilize the API to use the associated admin permissions granted through the PAT to merge the release PR. |
Currently this would be a little more work than that. Each plugin is responsible for pushing the changlog/version commits. To make this pluggable we would need:
I kind of like what https://github.com/benjefferies/branch-protection-bot does. this would be easier to do via a plugin:
Just gotta find the right octokit API |
It surely will work, but it seems precarious and potentially problematic for orgs that have strict controls around branch protection. I scanned through the plugins and I see what you mean. Instead of moving the changelog / version to core what if there were different types of plugins. For instance if the conventional-commit plugin was broken into two plugin types: conventional-commit-changelog and conventional-commit-version. If I want to use conventional-commit changelogs, but use github labels for my versioning I can. Possibly, a much larger conversation, but I'd be interested in assisting in developing a more robust solution which would satisfy various org requirements. |
And if it the publish were to fail the branch protection rules would be lost 😢 The work to move the tag pushing into core looks like:
So I'm gonna close the PR I made to do this in a plugin as it seems to brittle. I'd be willing to accept a PR for this but it also seems like a pretty big lift. Although I had planned on moving the tag pushing into core at some point to facilitate #917
feel free to discuss this here! |
I've made changes to my PR that will re-enable the Peer Reviews even when something in So the only way this wouldn't work now is if:
As for the PR method you are describing. It goes pretty far out of the way of What's weird is that this works fine for me on GitHub enterprise... |
That is strange. We don't use Enterprise at my org, but I have experienced the same issue on our (teams?) account despite being an Admin or using our dummy account which is also an admin. I need to look at how our Buildkite jobs do this. Maybe they found a trick that works. |
I'm going to formalize my thoughts and post about it tomorrow. Thanks for your attentiveness and support. |
All sources point to a token from an admin with the right permissions should fix this. I'm trying this on this repo to no avail. what's weird is everything works fine locally using the same exact token. I can push directly to master but the same token doesn't work in CI |
I'm in contact with someone who works at github and there might be a fix to this coming out at some point |
I've just stumbled upon this problem and am wondering if there has been any progress. If not, I'd be happy to extend the troubleshooting section. |
@hipstersmoothie you were half way there:
for us peasants on anything less than enterprise we have to forage for clams and fabricobble our paper towels into the eternal diaper. |
To anyone who ends up here searching this problem, I thought I'd share our workflow:
Our machine user needed to be made an admin (not great but we accepted the risk). This workflow works for us on the "Team" GitHub plan. Our protection rule requires 1 approval, allows the |
We have a plugin that handles this. Doesn't seem to be in the docs though I'll fix that https://www.npmjs.com/package/@auto-it/protected-branch I've been using it on jimp and it works well. if any of you have issues with it feel free to open another issue |
* Fix #1347 bump auto-it release workflow * #1347 allow auto to run on protected branch ref intuit/auto#1491 * #1347 allow auto to run on protected branch ref intuit/auto#1491
Describe the bug
We have protected branches branches turned on to ensure
To Reproduce
Add "Require pull request reviews before merging"
Expected behavior
Auto should deploy, bypassing the branch protections.
Screenshots
https://github.com/virtru/virtuoso-design-system/runs/1023167159?check_suite_focus=true#step:6:181
Environment information:
https://github.com/virtru/virtuoso-design-system/blob/master/package.json#L78
Additional context
Settings:
![image](https://user-images.githubusercontent.com/46549/91107896-47c07980-e62b-11ea-8158-9a9beca9f863.png)
The text was updated successfully, but these errors were encountered: