Skip to content

Commit 194e4c0

Browse files
authored
Pipeline for fabricbot aliases (#20915)
Skip PR creatation if there is not change in fabricbot.json
1 parent f44cad1 commit 194e4c0

File tree

1 file changed

+11
-6
lines changed

1 file changed

+11
-6
lines changed

.azure-pipelines/sync-aliases.yml

Lines changed: 11 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,15 @@ jobs:
2727
displayName: Git commit and push
2828
2929
- pwsh: |
30-
$Title = "Sync fabricbot.json According To ADO Wiki Page"
31-
$HeadBranch = "internal/sync-fabricbot-json"
32-
$BaseBranch = "main"
33-
$Description = "This PR sync taskType: scheduledAndTrigger part of fabricbot.json from table of Service-Team-Label-and-Contact-List in ADO wiki page"
34-
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(BotAccessToken) -Description $Description
30+
$diff = git diff main..internal/sync-fabricbot-json
31+
if ($diff.Length -eq 0) {
32+
Write-Host "No differences between main and internal/sync-fabricbot-json. Skipping PR creation."
33+
} else {
34+
$Title = "Sync fabricbot.json According To ADO Wiki Page"
35+
$HeadBranch = "internal/sync-fabricbot-json"
36+
$BaseBranch = "main"
37+
$Description = "This PR sync taskType: scheduledAndTrigger part of fabricbot.json from table of Service-Team-Label-and-Contact-List in ADO wiki page"
38+
./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(BotAccessToken) -Description $Description
39+
}
3540
displayName: Create PR to main branch
36-
41+

0 commit comments

Comments
 (0)