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

branchName creation #371

Open
fharper opened this issue Jul 20, 2023 · 1 comment
Open

branchName creation #371

fharper opened this issue Jul 20, 2023 · 1 comment
Assignees
Labels
enhancement New feature or request

Comments

@fharper
Copy link

fharper commented Jul 20, 2023

Is your feature request related to a problem? Please describe.

I thought that the branchName argument was to use an existing branch, but would create it with the PR, but it's only for using the actual branch, if exist. If it does not exist, the action will return the error Error checking out existing branch "mybranchname": Command failed: git checkout "mybranchname"

Describe the solution you'd like

I would like either the branch to be created by default if it doesn't exist, or by using a parameter set to false by default, or having an additional parameter like prBranchName which would do that. If the latter, it couldn't be use in conjunction of the existing branchName one.

Describe alternatives you've considered

Either I create the branch myself with a step before using this action, or I do not care about the branch name.

Additional context

No matter the decision to implement this in any way, I think the branchName description in the README should be updated to reflect that it's about an existing branch, or updated based on the changes for a PR that would close this feature request so it's clearer.

@fharper fharper added the enhancement New feature or request label Jul 20, 2023
@FantasticFiasco
Copy link
Owner

Hi @fharper and sorry for the delay in answering this question, it's been almost a year it seems 😆

Do you have a repository where this behavior is evident? I was under the impression that these use cases where covered in the tests. The link will take you to the first test, but also look at the three coming after.

Just to be clear, this action should reuse an existing branch if it finds one, and create a new branch if it doesn't. Without this behavior the action wouldn't be idempotent, which is a requirement.

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

No branches or pull requests

2 participants