Skip to content
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

Allow for merge attempts with blocked state #203

Closed
wants to merge 5 commits into from

Conversation

BigGillyStyle
Copy link
Contributor

Fixes #200

I understand if you decide you do not want to merge this, as this may not be want the community wants. I did test this change on our own private repos at my company, and this works as long as we use a GH user account to merge that has the appropriate permissions (in our case...a "service user" that can bypass branch protection rules).

@SaraRavasio
Copy link

Hello @pascalgn and @BigGillyStyle!

Are there any updates regarding this PR?
I have a case where this would really come in handy, so I wanted to know if there are any plans of merging this.

Thank you!

@BigGillyStyle
Copy link
Contributor Author

Hello @pascalgn and @BigGillyStyle!

Are there any updates regarding this PR? I have a case where this would really come in handy, so I wanted to know if there are any plans of merging this.

Thank you!

Hi @SaraRavasio One option for you until this PR is merged is to put the following in your Github workflow file for your merge action:

  uses: BigGillyStyle/automerge-action@main

I'm not planning on publishing a separate Action on the Marketplace, but you can just refer to my fork that includes just this one change. Just an option if you're interested, as this what we're doing at work for now.

@SaraRavasio
Copy link

BigGillyStyle/automerge-action@main

Thank you @BigGillyStyle ! I'll do that 🙏

@pascalgn
Copy link
Owner

Thanks for the PR! When there is functionality that is useful to even a few people, I'm usually happy to add it. However, especially as this functionality is maybe not useful to everyone, I would like to not have it as default.

My suggestion would be to add a new configuration option, something like MERGE_READY_STATE, which would default to "clean,has_hooks,unknown,unstable". It could then be changed to "clean,has_hooks,unknown,unstable,blocked" to achieve the desired functionality.

@SaraRavasio
Copy link

Thanks for the PR! When there is functionality that is useful to even a few people, I'm usually happy to add it. However, especially as this functionality is maybe not useful to everyone, I would like to not have it as default.

My suggestion would be to add a new configuration option, something like MERGE_READY_STATE, which would default to "clean,has_hooks,unknown,unstable". It could then be changed to "clean,has_hooks,unknown,unstable,blocked" to achieve the desired functionality.

that would be great actually!

@SaraRavasio
Copy link

@BigGillyStyle somehow the action doesn't really work, I get this
any idea? some actions are still pending, but i want to be able to force the auto merge
image

@BigGillyStyle
Copy link
Contributor Author

@BigGillyStyle somehow the action doesn't really work, I get this any idea? some actions are still pending, but i want to be able to force the auto merge

@SaraRavasio We use this action daily, so I'm sure it works. However, one thing that is key is that the user account you use to do the auto-merge needs to have the permissions to overcome your branch protection settings. Thus, if the PR didn't pass its status checks or (as is the case for us) doesn't have the required number of approvals...we created a specific user account that is used just for this workflow that can overcome that issue.

@BigGillyStyle
Copy link
Contributor Author

Thanks for the PR! When there is functionality that is useful to even a few people, I'm usually happy to add it. However, especially as this functionality is maybe not useful to everyone, I would like to not have it as default.

My suggestion would be to add a new configuration option, something like MERGE_READY_STATE, which would default to "clean,has_hooks,unknown,unstable". It could then be changed to "clean,has_hooks,unknown,unstable,blocked" to achieve the desired functionality.

@pascalgn and @SaraRavasio Let me know if this is what you were thinking: #208

@pascalgn
Copy link
Owner

I've just merged #208, so if that addresses your problem, feel free to close this PR! 🙏

@BigGillyStyle
Copy link
Contributor Author

Thanks @pascalgn ! I'll close this PR.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

ΒUG: Unable to bypass branch protection rules
3 participants