Skip to content

Comments

Fixed Invoke-ContentReplacer.ps1#52

Draft
jikuja wants to merge 2 commits intoAzure:masterfrom
jikuja:patch-1
Draft

Fixed Invoke-ContentReplacer.ps1#52
jikuja wants to merge 2 commits intoAzure:masterfrom
jikuja:patch-1

Conversation

@jikuja
Copy link

@jikuja jikuja commented Feb 22, 2025

The script did not save content changes into README.md because of the minor issues.

Running the script with proposed changes has following output with git diff:

diff --git a/README.md b/README.md
index 5b1519b..6a561c7 100644
--- a/README.md
+++ b/README.md
@@ -16,6 +16,9 @@ The technical requirements as well as the required permissions are minimal.

 You can run the script either for your tenant root management group or any other management group.

+| :arrows_counterclockwise: | This repo is a mirror of the open source [AzGovViz project](https://github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting) maintained by Julian Hayward, other Microsoft employees, and community members. It is mirrored here with his permission, and this mirror strives to stay in sync with released upstream versions. Please consider making product improvement recommendations on the upstream repo to prevent divergence. Thank you. |
+|-----------|:--------------------------|
+
 ## Mission

 "_Governance can be a complex thing_.."

Note that OpenSSF URL changes are not visible because jacobtomlinson/gha-find-replace@v3 does the replacement

* Changed -replace to .Replace() to avoid regexp issues
* Save replacement result instead of returning it to host
* Removed no-op and extra replacements
* Added TODOs
#$readmeRaw = $readmeRaw.Replace('# Azure Governance Visualizer aka AzGovViz', "[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/Azure/Azure-Governance-Visualizer/badge)](https://scorecard.dev/viewer/?uri=github.com/Azure/Azure-Governance-Visualizer)`n`n# Azure Governance Visualizer aka AzGovViz")

$readmeRaw | Set-Content 'README.md'
Write-Host 'README.md has been updated with block for upstream notice.'

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unblock

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Unblock as remove commented code that

  • does nothing
  • creates duplicate OpenSSF badge?

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.

2 participants