1
votes

Let's say I want to use a Gitflow branching model, so I have 2 long term branches:

  • Develop (the name should be enough)
  • Master (production)

In case of hotfix in production I will create a branch from master :

  • Develop (the name should be enough)
  • Master (production)
  • Hotfix/my-super-hotfix

According to Gitflow when it's finished we have to merge it to Master and Develop.

But we are using Azure DevOps and the pull request mechanism so we have to create 2 PR (one for Develop and one for Master). Obviously it has been forgotten a lot so we got some inconsistencies...

I don't want the full Gitflow mechanism, I just would like to have a mechanism creating a PR to Develop if a PR to Master has been completed only.

Is there a way to achieve that in Azure DevOps?

1

1 Answers

2
votes

You can use the Create Pull Request task that creates a PR automatically via build pipeline.

So, create a build that create the PR from hotfix to Develop and configure him to run in CI mode - when the Master is updated. you just need to think how you get the hotfix branch name dynamically (a small script probably).