Generate preview links from build report - #702
Merged
Merged
Conversation
Contributor
There was a problem hiding this comment.
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.Buildand 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.
gewarren
enabled auto-merge (squash)
July 27, 2026 16:25
gewarren
disabled auto-merge
July 27, 2026 17:19
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.
Fixes #701.