Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 5 additions & 3 deletions .github/scripts/Invoke-ContentReplacer.ps1
Original file line number Diff line number Diff line change
@@ -1,7 +1,9 @@
$readmeRaw = Get-Content 'README.md'
$readmeRaw -replace '## mission', "| :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. |`n|-----------|:--------------------------|`n`n## Mission"
$readmeRaw -replace '[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting/badge)](https://scorecard.dev/viewer/?uri=github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting)', ''
$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`n`n"
$readmeRaw = $readmeRaw.Replace('## Mission', "| :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. |`n|-----------|:--------------------------|`n`n## Mission")
# TODO: GHA changes OpenSSF URLs => no match => no replacement
#$readmeRaw = $readmeRaw.Replace('[![OpenSSF Scorecard](https://api.scorecard.dev/projects/github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting/badge)](https://scorecard.dev/viewer/?uri=github.com/JulianHayward/Azure-MG-Sub-Governance-Reporting)', '')
# TODO: disabled because previous replacement is does not work/not needed. TBD: is badge injection before the top-level header needed or is the current location good enough?
#$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?

Expand Down