-
-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add optional "same branch only" input #7
Add optional "same branch only" input #7
Conversation
…or runs from the same branch (defaults to true)
It looks like passing |
Fixed in 53c876b. |
I was trying to figure out a way to write a test to capture the actual functionality better, but since the underlying behaviour that matters (filtering by branch) lives in Octokit, testing a mocked Octokit didn't seem that useful. |
I'm sorry. I've let this one go. If you'd still like this functionality can you rebase with latest version of the code? I can commit to taking a look this weekend. |
No worries. I've merged in master (just required a rebuild for |
I lied: trivial fix also needed for the new test (935b7e2) |
I'm waiting for this, thanks! <3 |
This would be a great addon for terraform operations (which relies on shared resources) |
I'll update the tag for this today |
updated the latest tag with this change |
This adds a
same-branch-only
input which can be set tofalse
if you want to wait on pending runs regardless of which branch they're from.I was trying to use this action to prevent simultaneous deploys, but realized it would only work to prevent deploys from the same branch. In our setup all non-main branches deploy to the same environment, so I need to wait on any pending run, even if it is from a different branch.
(Even more ideal would be a way to say "wait for all main or non-main branches, depending on whether this is a run from main or non-main", but that seemed too complex and also maybe too unique to our particular deploy setup to be worth supporting.)
This parameter defaults to true to preserve existing behaviour.