Skip to content

Generate preview links from build report - #702

Merged
gewarren merged 4 commits into
dotnet:mainfrom
gewarren:preview-link-build-report
Jul 27, 2026
Merged

Generate preview links from build report#702
gewarren merged 4 commits into
dotnet:mainfrom
gewarren:preview-link-build-report

Conversation

@gewarren

Copy link
Copy Markdown
Collaborator

Fixes #701.

Copilot AI review requested due to automatic review settings July 27, 2026 15:47
@gewarren
gewarren requested a review from a team as a code owner July 27, 2026 15:47
Comment thread actions/preview-link-generator/dist/index.js Fixed
Comment thread actions/preview-link-generator/src/pull-updater.ts Fixed

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Pull request overview

Updates the preview-link-generator GitHub Action to stop manually constructing preview URLs from the PR file list and instead wait for the OPS OpenPublishing.Build status check and extract preview links directly from the OPS build report, addressing issue #701 (supporting snippets/includes/XML, etc., via whatever the report contains).

Changes:

  • Replace GraphQL file enumeration + manual link construction with polling for OpenPublishing.Build and HTML parsing of the build report.
  • Simplify the GraphQL PR type shape and remove now-unused file/change-related types and heading-extraction logic.
  • Update Jest tests to validate HTML link extraction and table generation based on extracted links.

Reviewed changes

Copilot reviewed 16 out of 18 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
actions/preview-link-generator/src/types/PullRequestState.ts Removes dedicated PR state enum type.
actions/preview-link-generator/src/types/PullRequestDetails.ts Inlines PR fields into the details type.
actions/preview-link-generator/src/types/Pull.ts Removes file-enumeration PR type (no longer used).
actions/preview-link-generator/src/types/PageInfo.ts Removes pagination type (no longer used).
actions/preview-link-generator/src/types/NodeOf.ts Removes GraphQL edge/node wrapper type (no longer used).
actions/preview-link-generator/src/types/FileChange.ts Removes file-change type (no longer used).
actions/preview-link-generator/src/types/ChangeType.ts Removes change-type union (no longer used).
actions/preview-link-generator/src/pull-updater.ts Core logic change: poll OPS check, download report HTML, extract preview links, build table, update PR body.
actions/preview-link-generator/src/file-heading-extractor.ts Removes heading extraction logic (no longer needed for table titles).
actions/preview-link-generator/README.md Updates description to match new OPS-report-based behavior.
actions/preview-link-generator/dist/index.js Rebuild of bundled action output to reflect source changes.
actions/preview-link-generator/action.yml Updates action description to match new behavior.
actions/preview-link-generator/tests/sample.md Removes fixture no longer needed after heading-extractor removal.
actions/preview-link-generator/tests/pull-updater.test.ts Replaces manual-preview-link tests with build-report parsing + table generation tests.
actions/preview-link-generator/tests/no-heading.md Removes fixture no longer needed after heading-extractor removal.
actions/preview-link-generator/tests/file-heading-extractor.test.ts Removes tests for deleted heading-extractor module.
actions/preview-link-generator/tests/3/three.md Removes fixture no longer needed after heading-extractor removal.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread actions/preview-link-generator/src/pull-updater.ts
Comment thread actions/preview-link-generator/src/pull-updater.ts
Comment thread actions/preview-link-generator/src/types/PullRequestDetails.ts
@gewarren
gewarren enabled auto-merge (squash) July 27, 2026 16:25
@gewarren
gewarren disabled auto-merge July 27, 2026 17:19
@gewarren
gewarren merged commit d5d277b into dotnet:main Jul 27, 2026
9 checks passed
@gewarren
gewarren deleted the preview-link-build-report branch July 27, 2026 17:19
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.

[preview link generator] Pull preview links from build report

3 participants