-
Notifications
You must be signed in to change notification settings - Fork 177
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Preprocess the markdowns contain deleted or renamed files. #1170
Conversation
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
$renamedFiles = (git diff origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH} HEAD --diff-filter=R) | ||
$changedMarkdowns = (git diff origin/${env:SYSTEM_PULLREQUEST_TARGETBRANCH} HEAD --name-only -- '*.md') | ||
# Removed the deleted markdowns. | ||
$changedMarkdowns = $changedMarkdowns |Where-Object { $deletedFiles -notcontains $_ } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Removed markdowns should not scan for broken links.
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
@@ -0,0 +1,47 @@ | |||
param ( | |||
# The root repo we scaned with. | |||
[string[]] $RootRepo = "./", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
nit: We generally use 2 space indention for PS scripts.
# Retrieve the renamed from files. | ||
foreach($file in $renamedFiles) { | ||
if ($file -match "^rename from (.*)$") { | ||
$beforeRenameFiles += $file -replace "^rename from (.*)$", '$1' |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
While I'm this for now there are some changes that this can have reliability issues if the string output of git diff changes in some way.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I agree. However, there is no git command which can return the file before rename. I will add comments here.
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Some small tweaks but otherwise looks good.
The following pipelines have been queued for testing: |
The following pipelines have been queued for testing: |
Hello @azure-sdk! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
Test PR: Azure/azure-sdk-for-java#17233 Test pipeline with the new scripts in Urls: https://dev.azure.com/azure-sdk/public/_build/results?buildId=610176&view=logs&j=b70e5e73-bbb6-5567-0939-8415943fadb9&t=bdeefc16-b669-5ebd-ad94-a2c19ade53b0 Test pipeline with original Urls paramaters: https://dev.azure.com/azure-sdk/public/_build/results?buildId=610157&view=logs&j=b70e5e73-bbb6-5567-0939-8415943fadb9&t=bdeefc16-b669-5ebd-ad94-a2c19ade53b0
Test PR: Azure/azure-sdk-for-java#17233
Test pipeline with the new scripts in Urls: https://dev.azure.com/azure-sdk/public/_build/results?buildId=610176&view=logs&j=b70e5e73-bbb6-5567-0939-8415943fadb9&t=bdeefc16-b669-5ebd-ad94-a2c19ade53b0
Test pipeline with original Urls paramaters: https://dev.azure.com/azure-sdk/public/_build/results?buildId=610157&view=logs&j=b70e5e73-bbb6-5567-0939-8415943fadb9&t=bdeefc16-b669-5ebd-ad94-a2c19ade53b0