Fetching JIRA Planned Release and Setting the Milestone in Merge Request in gitlab
Problem to solve
We do have two active development branches let say dev and dev-next. When a developer works on a story he targets the branch based on the Planned Release Mention in the JIRA ticket.
We had ended up in an issue, where sometimes MR's are targetted in the wrong branch. I'm looking for a feature, that can tag the MR with Milestone fetched from the planned release in the JIRA.
If I can tag a branch with a planned release version, Let say dev with 3.4 and dev-next with 3.5, if the merge request is created for the wrong branch, I shouldn't be able to create it
Possible Soultions
We did use the JIRA gitlab integration service to mark the MR request and close the ticket automatically when it is merged.
Is there is any way I can create a bot to manage Merge Request creation and prevention of mistargeted MR using gitlab and jira API's?