Azure / azure-sdk-for-java

This repository is for active development of the Azure SDK for Java. For consumers of the SDK we recommend visiting our public developer docs at https://docs.microsoft.com/java/azure/ or our versioned developer docs at https://azure.github.io/azure-sdk-for-java.
MIT License
2.25k stars 1.93k forks source link

[FEATURE REQ] Explicit set label with "sync-sping-boot3" or "no sync-sping-boot3" #32317

Open backwind1233 opened 1 year ago

backwind1233 commented 1 year ago

Context

Now, we develop our features both in main branch and feature/spring-boot-3 branch, and this situation will continue for about 1 year. For any PR which changes codes under the folder sdk/spring, we should create PRs both in main and feature/spring-boot-3 branch, but we may lost the rule in mind and forget to create PR in both branches.

Goal

Make PR creaters explicit set the lables with "sync-sping-boot3" or "no sync-sping-boot3", in this way PR creaters should know whether to create PR in both branches or not.

Solution

  1. Create a pipeline and trigger the pipeline when there are code changes under folder sdk/spring.
  2. Get all labels of the PR to check lables
  3. For the pipeline, if the lables contains "sync-sping-boot3" or "no sync-sping-boot3", return success, otherwise return false.
  4. Before merging, both "sync-sping-boot3" and "sync-sping-3-pr-created" are needed;
  5. only affects PR with lable "azure-spring".
backwind1233 commented 1 year ago

It should be able to get pull request babels: https://learn.microsoft.com/en-us/rest/api/azure/devops/git/pull-request-labels/get?view=azure-devops-rest-7.0

backwind1233 commented 1 year ago

We should also consider repo: