-
-
Notifications
You must be signed in to change notification settings - Fork 237
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
Create a branch if it doesn't exist #202
Comments
@palewire Sounds like a good idea. Feel free to send a PR with such a test. I already tried this in #140, but broke the Action for others in this step. See comments in #142. Or feel free to share a workflow, where the Action fails. Always great to see, how others use the Action and in what scenarios it fails. |
Interesting, what if we kept your basic logic but substituted in this test
which is the recommended method in this Stack Overflow thread. |
@palewire Will give this a try over the next few days. Have neglected working on this action for a couple of weeks now. Time to get up to speed an close these issues. Might also hide this "feature" behind an option. Breaking the Action for the now +22k users is not something I want to do. 😄 |
@palewire I've prepared something in #203. Test suite and first tests in real applications seem to work fine. Feel free to give this solution a try by updating your workflows like this: - uses: stefanzweifel/git-auto-commit-action@master
with:
branch: YOUR_BRANCH_NAME_GOES_HERE
create_branch: true As the feature is behind a feature flag, I feel confident enough to merge this soonish. |
I've merged the feature to the In the meantime, feel free to use the Closing this issue now. |
I'd like to be able to list branch names not yet in the repo and have them work out of the box. Right now if I do that I get an error at the checkout step.
Would you be open to a test that would look if the branch already exists before checking out, and then creates a new branch with
checkout -b
if it doesn't?The text was updated successfully, but these errors were encountered: