-
-
Notifications
You must be signed in to change notification settings - Fork 12
Description
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:
- Use another source into this step, like a variable to target a custom branch without needing Jira
- Have some way to tell
SwitchBranches
to generate a branch ID for us, to make unique release branches. PerhapsSwitchBranches
always generates a short UID and passes it as a variable, so we can make our custom branch name likerelease-$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?