Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -19,20 +19,20 @@ steps:
exit 1
}
}
if ((!"$(System.PullRequest.SourceBranch)".StartsWith("sync-.github/workflows")) -and "$(System.PullRequest.TargetBranch)" -match "^(refs/heads/)?$(DefaultBranch)$")
if ((!"$(System.PullRequest.SourceBranch)".StartsWith("sync-.github")) -and "$(System.PullRequest.TargetBranch)" -match "^(refs/heads/)?$(DefaultBranch)$")
{
# This list needs to be kept in sync with the FilePatterns listed in eng/pipelines/eng-workflows-sync.yml
$filePatterns = @(".github/workflows/*event*", ".github/workflows/post-apiview.yml")
# This list needs to be kept in sync with the FilePatterns listed in eng/pipelines/eng-github-config-sync.yml
$filePatterns = @(".github/workflows/*event*", ".github/workflows/post-apiview.yml", ".github/skills/azsdk-common-*/**")
$filesInCommonDir = @()
foreach ($filePattern in $filePatterns) {
$filesInCommonDir += & "eng/common/scripts/get-changedfiles.ps1" -DiffPath $filePattern -DiffFilterType ""
}
if ($filesInCommonDir.Count -gt 0)
{
Write-Host "##vso[task.LogIssue type=error;]Changes to files under '.github/workflows' directory should not be made in this Repo`n${filesInCommonDir}"
Write-Host "##vso[task.LogIssue type=error;]Changes to selected files under '.github/' directory should not be made in this Repo`n${filesInCommonDir}"
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"
exit 1
}
}
displayName: Prevent changes to eng/common and .github/workflows outside of azure-sdk-tools repo
displayName: Prevent changes to eng/common and selected .github/* files outside of azure-sdk-tools repo
condition: and(succeeded(), ne(variables['Skip.EngCommonWorkflowEnforcer'], 'true'), not(endsWith(variables['Build.Repository.Name'], '-pr')))
2 changes: 1 addition & 1 deletion eng/common/scripts/Delete-RemoteBranches.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ param(
$CentralRepoId,
# We start from the sync PRs, use the branch name to get the PR number of central repo. E.g. sync-eng/common-(<branchName>)-(<PrNumber>). Have group name on PR number.
# For sync-eng/common work, we use regex as "^sync-eng/common.*-(?<PrNumber>\d+).*$".
# For sync-.github/workflows work, we use regex as "^sync-.github/workflows.*-(?<PrNumber>\d+).*$".
# For sync-.github work, we use regex as "^sync-.github.*-(?<PrNumber>\d+).*$".
$BranchRegex,
# When set, directly delete this exact branch name without querying all branches.
# This is a fast path that avoids the expensive GraphQL branch listing and rate limit
Expand Down
Loading