Skip to content

Commit

Permalink
ff
Browse files Browse the repository at this point in the history
  • Loading branch information
sima-zhu committed Aug 14, 2020
1 parent c427223 commit 4a32185
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 4 deletions.
3 changes: 2 additions & 1 deletion eng/common/pipelines/templates/steps/verify-links.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,4 +16,5 @@ steps:
-recursive:$false
-ignoreLinksFile ${{ parameters.IgnoreLinksFile }}
-sourceCommit $(system.pullRequest.sourceCommitId)
-sourceRepoUrl $(System.PullRequest.sourceRepositoryUri)
-sourceRepoUrl $(System.PullRequest.sourceRepositoryUri)
6 changes: 3 additions & 3 deletions eng/common/scripts/Verify-Links.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -155,8 +155,8 @@ function CheckLink ([System.Uri]$linkUri)
}

if ($statusCode -in $errorStatusCodes) {
LogWarning "[$statusCode] broken link $linkUri"
$script:badLinks += $linkUri
LogWarning "[$statusCode] broken link $linkUri"
$script:badLinks += $linkUri
}
else {
if ($null -ne $statusCode) {
Expand All @@ -174,7 +174,7 @@ function CheckLink ([System.Uri]$linkUri)
$GithubRegex = "($sourceRepoUrl/blob/)(\w+)(/.*)"
$ReplacementPattern = "`${1}$sourceCommit`$3"
function ReplaceGithubLink([string]$originLink) {
return $originLink -replace $GithubRegex, "$ReplacementPattern"
return $originLink -replace $GithubRegex, $ReplacementPattern
}

function GetLinks([System.Uri]$pageUri)
Expand Down

0 comments on commit 4a32185

Please sign in to comment.