spr icon indicating copy to clipboard operation
spr copied to clipboard

feature request: customized branch names

Open scottbessler opened this issue 3 years ago • 7 comments

Jira integrations require the branch name contain the jira ticket number, and thus each stacked commit would ideally use a branch name for the ticket it fixed.

potential implementation:

  • include text via a convention (i.e. in brackets at beginning of commit, like [ABCD-1234]) in the branch name

scottbessler avatar Apr 21 '22 18:04 scottbessler

We are also integrated with jira but don't have to name the branch in any special way. We just add a "resolves: ABCD-1234" and it works really well.

ejoffe avatar Jun 04 '22 01:06 ejoffe

Being able to modify the branch naming convention would also benefit us. One of our GitHub actions involves uploading the packaged artifact to our Maven repository, and the branch name is included in the final JAR name. Unfortunately, Nexus doesn't support slashes in the JAR file name.

dfreudenberger avatar Mar 24 '24 14:03 dfreudenberger

We would also be interested here. We identify deployed instances by branch name but the branch names from git-spr are hard to parse for humans. It's workable because we can just copy the branch name and then search for it but it requires some extra work. Definitely more "nice to have" from this perspective, of course.

jonathanloske avatar Mar 25 '24 09:03 jonathanloske

is it possible to start the branch name for the PRs with the current local branch name?

hariom-qure avatar Apr 03 '24 12:04 hariom-qure

+1 - one thing that's kind of hard is going back from the GitHub PR to the local branch. If I'm not missing something, you need to keep track of the branch name yourself and it's easy to get lost if working with multiple branches/stacks locally. An spr status command with an index as well as predictable branch names (or including the original branch name somewhere in the PR description) would help a lot. https://github.com/facebook/sapling does this well with sl ssl.

Separately I noticed that spr gets confused if you first git push the branch before deciding to turn it into a stack. Would be great if you could start with a single branch then "promote" it to be the head of a stack (without having to close the PR and run git branch --unset-upstream).

oleg-codaio avatar Apr 22 '24 21:04 oleg-codaio