Skip to content
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

Avoid adding the same package twice, use TrimStart instead of substring #8912

Merged
merged 1 commit into from
Sep 3, 2024

Conversation

hallipr
Copy link
Member

@hallipr hallipr commented Aug 30, 2024

Get-PrPkgProperties was adding a package to $packagesWithChanges for every matched file in the pr diff. To prevent duplicate entries, we break the for loop on the first matched file.

If the input path didn't start with $RepoRoot, the key function <path>.Replace($RepoRoot, "").SubString(1) was removing the first character of a relative path.

sdk/some/package => dk/some/package

.TrimStart('\/') will remove the starting path separator only if it exists.

@hallipr hallipr requested a review from a team as a code owner August 30, 2024 23:14
@azure-sdk
Copy link
Collaborator

The following pipelines have been queued for testing:
java - template
java - template - tests
js - template
net - template
net - template - tests
python - template
python - template - tests
You can sign off on the approval gate to test the release stage of each pipeline.
See eng/common workflow

azure-sdk added a commit to Azure/azure-sdk-for-js that referenced this pull request Sep 3, 2024
Sync eng/common directory with azure-sdk-tools for PR
Azure/azure-sdk-tools#8912 See [eng/common
workflow](https://github.com/Azure/azure-sdk-tools/blob/main/eng/common/README.md#workflow)

Co-authored-by: Patrick Hallisey <pahallis@microsoft.com>
@hallipr hallipr merged commit d3169e4 into main Sep 3, 2024
14 checks passed
@hallipr hallipr deleted the redundant-packages branch September 3, 2024 23:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants