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 non-Jira sources for SwitchBranches #1017

Open
peasee opened this issue Apr 16, 2024 · 0 comments
Open

Allow non-Jira sources for SwitchBranches #1017

peasee opened this issue Apr 16, 2024 · 0 comments

Comments

@peasee
Copy link
Contributor

peasee commented Apr 16, 2024

In our release process with knope, we run a PrepareRelease step and raise the release changes on a PR for the rest of the team to review.

As part of our workflow file we manually checkout a branch like so before committing:

[[workflows.steps]]
type = "Command"
command = "git switch -C knope-release"

...

[[workflows.steps]]
type = "Command"
command = "git add ."

At the end of the workflow, once pushed, we delete the local branch so a user can re-run a release next time without a branch conflict because they're the same name.

I saw in the steps reference, there's a SwitchBranches but it seems to only support changing to a branch based on a Jira issue title/name/ID. It would be cool if we could:

  1. Use another source into this step, like a variable to target a custom branch without needing Jira
  2. Have some way to tell SwitchBranches to generate a branch ID for us, to make unique release branches. Perhaps SwitchBranches always generates a short UID and passes it as a variable, so we can make our custom branch name like release-$UID or however we'd like.

I think point 2 might be more controversial, but for us it would make sense to have something like release-abcdefg because we run a monorepo with many versions so it wouldn't make sense to have a release/0.0.1 branch. The unique ID would help avoiding local branch conflicts.

What do you think of this feature?

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

No branches or pull requests

1 participant