FantasticFiasco / action-update-license-year

GitHub Action that in a pull request updates the copyright year(s) in your license file.
Apache License 2.0
58 stars 2 forks source link

branchName creation #371

Open fharper opened 1 year ago

fharper commented 1 year ago

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.

FantasticFiasco commented 4 months ago

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.