Skip to content

Conversation

@michaeltlombardi
Copy link
Contributor

@michaeltlombardi michaeltlombardi commented Jun 13, 2022

PR Summary

When managing documentation with multiple versions of the same file, it is necessary to check Pull Requests modifying versioned content across all of the versions that file exists for. It is not always obvious from GitHub's view for files changed in a Pull Request whether and how a file was modified across versions.

Prior to this change, the only way for the maintainers to inspect this information was to carefully read every change in the Pull Request. It required a large amount of cognitive load as a reviewer needed to make a mental note of every change to versioned content, find the other versions of that file (if any) the Pull Request modified, and verify whether all needed changes were made.

This change helps to address the problem by introducing a new GitHub Action for reporting on how a Pull Request modified versioned content.

The new reporting/versioned-content action inspects the files changed in a Pull Request to determine which files are versioned content and then writes a report by folder enumerating which files the Pull Request changed and how those changes impact each version for the file.

The action is called in this repository by the new versioned-content workflow, which runs on Pull Requests to the main branch which modify versioned content in the reference folder.

Like the other actions, reporting/versioned-content can be called from other repositories.

This change also added new utility functions to the GHA module:

  • Add-VersionedContentTable writes a markdown table summarizing a changeset.
  • Get-VersionedContentChangeStatus analyzes a Pull Request's changes to return information about the changes to versioned content.
  • Get-VersionedContentTableColumnWidth returns the calculated widths for columns in the report's tables to ensure the pipes in the tables line up for reading when interactively debugging.

All three functions are exported by the module.

Finally, the action utilizes the updated Get-VersionedContentReport script, which is now appropriately documented.

  • Resolves AB#1951698

Example Reports

PR Checklist

  • Descriptive Title: This PR's title is a synopsis of the changes it proposes.
  • Summary: This PR's summary describes the scope and intent of the change.
  • Contributor's Guide: I have read the contributors guide.
  • Style: This PR adheres to the style guide.

@opbld33
Copy link

opbld33 commented Jun 13, 2022

Docs Build status updates of commit 709ff0e:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 ✅Succeeded
.github/actions/.pwsh/module/gha.psd1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1.md ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/action.yml ✅Succeeded
.github/workflows/versioned-content.yml ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld31
Copy link

opbld31 commented Jun 13, 2022

Docs Build status updates of commit 8c6a2b7:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 ✅Succeeded
.github/actions/.pwsh/module/gha.psd1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1.md ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/action.yml ✅Succeeded
.github/workflows/versioned-content.yml ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld32
Copy link

opbld32 commented Jun 13, 2022

Docs Build status updates of commit 29e6ce7:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 ✅Succeeded
.github/actions/.pwsh/module/gha.psd1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1.md ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/action.yml ✅Succeeded
.github/workflows/versioned-content.yml ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld33
Copy link

opbld33 commented Jun 13, 2022

Docs Build status updates of commit 716be78:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 ✅Succeeded
.github/actions/.pwsh/module/gha.psd1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1.md ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/action.yml ✅Succeeded
.github/workflows/versioned-content.yml ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld33
Copy link

opbld33 commented Jun 13, 2022

Docs Build status updates of commit 8326eac:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 ✅Succeeded
.github/actions/.pwsh/module/gha.psd1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1.md ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/action.yml ✅Succeeded
.github/workflows/versioned-content.yml ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@michaeltlombardi michaeltlombardi force-pushed the ab-1951698/main/develop-vc-report-action branch from 8326eac to 079479c Compare June 13, 2022 22:59
@opbld31
Copy link

opbld31 commented Jun 13, 2022

Docs Build status updates of commit 079479c:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 ✅Succeeded
.github/actions/.pwsh/module/gha.psd1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1.md ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/action.yml ✅Succeeded
.github/workflows/versioned-content.yml ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@opbld32
Copy link

opbld32 commented Jun 13, 2022

Docs Build status updates of commit a1fc139:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Write-ActionFailureSummary.ps1 ✅Succeeded
.github/actions/.pwsh/module/gha.psd1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1.md ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/action.yml ✅Succeeded
.github/workflows/versioned-content.yml ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@michaeltlombardi michaeltlombardi force-pushed the ab-1951698/main/develop-vc-report-action branch from a1fc139 to 93aeeab Compare June 13, 2022 23:18
@opbld32
Copy link

opbld32 commented Jun 13, 2022

Docs Build status updates of commit 93aeeab:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Write-ActionFailureSummary.ps1 ✅Succeeded
.github/actions/.pwsh/module/gha.psd1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1.md ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/action.yml ✅Succeeded
.github/workflows/versioned-content.yml ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@michaeltlombardi michaeltlombardi force-pushed the ab-1951698/main/develop-vc-report-action branch from 93aeeab to 112c532 Compare June 13, 2022 23:28
@opbld32
Copy link

opbld32 commented Jun 13, 2022

Docs Build status updates of commit 112c532:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Write-ActionFailureSummary.ps1 ✅Succeeded
.github/actions/.pwsh/module/gha.psd1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1.md ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/action.yml ✅Succeeded
.github/workflows/versioned-content.yml ✅Succeeded
reference/5.1/CimCmdlets/Export-BinaryMiLog.md ✅Succeeded View (powershell-5.1)

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@michaeltlombardi michaeltlombardi force-pushed the ab-1951698/main/develop-vc-report-action branch from 112c532 to 9ac0239 Compare June 13, 2022 23:31
@opbld32
Copy link

opbld32 commented Jun 13, 2022

Docs Build status updates of commit 9ac0239:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Write-ActionFailureSummary.ps1 ✅Succeeded
.github/actions/.pwsh/module/gha.psd1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1.md ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/action.yml ✅Succeeded
.github/workflows/versioned-content.yml ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@michaeltlombardi michaeltlombardi marked this pull request as ready for review June 13, 2022 23:33
When managing documentation with multiple versions of the same file, it
is necessary to check Pull Requests modifying versioned content across
all of the versions that file exists for. It is not always obvious from
GitHub's view for files changed in a Pull Request whether and how a file
was modified across versions.

Prior to this change, the only way for the maintainers to inspect this
information was to carefully read every change in the Pull Request. It
required a large amount of cognitive load as a reviewer needed to make a
mental note of every change to versioned content, find the other
versions of that file (if any) the Pull Request modified, and verify
whether all needed changes were made.

This change helps to address the problem by introducing a new GitHub
Action for reporting on how a Pull Request modified versioned content.

The new `reporting/versioned-content` action inspects the files changed
in a Pull Request to determine which files are versioned content and
then writes a report by folder enumerating which files the Pull Request
changed and how those changes impact each version for the file.

The action is called in this repository by the new `versioned-content`
workflow, which runs on Pull Requests to the `main` branch which modify
versioned content in the `reference` folder.

Like the other actions, `reporting/versioned-content` can be called from
other repositories.

This change also added new utility functions to the GHA module:

- `Add-VersionedContentTable` writes a markdown table summarizing a
  changeset.
- `Get-VersionedContentChangeStatus` analyzes a Pull Request's changes
  to return information about the changes to versioned content.
- `Get-VersionedContentTableColumnWidth` returns the calculated widths
  for columns in the report's tables to ensure the pipes in the tables
  line up for reading when interactively debugging.

All three functions are exported by the module.

Finally, the action utilizes the updated `Get-VersionedContentReport`
script, which is now appropriately documented.

- Resolves AB#1951698
@michaeltlombardi michaeltlombardi force-pushed the ab-1951698/main/develop-vc-report-action branch from 9ac0239 to 375fdf0 Compare June 14, 2022 03:06
@opbld30
Copy link

opbld30 commented Jun 14, 2022

Docs Build status updates of commit 375fdf0:

✅ Validation status: passed

File Status Preview URL Details
.github/actions/.pwsh/module/functions/utility/Add-VersionedContentTable.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentChangeStatus.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Get-VersionedContentTableColumnWidth.ps1 ✅Succeeded
.github/actions/.pwsh/module/functions/utility/Write-ActionFailureSummary.ps1 ✅Succeeded
.github/actions/.pwsh/module/gha.psd1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1 ✅Succeeded
.github/actions/.pwsh/scripts/Get-VersionedContentReport.ps1.md ✅Succeeded
.github/actions/reporting/versioned-content/v1/Parameters.psd1 ✅Succeeded
.github/actions/reporting/versioned-content/v1/action.yml ✅Succeeded
.github/actions/reporting/versioned-content/v1/readme.md ✅Succeeded
.github/workflows/versioned-content.yml ✅Succeeded

For more details, please refer to the build report.

Note: Broken links written as relative paths are included in the above build report. For broken links written as absolute paths or external URLs, see the broken link report.

For any questions, please:

@michaeltlombardi michaeltlombardi merged commit c11b75b into MicrosoftDocs:main Jun 14, 2022
@michaeltlombardi michaeltlombardi deleted the ab-1951698/main/develop-vc-report-action branch June 14, 2022 03:18
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.

5 participants