ejoffe / spr

Stacked Pull Requests on GitHub
MIT License
796 stars 68 forks source link

feature request: customized branch names #235

Open scottbessler opened 2 years ago

scottbessler commented 2 years ago

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:

ejoffe commented 2 years ago

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.

dfreudenberger commented 6 months ago

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.

jonathanloske commented 6 months ago

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.

hariom-qure commented 6 months ago

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

oleg-codaio commented 5 months ago

+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).

austinpray-mixpanel commented 3 months ago

We enforce branch name rules (for max compatibility between macOS and linux) that we have to make spr an exception to

- Branch name must match a given regex pattern: \A[a-z0-9\.\-\_]+$
davinkevin commented 2 months ago

FYI, I did that in my fork: https://github.com/davinkevin/spr.go/commit/3b7152c49ea24df7b5f3161b194d04bc2b130c26