Check if recent web platform release notes are correct#3712
Check if recent web platform release notes are correct#3712captainbrosset wants to merge 1 commit intomainfrom
Conversation
|
Learn Build status updates of commit 1e7c8a5: ✅ Validation status: passed
For more details, please refer to the build report. |
| @@ -0,0 +1,421 @@ | |||
| // This script compares the last 5 release notes with the features from chromestatus.com | |||
There was a problem hiding this comment.
| // This script compares the last 5 release notes with the features from chromestatus.com | |
| // This script compares the last few release notes files with the features from chromestatus.com |
below says:
// The number of recent release notes to analyze.
const NUMBER_OF_RELEASE_NOTES = 3;
// Get the last N release notes files by version number.
// 1. Get the last N release notes files.
| - "Edge DevTools" section | ||
| - "WebView2" section | ||
| - "Origin trials in Microsoft Edge" section (Edge-only origin trials) | ||
| - Any features explicitly marked as Microsoft Edge-specific |
There was a problem hiding this comment.
| - "Edge DevTools" section | |
| - "WebView2" section | |
| - "Origin trials in Microsoft Edge" section (Edge-only origin trials) | |
| - Any features explicitly marked as Microsoft Edge-specific | |
| - The "Edge DevTools" section. | |
| - The "WebView2" section. | |
| - The "Origin trials in Microsoft Edge" section (Edge-only origin trials). | |
| - Any features that are explicitly marked as Microsoft Edge-specific. |
- R.A. & I feel that such a list reads better with period on each item.
- Increased parallelism across list items.
| - Focus on user-facing web platform features (CSS, Web APIs, JavaScript) | ||
| - Ignore internal/infrastructure changes | ||
| - Ignore origin trials | ||
| - Note: Feature names and descriptions may differ (e.g., "scroll-driven" vs "scroll-triggered") |
There was a problem hiding this comment.
| - Focus on user-facing web platform features (CSS, Web APIs, JavaScript) | |
| - Ignore internal/infrastructure changes | |
| - Ignore origin trials | |
| - Note: Feature names and descriptions may differ (e.g., "scroll-driven" vs "scroll-triggered") | |
| - Focus on user-facing web platform features (such as CSS, Web APIs, or JavaScript). | |
| - Ignore internal/infrastructure changes. | |
| - Ignore origin trials. | |
| - Note: Feature names and descriptions may differ (e.g., "scroll-driven" vs. "scroll-triggered"). |
| - Note: Feature names and descriptions may differ (e.g., "scroll-driven" vs "scroll-triggered") | ||
|
|
||
| ### 2. Missing from Release Notes (Low Priority) | ||
| Features that might be intentionally omitted (minor changes, already deprecated, etc.) |
There was a problem hiding this comment.
| Features that might be intentionally omitted (minor changes, already deprecated, etc.) | |
| Features that might be intentionally omitted (such as minor changes, or already deprecated). |
| - **Completeness**: [Complete | Mostly Complete | Needs Review | Incomplete] | ||
| - **Action items**: Brief list of recommended changes (if any) |
There was a problem hiding this comment.
| - **Completeness**: [Complete | Mostly Complete | Needs Review | Incomplete] | |
| - **Action items**: Brief list of recommended changes (if any) | |
| - **Completeness**: [Complete | Mostly Complete | Needs Review | Incomplete]. | |
| - **Action items**: Brief list of recommended changes (if any). |
|
|
||
| const chromeStatusSummary = formatChromeStatusFeatures(chromeStatusData); | ||
|
|
||
| const prompt = `You are an expert technical writer analyzing Microsoft Edge web platform release notes for completeness. |
There was a problem hiding this comment.
is there a closing ` below? where does the prompt end?
the PR Comment below at end of prompt
| `https://chromestatus.com/api/v0/features?milestone=${version}` | ||
| ); | ||
|
|
||
| // The API returns features_by_type which can be an array or object depending on the response. |
There was a problem hiding this comment.
| // The API returns features_by_type which can be an array or object depending on the response. | |
| // The API returns features_by_type, which can be an array or an object, depending on the response. |
add comma per https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/t/that-vs-which
|
|
||
| const lines = []; | ||
|
|
||
| // Handle both array format and object format |
There was a problem hiding this comment.
| // Handle both array format and object format | |
| // Handle both array format and object format. |
| } | ||
| } | ||
| } else if (typeof featuresByType === 'object') { | ||
| // If it's an object with category keys |
There was a problem hiding this comment.
| // If it's an object with category keys | |
| // Do if it's an object that has category keys. |
| ### 5. Summary | ||
| - **Completeness**: [Complete | Mostly Complete | Needs Review | Incomplete] | ||
| - **Action items**: Brief list of recommended changes (if any) | ||
|
|
There was a problem hiding this comment.
| // The closing quote for const prompt = `You are ... . | |
| ` | |
does const prompt end here?
- add a comment saying this is the end of the prompt.
- maybe also add a ` line.
the PR Comment above at start of prompt
| @@ -0,0 +1,421 @@ | |||
| // This script compares the last 5 release notes with the features from chromestatus.com | |||
| // and uses GitHub Models (via the GITHUB_TOKEN) to analyze the differences. | |||
| // This script can run as part of a GitHub Actions workflow or locally. | |||
There was a problem hiding this comment.
| // This script can run as part of a GitHub Actions workflow or locally. | |
| // This script can be run as part of a GitHub Actions workflow, or can be run locally. |
| // and uses GitHub Models (via the GITHUB_TOKEN) to analyze the differences. | ||
| // This script can run as part of a GitHub Actions workflow or locally. | ||
| // | ||
| // For local use, create a .env file in the scripts folder with: |
There was a problem hiding this comment.
| // For local use, create a .env file in the scripts folder with: | |
| // For local use, create a .env file in the scripts folder containing the following variable value, or key/value pair: | |
| For example, GITHUB_TOKEN=A1B2C3D4 |
clarify "with"; what should the .env file contain?
https://learn.microsoft.com/en-us/style-guide/a-z-word-list-term-collections/u/using-by-using-with - "Don't use with as a synonym for using or by using." ie, favor not using "with" in a wildcard way; use specific wording instead of "with".
| // File names are like "145.md", so we extract "145". | ||
| function getVersionFromFileName(fileName) { | ||
| const baseName = path.basename(fileName, ".md"); | ||
| // Filter out non-numeric file names like "index.md". |
There was a problem hiding this comment.
| // Filter out non-numeric file names like "index.md". | |
| // Filter out non-numeric file names, such as "index.md". |
the orig logic (lack of comma) implies:
Filter out only the non-numeric file names that are like "index.md"; keep the other non-numeric file names.
| // Get the last N release notes files by version number. | ||
| async function getLastReleaseNotesFiles(count) { | ||
| const scriptDir = path.dirname(new URL(import.meta.url).pathname); | ||
| // Fix Windows path (remove leading / if present on Windows paths like /C:/...) |
There was a problem hiding this comment.
| // Fix Windows path (remove leading / if present on Windows paths like /C:/...) | |
| // Remove the leading / if present on Windows paths, such as /C:/... . |
| ); | ||
|
|
||
| // The API returns features_by_type which can be an array or object depending on the response. | ||
| // Return the whole data object so we can inspect its structure. |
There was a problem hiding this comment.
| // Return the whole data object so we can inspect its structure. | |
| // Return the whole data object, so that we can inspect its structure. |
| // The release notes folder relative to this script. | ||
| const RELEASE_NOTES_FOLDER = "../microsoft-edge/web-platform/release-notes"; | ||
|
|
||
| // The number of recent release notes to analyze. |
There was a problem hiding this comment.
| // The number of recent release notes to analyze. | |
| // The number of recent release notes files to analyze. |
|
|
||
| const files = await glob("*.md", { cwd: releaseNotesPath }); | ||
|
|
||
| // Extract versions and filter out non-version files (like index.md). |
There was a problem hiding this comment.
| // Extract versions and filter out non-version files (like index.md). | |
| // Extract versions and filter out non-version files (such as index.md). |
| })) | ||
| .filter(item => item.version !== null); | ||
|
|
||
| // Sort by version number descending and take the last N. |
There was a problem hiding this comment.
| // Sort by version number descending and take the last N. | |
| // Sort by version number descending and take the last N files. |
|
|
||
| const report = generateReport(results); | ||
|
|
||
| // Write the report to a file only when running locally (not in GitHub Actions). |
There was a problem hiding this comment.
| // Write the report to a file only when running locally (not in GitHub Actions). | |
| // Write the report to a file only if running locally (not when running via GitHub Actions). |
The chromestatus.com database, which we use to write our web platform release notes, sometimes changes after a release note was written. This can cause release notes to become incorrect, or incomplete, after they've been published.
This PR is an attempt to check existing release notes on a daily basis, by comparing them to chromestatus.com again.
AB# pending