gioboa / jira-plugin

Jira plugin for VsCode
https://marketplace.visualstudio.com/items?itemName=gioboa.jira-plugin
MIT License
265 stars 41 forks source link

I dont know how to set key mapping #141

Closed SchmidtDawid closed 4 years ago

SchmidtDawid commented 4 years ago

If my task in jira look like that: "APINT-3456 - bla bla bla" and i want to sync it with branches named feature/#3456 how my key should looks like?

And one question: Is it possible to create branches named by the same rule?

gioboa commented 4 years ago

Hi @SchmidtDawid, the plugin use this RegExp -> "branchName".match(/([A-Za-z0-9]+)-(\d+)/) From this match use the first part for issue and the second one for the project name. You can also define your own mapping: config: Project Key Mapping in settings

- Is it possible to create branches named by the same rule? Unfortunatly VsCode git integration doesn't allow you to define a default branch name

SchmidtDawid commented 4 years ago

Yes, but i don't know how to define my mapping. Should i pass 2 reqexes? or is there any variable to use? i don't understand this example CUSTOMKEY=JIRAKEY.

gioboa commented 4 years ago

Maybe some code explain better than words 😄 Here you have the code. mapProjectKeyIfNeeed is the method that use this mapping configuration.

SchmidtDawid commented 4 years ago

Oh ok i get it now ;). Thanks!

gioboa commented 4 years ago

@SchmidtDawid Did you solve your issue? Can we close it?

SchmidtDawid commented 4 years ago

Yes :)