From 4990a26a231199a6adf69099e8fce179f3dac495 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Fri, 13 Jan 2023 14:41:40 +0800 Subject: [PATCH 01/31] Set up first CI try with Azure Pipelines description here! [skip ci] --- azure-pipelines.yml | 88 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 88 insertions(+) create mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml new file mode 100644 index 000000000000..471748f045c1 --- /dev/null +++ b/azure-pipelines.yml @@ -0,0 +1,88 @@ +resources: + repositories: + - repository: self + type: git + ref: main + +trigger: + branches: + include: + - main + paths: + include: + - .azure-pipelines + - .github + +variables: + GithubToken: $(GITHUB_TOKEN) +jobs: +- job: UpdateJson + displayName: Update Json + condition: succeeded() + steps: + - task: PowerShell@2 + displayName: Update json file + inputs: + targetType: inline + script: | + Write-Host "at the ps1 file begin!!!" + $username="" + $password='xlk73ici5g2gb72pnz4vbmpiflygnnhiddrk3zpv4necfcumqveq' + $pair="{0}:{1}" -f ($username,$password) + $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) + $token = [System.Convert]::ToBase64String($bytes) + $headers = @{ + Authorization = "Basic {0}" -f ($token) + } + $response = Invoke-RestMethod 'https://dev.azure.com/azure-sdk/internal/_apis/wiki/wikis/internal.wiki/pages?api-version=7.1-preview.1&path=/Engineering%20System/GitHub%20Repos/Issue%20Management/Service%20Team%20Label%20and%20Contact%20List&includeContent=True' -Headers $headers + + $rows = ($response.content -split "\n") | Select-Object -Skip 6 + $aliases = [System.Collections.SortedList]::new() + + foreach ($item in $rows) + { + $list = $item -split "\|" + if ($list.Count -eq 1) { continue } + if ($list[1].Trim().Length -gt 0) + { + if ($list.Count -gt 3) + { + $aliases.Add($list[1].Trim(), $list[3].Trim()) + } + else + { + $aliases.Add($list[1].Trim(), "") + } + } + } + $whole_json = Get-Content -Raw -Path .github/fabricbot.json | ConvertFrom-Json + + $whole_json.tasks | ForEach-Object { + if($_.taskType -eq 'scheduledAndTrigger') { + $labelsAndMentionsArrayList = New-Object System.Collections.ArrayList + foreach ($entry in $aliases.GetEnumerator()) { + if ($entry.Value -eq "") { + continue + } + $labels = @("Service Attention", $entry.Key) + $mentionees = @($entry.Value -split "," | ForEach-Object { $_.Trim() }) + $item = [PSCustomObject]@{ + labels = $labels + mentionees = $mentionees + } + [void]$labelsAndMentionsArrayList.Add($item) + } + $_.config.labelsAndMentions = $labelsAndMentionsArrayList.ToArray() + + } + } + ($whole_json | ConvertTo-Json -Depth 32) | Out-File -FilePath .github/fabricbot22.json + Write-Host "at the ps1 file end!!!" + + pwsh: true + + - task: PowerShell@2 + displayName: Commit and Push + inputs: + targetType: inline + script: Write-Host "at the end!!!" From 103ba723de1227c72558a209dfcf83e1ca154e77 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Fri, 13 Jan 2023 14:56:26 +0800 Subject: [PATCH 02/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 471748f045c1..3ae6823acbec 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -14,7 +14,7 @@ trigger: - .github variables: - GithubToken: $(GITHUB_TOKEN) + NugetSecurityAnalysisWarningLevel: $(NugetSecurityAnalysisWarningLevel) jobs: - job: UpdateJson displayName: Update Json From 874fdae63363e70c550b0535040041ed3c35369c Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Fri, 13 Jan 2023 15:01:53 +0800 Subject: [PATCH 03/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3ae6823acbec..906ff468a376 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -18,7 +18,6 @@ variables: jobs: - job: UpdateJson displayName: Update Json - condition: succeeded() steps: - task: PowerShell@2 displayName: Update json file From 226983a577eb8af249a18735ef67a00f84c02838 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Fri, 13 Jan 2023 15:16:58 +0800 Subject: [PATCH 04/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 906ff468a376..b7928a7b3e0f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,8 +13,6 @@ trigger: - .azure-pipelines - .github -variables: - NugetSecurityAnalysisWarningLevel: $(NugetSecurityAnalysisWarningLevel) jobs: - job: UpdateJson displayName: Update Json From 21b9335a4fb18c05cdcf760181f09e085af08dad Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Fri, 13 Jan 2023 16:06:44 +0800 Subject: [PATCH 05/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 96 +++++++++++++++++++++++---------------------- 1 file changed, 49 insertions(+), 47 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b7928a7b3e0f..5e3d724d2dfd 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -23,57 +23,59 @@ jobs: targetType: inline script: | Write-Host "at the ps1 file begin!!!" - $username="" - $password='xlk73ici5g2gb72pnz4vbmpiflygnnhiddrk3zpv4necfcumqveq' - $pair="{0}:{1}" -f ($username,$password) - $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) - $token = [System.Convert]::ToBase64String($bytes) - $headers = @{ - Authorization = "Basic {0}" -f ($token) - } - $response = Invoke-RestMethod 'https://dev.azure.com/azure-sdk/internal/_apis/wiki/wikis/internal.wiki/pages?api-version=7.1-preview.1&path=/Engineering%20System/GitHub%20Repos/Issue%20Management/Service%20Team%20Label%20and%20Contact%20List&includeContent=True' -Headers $headers + New-Item -ItemType File -Path ".github/fabricbot22.txt" + Add-Content -Path ".github/fabricbot22.txt" -Value "Hello, World! from pipeline." + # $username="" + # $password='xlk73ici5g2gb72pnz4vbmpiflygnnhiddrk3zpv4necfcumqveq' + # $pair="{0}:{1}" -f ($username,$password) + # $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) + # $token = [System.Convert]::ToBase64String($bytes) + # $headers = @{ + # Authorization = "Basic {0}" -f ($token) + # } + # $response = Invoke-RestMethod 'https://dev.azure.com/azure-sdk/internal/_apis/wiki/wikis/internal.wiki/pages?api-version=7.1-preview.1&path=/Engineering%20System/GitHub%20Repos/Issue%20Management/Service%20Team%20Label%20and%20Contact%20List&includeContent=True' -Headers $headers - $rows = ($response.content -split "\n") | Select-Object -Skip 6 - $aliases = [System.Collections.SortedList]::new() + # $rows = ($response.content -split "\n") | Select-Object -Skip 6 + # $aliases = [System.Collections.SortedList]::new() - foreach ($item in $rows) - { - $list = $item -split "\|" - if ($list.Count -eq 1) { continue } - if ($list[1].Trim().Length -gt 0) - { - if ($list.Count -gt 3) - { - $aliases.Add($list[1].Trim(), $list[3].Trim()) - } - else - { - $aliases.Add($list[1].Trim(), "") - } - } - } - $whole_json = Get-Content -Raw -Path .github/fabricbot.json | ConvertFrom-Json + # foreach ($item in $rows) + # { + # $list = $item -split "\|" + # if ($list.Count -eq 1) { continue } + # if ($list[1].Trim().Length -gt 0) + # { + # if ($list.Count -gt 3) + # { + # $aliases.Add($list[1].Trim(), $list[3].Trim()) + # } + # else + # { + # $aliases.Add($list[1].Trim(), "") + # } + # } + # } + # $whole_json = Get-Content -Raw -Path .github/fabricbot.json | ConvertFrom-Json - $whole_json.tasks | ForEach-Object { - if($_.taskType -eq 'scheduledAndTrigger') { - $labelsAndMentionsArrayList = New-Object System.Collections.ArrayList - foreach ($entry in $aliases.GetEnumerator()) { - if ($entry.Value -eq "") { - continue - } - $labels = @("Service Attention", $entry.Key) - $mentionees = @($entry.Value -split "," | ForEach-Object { $_.Trim() }) - $item = [PSCustomObject]@{ - labels = $labels - mentionees = $mentionees - } - [void]$labelsAndMentionsArrayList.Add($item) - } - $_.config.labelsAndMentions = $labelsAndMentionsArrayList.ToArray() + # $whole_json.tasks | ForEach-Object { + # if($_.taskType -eq 'scheduledAndTrigger') { + # $labelsAndMentionsArrayList = New-Object System.Collections.ArrayList + # foreach ($entry in $aliases.GetEnumerator()) { + # if ($entry.Value -eq "") { + # continue + # } + # $labels = @("Service Attention", $entry.Key) + # $mentionees = @($entry.Value -split "," | ForEach-Object { $_.Trim() }) + # $item = [PSCustomObject]@{ + # labels = $labels + # mentionees = $mentionees + # } + # [void]$labelsAndMentionsArrayList.Add($item) + # } + # $_.config.labelsAndMentions = $labelsAndMentionsArrayList.ToArray() - } - } - ($whole_json | ConvertTo-Json -Depth 32) | Out-File -FilePath .github/fabricbot22.json + # } + # } + # ($whole_json | ConvertTo-Json -Depth 32) | Out-File -FilePath .github/fabricbot22.json Write-Host "at the ps1 file end!!!" pwsh: true From e33c2f62f5a8f7dc1edffae9816bc0580347afa9 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 18:19:48 +0800 Subject: [PATCH 06/31] commit me --- azure-pipelines.yml | 11 ++++++++++- 1 file changed, 10 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5e3d724d2dfd..16a214e67a53 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -84,4 +84,13 @@ jobs: displayName: Commit and Push inputs: targetType: inline - script: Write-Host "at the end!!!" + script: | + git config --global user.email "nicolasshuai@gmail.com" + git config --global user.name "xtr0d666" + git remote set-url origin "https://$GithubToken@github.com/xtR0d666/azure-powershell.git" + git checkout -b "Will_change_fabricbot" "origin/main" + + git add . + git commit -m "new fabricbot22.txt" + + git push origin Will_change_fabricbot --force From 8cc1bf10b34703e841d0b3a0abe7f1b713f8b311 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 20:28:44 +0800 Subject: [PATCH 07/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 16a214e67a53..4a5257d7c81f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -85,10 +85,11 @@ jobs: inputs: targetType: inline script: | + git pull origin main git config --global user.email "nicolasshuai@gmail.com" git config --global user.name "xtr0d666" git remote set-url origin "https://$GithubToken@github.com/xtR0d666/azure-powershell.git" - git checkout -b "Will_change_fabricbot" "origin/main" + git checkout -b "Will_change_fabricbot" git add . git commit -m "new fabricbot22.txt" From 8fe0488e13e2e702fe21702ef8673b9aa4cbae52 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 20:35:36 +0800 Subject: [PATCH 08/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4a5257d7c81f..b76db7636331 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -86,6 +86,10 @@ jobs: targetType: inline script: | git pull origin main + Write-Host "just before list!!!" + git config --list + Write-Host "just after list!!!" + git remote -v git config --global user.email "nicolasshuai@gmail.com" git config --global user.name "xtr0d666" git remote set-url origin "https://$GithubToken@github.com/xtR0d666/azure-powershell.git" From 80038679e54dbe87de3e1d4c01366d0ac3724804 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 20:47:08 +0800 Subject: [PATCH 09/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b76db7636331..4461c7b9e20a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -13,6 +13,9 @@ trigger: - .azure-pipelines - .github +variables: + GithubToken: $(GITHUB_TOKEN) + jobs: - job: UpdateJson displayName: Update Json From c5bcdd2ecb272a2e9b5c068f4eb6f85089296b72 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 20:57:01 +0800 Subject: [PATCH 10/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4461c7b9e20a..5f0cb8f323ac 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -89,12 +89,9 @@ jobs: targetType: inline script: | git pull origin main - Write-Host "just before list!!!" - git config --list - Write-Host "just after list!!!" - git remote -v git config --global user.email "nicolasshuai@gmail.com" git config --global user.name "xtr0d666" + git config --global credential.helper store git remote set-url origin "https://$GithubToken@github.com/xtR0d666/azure-powershell.git" git checkout -b "Will_change_fabricbot" From ca0b08866a9cf45a525e2f28ca15fb9f2e291d22 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:08:08 +0800 Subject: [PATCH 11/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 5f0cb8f323ac..3f08553f1cab 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -92,10 +92,10 @@ jobs: git config --global user.email "nicolasshuai@gmail.com" git config --global user.name "xtr0d666" git config --global credential.helper store - git remote set-url origin "https://$GithubToken@github.com/xtR0d666/azure-powershell.git" git checkout -b "Will_change_fabricbot" git add . git commit -m "new fabricbot22.txt" + git remote set-url origin "https://$GithubToken@github.com/xtR0d666/azure-powershell.git" git push origin Will_change_fabricbot --force From 6afa3f28e645101d75c751c48314f2aef7db5f23 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:21:29 +0800 Subject: [PATCH 12/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 ++ 1 file changed, 2 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3f08553f1cab..73a5c230a205 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -20,6 +20,8 @@ jobs: - job: UpdateJson displayName: Update Json steps: + - checkout: self + persistCredentials: true - task: PowerShell@2 displayName: Update json file inputs: From 6f6893f732fa126990efa88e4e1f5db32edaf0b2 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:30:46 +0800 Subject: [PATCH 13/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 73a5c230a205..b7590c3edc5f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -99,5 +99,5 @@ jobs: git add . git commit -m "new fabricbot22.txt" - git remote set-url origin "https://$GithubToken@github.com/xtR0d666/azure-powershell.git" + git remote set-url origin "https://$(GITHUB_TOKEN)@github.com/xtR0d666/azure-powershell.git" git push origin Will_change_fabricbot --force From 181393ef5cd16316294e8f53f98407d3e497afde Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:48:31 +0800 Subject: [PATCH 14/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 101 +++++++++++++++++++++----------------------- 1 file changed, 48 insertions(+), 53 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b7590c3edc5f..342f968a7a67 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,62 +27,57 @@ jobs: inputs: targetType: inline script: | - Write-Host "at the ps1 file begin!!!" - New-Item -ItemType File -Path ".github/fabricbot22.txt" - Add-Content -Path ".github/fabricbot22.txt" -Value "Hello, World! from pipeline." - # $username="" - # $password='xlk73ici5g2gb72pnz4vbmpiflygnnhiddrk3zpv4necfcumqveq' - # $pair="{0}:{1}" -f ($username,$password) - # $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) - # $token = [System.Convert]::ToBase64String($bytes) - # $headers = @{ - # Authorization = "Basic {0}" -f ($token) - # } - # $response = Invoke-RestMethod 'https://dev.azure.com/azure-sdk/internal/_apis/wiki/wikis/internal.wiki/pages?api-version=7.1-preview.1&path=/Engineering%20System/GitHub%20Repos/Issue%20Management/Service%20Team%20Label%20and%20Contact%20List&includeContent=True' -Headers $headers + $username="" + $password='xlk73ici5g2gb72pnz4vbmpiflygnnhiddrk3zpv4necfcumqveq' + $pair="{0}:{1}" -f ($username,$password) + $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) + $token = [System.Convert]::ToBase64String($bytes) + $headers = @{ + Authorization = "Basic {0}" -f ($token) + } + $response = Invoke-RestMethod 'https://dev.azure.com/azure-sdk/internal/_apis/wiki/wikis/internal.wiki/pages?api-version=7.1-preview.1&path=/Engineering%20System/GitHub%20Repos/Issue%20Management/Service%20Team%20Label%20and%20Contact%20List&includeContent=True' -Headers $headers - # $rows = ($response.content -split "\n") | Select-Object -Skip 6 - # $aliases = [System.Collections.SortedList]::new() + $rows = ($response.content -split "\n") | Select-Object -Skip 6 + $aliases = [System.Collections.SortedList]::new() - # foreach ($item in $rows) - # { - # $list = $item -split "\|" - # if ($list.Count -eq 1) { continue } - # if ($list[1].Trim().Length -gt 0) - # { - # if ($list.Count -gt 3) - # { - # $aliases.Add($list[1].Trim(), $list[3].Trim()) - # } - # else - # { - # $aliases.Add($list[1].Trim(), "") - # } - # } - # } - # $whole_json = Get-Content -Raw -Path .github/fabricbot.json | ConvertFrom-Json + foreach ($item in $rows) + { + $list = $item -split "\|" + if ($list.Count -eq 1) { continue } + if ($list[1].Trim().Length -gt 0) + { + if ($list.Count -gt 3) + { + $aliases.Add($list[1].Trim(), $list[3].Trim()) + } + else + { + $aliases.Add($list[1].Trim(), "") + } + } + } + $whole_json = Get-Content -Raw -Path .github/fabricbot.json | ConvertFrom-Json - # $whole_json.tasks | ForEach-Object { - # if($_.taskType -eq 'scheduledAndTrigger') { - # $labelsAndMentionsArrayList = New-Object System.Collections.ArrayList - # foreach ($entry in $aliases.GetEnumerator()) { - # if ($entry.Value -eq "") { - # continue - # } - # $labels = @("Service Attention", $entry.Key) - # $mentionees = @($entry.Value -split "," | ForEach-Object { $_.Trim() }) - # $item = [PSCustomObject]@{ - # labels = $labels - # mentionees = $mentionees - # } - # [void]$labelsAndMentionsArrayList.Add($item) - # } - # $_.config.labelsAndMentions = $labelsAndMentionsArrayList.ToArray() + $whole_json.tasks | ForEach-Object { + if($_.taskType -eq 'scheduledAndTrigger') { + $labelsAndMentionsArrayList = New-Object System.Collections.ArrayList + foreach ($entry in $aliases.GetEnumerator()) { + if ($entry.Value -eq "") { + continue + } + $labels = @("Service Attention", $entry.Key) + $mentionees = @($entry.Value -split "," | ForEach-Object { $_.Trim() }) + $item = [PSCustomObject]@{ + labels = $labels + mentionees = $mentionees + } + [void]$labelsAndMentionsArrayList.Add($item) + } + $_.config.labelsAndMentions = $labelsAndMentionsArrayList.ToArray() - # } - # } - # ($whole_json | ConvertTo-Json -Depth 32) | Out-File -FilePath .github/fabricbot22.json - Write-Host "at the ps1 file end!!!" - + } + } + ($whole_json | ConvertTo-Json -Depth 32) | Out-File -FilePath .github/fabricbot22.json pwsh: true - task: PowerShell@2 @@ -97,7 +92,7 @@ jobs: git checkout -b "Will_change_fabricbot" git add . - git commit -m "new fabricbot22.txt" + git commit -m "pipeline to change fabricbot22.json" git remote set-url origin "https://$(GITHUB_TOKEN)@github.com/xtR0d666/azure-powershell.git" git push origin Will_change_fabricbot --force From ab51199c309ac1ae83c485a34d83704f99c8ff63 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:52:00 +0800 Subject: [PATCH 15/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 342f968a7a67..868d091277f8 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,7 +28,7 @@ jobs: targetType: inline script: | $username="" - $password='xlk73ici5g2gb72pnz4vbmpiflygnnhiddrk3zpv4necfcumqveq' + $password='yh4chre346mkjadimwmrgrq27v2fgx5x75h32j3eq6xhjxb5ikda' $pair="{0}:{1}" -f ($username,$password) $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) $token = [System.Convert]::ToBase64String($bytes) From 20abb718eee765c22c40268c5f005c98f535f9ea Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 21:58:09 +0800 Subject: [PATCH 16/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 868d091277f8..fd5d89367fa9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,8 +27,8 @@ jobs: inputs: targetType: inline script: | - $username="" - $password='yh4chre346mkjadimwmrgrq27v2fgx5x75h32j3eq6xhjxb5ikda' + $username="Dixue" + $password='ufxzgqrzdu2fouseovd4fdd72xe2g42dg4blit7quo3mzqqtz6ta' $pair="{0}:{1}" -f ($username,$password) $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) $token = [System.Convert]::ToBase64String($bytes) From 278007e7a54f2c4a1d81debf65626e0b474a8fb4 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 22:15:01 +0800 Subject: [PATCH 17/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fd5d89367fa9..ec8a65cba85f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -27,8 +27,8 @@ jobs: inputs: targetType: inline script: | - $username="Dixue" - $password='ufxzgqrzdu2fouseovd4fdd72xe2g42dg4blit7quo3mzqqtz6ta' + $username="v-hongtzhang" + $password='pm7jvt5ejjwhaxox7sr3vneuc5iuuxttopb7ebps4bzsnfrmaluq' $pair="{0}:{1}" -f ($username,$password) $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) $token = [System.Convert]::ToBase64String($bytes) From 301ed0d0f834037509a9baf457fbae4e72653f89 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 22:21:58 +0800 Subject: [PATCH 18/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ec8a65cba85f..6593de50baad 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,7 +28,7 @@ jobs: targetType: inline script: | $username="v-hongtzhang" - $password='pm7jvt5ejjwhaxox7sr3vneuc5iuuxttopb7ebps4bzsnfrmaluq' + $password='my7asty2sxlbderojgogn6ycunffw6omymi4pnvs7ytqno22ckxa' $pair="{0}:{1}" -f ($username,$password) $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) $token = [System.Convert]::ToBase64String($bytes) From 7233ce10f2e290933a4c440abd03bc774e33ec24 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 22:27:51 +0800 Subject: [PATCH 19/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6593de50baad..b00009c0d9c0 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,7 +28,7 @@ jobs: targetType: inline script: | $username="v-hongtzhang" - $password='my7asty2sxlbderojgogn6ycunffw6omymi4pnvs7ytqno22ckxa' + $password='c4hnvda5ydja3rhoiwcgyspetxhz5rj4xwoppk5gybdyuurwwkpa' $pair="{0}:{1}" -f ($username,$password) $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) $token = [System.Convert]::ToBase64String($bytes) From 7b3c2dc52daa21fc90ae5fdd0f70b7880d502861 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 22:30:23 +0800 Subject: [PATCH 20/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b00009c0d9c0..4b9434ffb91c 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -28,7 +28,7 @@ jobs: targetType: inline script: | $username="v-hongtzhang" - $password='c4hnvda5ydja3rhoiwcgyspetxhz5rj4xwoppk5gybdyuurwwkpa' + $password='$(AZURE-PASS)' $pair="{0}:{1}" -f ($username,$password) $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) $token = [System.Convert]::ToBase64String($bytes) From 2546edf7b64f5b3aec8b8bbda10a825ddc8d8bce Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 22:40:10 +0800 Subject: [PATCH 21/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4b9434ffb91c..b57d9eb21af4 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -77,7 +77,7 @@ jobs: } } - ($whole_json | ConvertTo-Json -Depth 32) | Out-File -FilePath .github/fabricbot22.json + ($whole_json | ConvertTo-Json -Depth 32) | Out-File -FilePath .github/fabricbot.json pwsh: true - task: PowerShell@2 From 599b76185f0b74a8a8958da6eb12aab76f7f2f4a Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 22:53:27 +0800 Subject: [PATCH 22/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 16 ++++++++++++++++ 1 file changed, 16 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b57d9eb21af4..45b46fa7d7e9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -96,3 +96,19 @@ jobs: git remote set-url origin "https://$(GITHUB_TOKEN)@github.com/xtR0d666/azure-powershell.git" git push origin Will_change_fabricbot --force + - task: PowerShell@2 + displayName: Create Pull Request + inputs: + targetType: 'inline' + script: | + # Write your PowerShell commands here. + $Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $BotAccessToken"} + Write-Host "Hello World" + + - pwsh: | + $Title = "Change Fabricbot.json According To Wiki Page" + $HeadBranch = "Will_change_fabricbot" + $BaseBranch = "main" + $Description = "Sort fabricbot.json parts according to wiki page" + ./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GithubToken) -Description $Description + displayName: Create PR to main branch \ No newline at end of file From a2c690be558ff53b857fe3cad0963951985e0380 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 22:54:59 +0800 Subject: [PATCH 23/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 12 ++---------- 1 file changed, 2 insertions(+), 10 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 45b46fa7d7e9..8933e431f7c5 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -96,19 +96,11 @@ jobs: git remote set-url origin "https://$(GITHUB_TOKEN)@github.com/xtR0d666/azure-powershell.git" git push origin Will_change_fabricbot --force - - task: PowerShell@2 - displayName: Create Pull Request - inputs: - targetType: 'inline' - script: | - # Write your PowerShell commands here. - $Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $BotAccessToken"} - Write-Host "Hello World" - + - pwsh: | $Title = "Change Fabricbot.json According To Wiki Page" $HeadBranch = "Will_change_fabricbot" $BaseBranch = "main" $Description = "Sort fabricbot.json parts according to wiki page" - ./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GithubToken) -Description $Description + ./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GITHUB_TOKEN) -Description $Description displayName: Create PR to main branch \ No newline at end of file From b2a1d7db32d649c9e52facb5ed868ac3cb999a39 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 23:18:13 +0800 Subject: [PATCH 24/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 35 ++++++++++++++++++++++++++++------- 1 file changed, 28 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8933e431f7c5..f6e0edaabb65 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -97,10 +97,31 @@ jobs: git remote set-url origin "https://$(GITHUB_TOKEN)@github.com/xtR0d666/azure-powershell.git" git push origin Will_change_fabricbot --force - - pwsh: | - $Title = "Change Fabricbot.json According To Wiki Page" - $HeadBranch = "Will_change_fabricbot" - $BaseBranch = "main" - $Description = "Sort fabricbot.json parts according to wiki page" - ./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GITHUB_TOKEN) -Description $Description - displayName: Create PR to main branch \ No newline at end of file + # - pwsh: | + # $Title = "Change Fabricbot.json According To Wiki Page" + # $HeadBranch = "Will_change_fabricbot" + # $BaseBranch = "main" + # $Description = "Sort fabricbot.json parts according to wiki page" + # ./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GITHUB_TOKEN) -Description $Description + # displayName: Create PR to main branch + - task: PowerShell@2 + displayName: create PR + inputs: + targetType: inline + script: | + $Title = "Change Fabricbot.json According To Wiki Page" + $HeadBranch = "Will_change_fabricbot" + $BaseBranch = "main" + $Description = "Sort fabricbot.json parts according to wiki page" + + $Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $(GITHUB_TOKEN)"} + $PrBody = @" + + + $Description + + + + "@ + $RequestBody = @{"title" = $Title; "body" = $PrBody; "head" = $HeadBranch; "base" = $BaseBranch } + Invoke-WebRequest -Uri https://api.github.com/repos/xtR0d666/azure-powershell/pulls -method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json) \ No newline at end of file From bb94d2d878b996d3db74c5d887707b5d9e827bf4 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 23:22:12 +0800 Subject: [PATCH 25/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f6e0edaabb65..260a494d7810 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -116,12 +116,8 @@ jobs: $Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $(GITHUB_TOKEN)"} $PrBody = @" - - - $Description - - - - "@ + $Description + + "@ $RequestBody = @{"title" = $Title; "body" = $PrBody; "head" = $HeadBranch; "base" = $BaseBranch } Invoke-WebRequest -Uri https://api.github.com/repos/xtR0d666/azure-powershell/pulls -method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json) \ No newline at end of file From aa78cb1423cad3888e308e4f2387ee25ce4c2ebf Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 23:25:34 +0800 Subject: [PATCH 26/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 5 +---- 1 file changed, 1 insertion(+), 4 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 260a494d7810..fffff76629c9 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -115,9 +115,6 @@ jobs: $Description = "Sort fabricbot.json parts according to wiki page" $Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $(GITHUB_TOKEN)"} - $PrBody = @" - $Description - - "@ + $PrBody = @"$Description paste the link below. -->"@ $RequestBody = @{"title" = $Title; "body" = $PrBody; "head" = $HeadBranch; "base" = $BaseBranch } Invoke-WebRequest -Uri https://api.github.com/repos/xtR0d666/azure-powershell/pulls -method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json) \ No newline at end of file From 52e38cf519cd35ca9390176a2032e3c6e781ad07 Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 23:32:22 +0800 Subject: [PATCH 27/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index fffff76629c9..3d837ea59a33 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -115,6 +115,8 @@ jobs: $Description = "Sort fabricbot.json parts according to wiki page" $Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $(GITHUB_TOKEN)"} - $PrBody = @"$Description paste the link below. -->"@ + $PrBody = @" + $Description paste the link below. --> + "@ $RequestBody = @{"title" = $Title; "body" = $PrBody; "head" = $HeadBranch; "base" = $BaseBranch } Invoke-WebRequest -Uri https://api.github.com/repos/xtR0d666/azure-powershell/pulls -method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json) \ No newline at end of file From 8c8ea6a2342bdbda2d276497a3353a19f0b3e3ab Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 23:37:40 +0800 Subject: [PATCH 28/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3d837ea59a33..697fc551627d 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -116,7 +116,7 @@ jobs: $Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $(GITHUB_TOKEN)"} $PrBody = @" - $Description paste the link below. --> + ${Description} paste the link below. --> "@ $RequestBody = @{"title" = $Title; "body" = $PrBody; "head" = $HeadBranch; "base" = $BaseBranch } Invoke-WebRequest -Uri https://api.github.com/repos/xtR0d666/azure-powershell/pulls -method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json) \ No newline at end of file From e167084fa7d73b2cdee6710242775d1bb82be62e Mon Sep 17 00:00:00 2001 From: xtR0d666 <69706194+xtR0d666@users.noreply.github.com> Date: Wed, 18 Jan 2023 23:41:05 +0800 Subject: [PATCH 29/31] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 697fc551627d..07bbcaa3d006 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -115,8 +115,6 @@ jobs: $Description = "Sort fabricbot.json parts according to wiki page" $Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $(GITHUB_TOKEN)"} - $PrBody = @" - ${Description} paste the link below. --> - "@ + $PrBody = "$Description paste the link below. -->" $RequestBody = @{"title" = $Title; "body" = $PrBody; "head" = $HeadBranch; "base" = $BaseBranch } Invoke-WebRequest -Uri https://api.github.com/repos/xtR0d666/azure-powershell/pulls -method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json) \ No newline at end of file From 789ab6484ecf9338ec12109520b39eb652a85da9 Mon Sep 17 00:00:00 2001 From: "Hongtu Zhang (FA Talent)" Date: Thu, 19 Jan 2023 11:33:01 +0800 Subject: [PATCH 30/31] remove test yml --- azure-pipelines.yml | 120 -------------------------------------------- 1 file changed, 120 deletions(-) delete mode 100644 azure-pipelines.yml diff --git a/azure-pipelines.yml b/azure-pipelines.yml deleted file mode 100644 index 07bbcaa3d006..000000000000 --- a/azure-pipelines.yml +++ /dev/null @@ -1,120 +0,0 @@ -resources: - repositories: - - repository: self - type: git - ref: main - -trigger: - branches: - include: - - main - paths: - include: - - .azure-pipelines - - .github - -variables: - GithubToken: $(GITHUB_TOKEN) - -jobs: -- job: UpdateJson - displayName: Update Json - steps: - - checkout: self - persistCredentials: true - - task: PowerShell@2 - displayName: Update json file - inputs: - targetType: inline - script: | - $username="v-hongtzhang" - $password='$(AZURE-PASS)' - $pair="{0}:{1}" -f ($username,$password) - $bytes = [System.Text.Encoding]::ASCII.GetBytes($pair) - $token = [System.Convert]::ToBase64String($bytes) - $headers = @{ - Authorization = "Basic {0}" -f ($token) - } - $response = Invoke-RestMethod 'https://dev.azure.com/azure-sdk/internal/_apis/wiki/wikis/internal.wiki/pages?api-version=7.1-preview.1&path=/Engineering%20System/GitHub%20Repos/Issue%20Management/Service%20Team%20Label%20and%20Contact%20List&includeContent=True' -Headers $headers - - $rows = ($response.content -split "\n") | Select-Object -Skip 6 - $aliases = [System.Collections.SortedList]::new() - - foreach ($item in $rows) - { - $list = $item -split "\|" - if ($list.Count -eq 1) { continue } - if ($list[1].Trim().Length -gt 0) - { - if ($list.Count -gt 3) - { - $aliases.Add($list[1].Trim(), $list[3].Trim()) - } - else - { - $aliases.Add($list[1].Trim(), "") - } - } - } - $whole_json = Get-Content -Raw -Path .github/fabricbot.json | ConvertFrom-Json - - $whole_json.tasks | ForEach-Object { - if($_.taskType -eq 'scheduledAndTrigger') { - $labelsAndMentionsArrayList = New-Object System.Collections.ArrayList - foreach ($entry in $aliases.GetEnumerator()) { - if ($entry.Value -eq "") { - continue - } - $labels = @("Service Attention", $entry.Key) - $mentionees = @($entry.Value -split "," | ForEach-Object { $_.Trim() }) - $item = [PSCustomObject]@{ - labels = $labels - mentionees = $mentionees - } - [void]$labelsAndMentionsArrayList.Add($item) - } - $_.config.labelsAndMentions = $labelsAndMentionsArrayList.ToArray() - - } - } - ($whole_json | ConvertTo-Json -Depth 32) | Out-File -FilePath .github/fabricbot.json - pwsh: true - - - task: PowerShell@2 - displayName: Commit and Push - inputs: - targetType: inline - script: | - git pull origin main - git config --global user.email "nicolasshuai@gmail.com" - git config --global user.name "xtr0d666" - git config --global credential.helper store - git checkout -b "Will_change_fabricbot" - - git add . - git commit -m "pipeline to change fabricbot22.json" - - git remote set-url origin "https://$(GITHUB_TOKEN)@github.com/xtR0d666/azure-powershell.git" - git push origin Will_change_fabricbot --force - - # - pwsh: | - # $Title = "Change Fabricbot.json According To Wiki Page" - # $HeadBranch = "Will_change_fabricbot" - # $BaseBranch = "main" - # $Description = "Sort fabricbot.json parts according to wiki page" - # ./tools/Github/CreatePR.ps1 -Title $Title -HeadBranch $HeadBranch -BaseBranch $BaseBranch -BotAccessToken $(GITHUB_TOKEN) -Description $Description - # displayName: Create PR to main branch - - task: PowerShell@2 - displayName: create PR - inputs: - targetType: inline - script: | - $Title = "Change Fabricbot.json According To Wiki Page" - $HeadBranch = "Will_change_fabricbot" - $BaseBranch = "main" - $Description = "Sort fabricbot.json parts according to wiki page" - - $Headers = @{"Accept" = "application/vnd.github+json"; "Authorization" = "Bearer $(GITHUB_TOKEN)"} - $PrBody = "$Description paste the link below. -->" - $RequestBody = @{"title" = $Title; "body" = $PrBody; "head" = $HeadBranch; "base" = $BaseBranch } - Invoke-WebRequest -Uri https://api.github.com/repos/xtR0d666/azure-powershell/pulls -method POST -Headers $Headers -Body ($RequestBody | ConvertTo-Json) \ No newline at end of file From 716528077d38c06ee0909d1c151e09e48ab990ae Mon Sep 17 00:00:00 2001 From: "Hongtu Zhang (FA Talent)" Date: Fri, 10 Feb 2023 15:56:49 +0800 Subject: [PATCH 31/31] rectify_git_url --- .azure-pipelines/sync-aliases.yml | 21 +++++++++------------ 1 file changed, 9 insertions(+), 12 deletions(-) diff --git a/.azure-pipelines/sync-aliases.yml b/.azure-pipelines/sync-aliases.yml index 3a23dc628122..09d95f597a5b 100644 --- a/.azure-pipelines/sync-aliases.yml +++ b/.azure-pipelines/sync-aliases.yml @@ -14,20 +14,17 @@ jobs: ./tools/Github/ParseWiki2Json.ps1 -ADOToken $(ADOToken) displayName: Update fabricbot.json file locally - - task: PowerShell@2 - displayName: Git commit and push - inputs: - targetType: inline - script: | - git config --global user.email "65331932+azure-powershell-bot@users.noreply.github.com" - git config --global user.name "azure-powershell-bot" - git checkout -b "internal/sync-fabricbot-json" + - pwsh: | + git config --global user.email "65331932+azure-powershell-bot@users.noreply.github.com" + git config --global user.name "azure-powershell-bot" + git checkout -b "internal/sync-fabricbot-json" - git add . - git commit -m "Sync fabricbot.json" + git add . + git commit -m "Sync fabricbot.json" - git remote set-url origin https://$(BotAccessToken)@github.com/Azure/azure-powershell.git; - git push origin internal/sync-fabricbot-json --force + git remote set-url origin https://azure-powershell-bot:$(BotAccessToken)@github.com/Azure/azure-powershell.git; + git push origin internal/sync-fabricbot-json --force + displayName: Git commit and push - pwsh: | $Title = "Sync fabricbot.json According To ADO Wiki Page"