Fix notice-generation script#3617
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
Pull request overview
Fixes the NOTICE-generation PowerShell script so erroneous copyright lines are actually removed from the in-memory content before writing the final NOTICE output, addressing issue #3607.
Changes:
- Replace two independent
.Replace(...)calls (which re-read and overwrite$content) with a single regex-based-replaceon oneReadAllText(...)result. - Remove both
(c) Microsoft 2023and(c) Microsoft 2024line variants in one pass.
aaronburtle
approved these changes
May 20, 2026
Contributor
aaronburtle
left a comment
There was a problem hiding this comment.
Thanks for fixing this, looks good!
Aniruddh25
approved these changes
May 20, 2026
RubenCerna2079
added a commit
that referenced
this pull request
May 22, 2026
## Why make this change? - Solves issue #3607 Currently the notice file script has a bug that causes it to not replace some of the strings correctly as the values in the `content` variable that are replaced are overwritten by other changes, so they are not saved. ## What is this change? Changed the way the values are changed inside the `content` value by using regex. Currently the only values that need to be deleted are for the years 2023 and 2024. This might change in the future. ## How was this tested? - [ ] Integration Tests - [ ] Unit Tests - [x] Manual Testing Tested this manually by running the script locally. ## Sample Request(s) N/A --------- Co-authored-by: aaronburtle <93220300+aaronburtle@users.noreply.github.com>
Aniruddh25
added a commit
that referenced
this pull request
May 22, 2026
## Why make this change? This change cherry-picks the PRs that fixes the new Nuget Core Package ## What is this change? Cherry-picked PRs - #3617 - #3620 ## How was this tested? Existing tests in cherry-pick cover new changes. ## Sample Request(s) N/A --------- Co-authored-by: aaronburtle <93220300+aaronburtle@users.noreply.github.com> Co-authored-by: Aniruddh Munde <anmunde@microsoft.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Why make this change?
Currently the notice file script has a bug that causes it to not replace some of the strings correctly as the values in the
contentvariable that are replaced are overwritten by other changes, so they are not saved.What is this change?
Changed the way the values are changed inside the
contentvalue by using regex. Currently the only values that need to be deleted are for the years 2023 and 2024. This might change in the future.How was this tested?
Tested this manually by running the script locally.
Sample Request(s)
N/A