ccntrq / git-jira-branch

Manage branches for your Jira tickets
https://www.npmjs.com/package/git-jira-branch
MIT License
10 stars 1 forks source link

Branch name not configurable #444

Open MrASayles opened 1 month ago

MrASayles commented 1 month ago

As and SRE I would like to be able to have branches start with "task/". Even better would be for the branch type to be derived from the Jira ticket catagory (ie ticket categories like task, story, spike).

My company also also prefers, and monitors, PRs to have brackets around the ticket like [DEV-111].

Request is add environment parameter that allows these customizations. JIRA_DEFAULT_TICKET_TYPE="task" JIRA_TICKET_ENCAPSULATION="brackets || parenthesis || braces"

ccntrq commented 3 weeks ago

Hey @MrASayles

I will make the jira issuetype to branchtype mapping customizable and add a type flag to the create command to override the automatically derived branch type in the next release.

Regarding the brackets it's a little more work has i have to keep the logic for detecting already existing branches for tickets in sync with the branch names. In your company branches are named like this task/[DEV-111]-ticket-summary?

ccntrq commented 1 week ago

I added a flag --type to the create command in v2.1.0.

You can use it like so:

git-jira-branch create --type task 6543

I also updated the ticket type to branchtype mapping. Issues with a type containing aufgabe or task will now be mapped to a task/ branch.