jira-plugin: bug: wrong git branch name detection when submodules are present
Is your feature request related to a problem? Please describe. Often I forget to set my working issue.
Describe the solution you’d like
Upon workspace open or branch switch the jira extension would automatically scan the branch name for possible jira tickets (maybe using a regex like (\w+-\d+)) and if it matched a in-progress issue id for the current project than that issue would be set to in progress.
Describe alternatives you’ve considered I slap myself every time I forget to set the working issue until I remember. I’d prefer not to go this route for obvious reasons.
About this issue
- Original URL
- State: closed
- Created 5 years ago
- Comments: 17 (17 by maintainers)
Just add a submodule to your repository and delete it afterwards:
git submodule add https://github.com/<user>/<repoName> <name>You can add any random repo as a submodule ^
git submodule update --init --recursivehttps://github.blog/2016-02-01-working-with-submodules/
It doesn’t work as expected. When I am in a project with a submodule it doesn’t automatically switch the ticket based on branch name for the reason explained in my comment above. 😦
To fix it you would need to check the branch name of each repository returned by
getGitRepositoriesinstead of just the first one. Currently you cache the current branch name so you would also have to change the cache to work per-repository.