diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 7e8ea92b73b..58e8f9df772 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -29,7 +29,7 @@ parameters: jobs: - job: CheckPullRequest displayName: "Check the Format of Pull Request Title and Content" - condition: and(succeeded(), in(variables['System.PullRequest.TargetBranch'], 'dev', 'release')) + condition: and(succeeded(), in(variables['System.PullRequest.TargetBranch'], 'dev', 'release', 'main')) pool: name: ${{ variables.ubuntu_pool }} @@ -44,6 +44,10 @@ jobs: echo "Hotfix PR should target release branch." exit 1 fi + if [ "$(System.PullRequest.TargetBranch)" == "main" ]; then + echo "Feature PR should target dev branch." + exit 1 + fi python scripts/ci/check_pull_request.py "$title" "$body" - job: RejectPullRequestToMasterBranch