File tree 1 file changed +9
-4
lines changed
eng/common/pipelines/templates/steps
1 file changed +9
-4
lines changed Original file line number Diff line number Diff line change 11
11
12
12
if ((!"$(System.PullRequest.SourceBranch)".StartsWith("sync-eng/common")) -and "$(System.PullRequest.TargetBranch)" -match "^(refs/heads/)?$(DefaultBranch)$")
13
13
{
14
- $filesInCommonDir = & "eng/common/scripts/get-changedfiles.ps1" -DiffPath 'eng/common/*' -DiffFilterType ""
15
- if (($LASTEXITCODE -eq 0) -and ($ filesInCommonDir.Count -gt 0) )
14
+ $filesInCommonDir = & "eng/common/scripts/get-changedfiles.ps1" -DiffPath 'eng/common/*' -DiffFilterType ""
15
+ if ($ filesInCommonDir.Count -gt 0)
16
16
{
17
17
Write-Host "##vso[task.LogIssue type=error;]Changes to files under 'eng/common' directory should not be made in this Repo`n${filesInCommonDir}"
18
18
Write-Host "##vso[task.LogIssue type=error;]Please follow workflow at https://github.com/Azure/azure-sdk-tools/blob/main/doc/common/common_engsys.md"
@@ -21,8 +21,13 @@ steps:
21
21
}
22
22
if ((!"$(System.PullRequest.SourceBranch)".StartsWith("sync-.github/workflows")) -and "$(System.PullRequest.TargetBranch)" -match "^(refs/heads/)?$(DefaultBranch)$")
23
23
{
24
- $filesInCommonDir = & "eng/common/scripts/get-changedfiles.ps1" -DiffPath '.github/workflows/*event*' -DiffFilterType ""
25
- if (($LASTEXITCODE -eq 0) -and ($filesInCommonDir.Count -gt 0))
24
+ # This list needs to be kept in sync with the FilePatterns listed in eng/pipelines/eng-workflows-sync.yml
25
+ $filePatterns = @(".github/workflows/*event*", ".github/workflows/post-apiview.yml")
26
+ $filesInCommonDir = @()
27
+ foreach ($filePattern in $filePatterns) {
28
+ $filesInCommonDir += & "eng/common/scripts/get-changedfiles.ps1" -DiffPath $filePattern -DiffFilterType ""
29
+ }
30
+ if ($filesInCommonDir.Count -gt 0)
26
31
{
27
32
Write-Host "##vso[task.LogIssue type=error;]Changes to files under '.github/workflows' directory should not be made in this Repo`n${filesInCommonDir}"
28
33
Write-Host "##vso[task.LogIssue type=error;]Please follow workflow at https://github.com/Azure/azure-sdk-tools/blob/main/doc/workflows/engsys_workflows.md"
You can’t perform that action at this time.
0 commit comments