diff --git a/.github/scripts/gazette-draft.js b/.github/scripts/gazette-draft.js index 205b6960..eba915cc 100644 --- a/.github/scripts/gazette-draft.js +++ b/.github/scripts/gazette-draft.js @@ -42,4 +42,39 @@ if (data.sources.length === 0) { } } +if (data.needs_editor_review && data.needs_editor_review.length > 0) { + lines.push(""); + lines.push("== Editor review candidates"); + lines.push(""); + lines.push("// These PRs may contain release-note-worthy changes."); + lines.push("// They did not include release-note partial files."); + lines.push("// Human review required before inclusion."); + lines.push(""); + + for (const candidate of data.needs_editor_review) { + lines.push(`=== ${candidate.pr_title}`); + lines.push(""); + lines.push(`// PR: ${candidate.pr_url}`); + lines.push(`// Reason: ${candidate.reason}`); + + if (candidate.signal && candidate.signal.length > 0) { + lines.push("// Signals:"); + for (const signal of candidate.signal) { + lines.push(`// - ${signal}`); + } + } + + lines.push(""); + + if (candidate.changed_files && candidate.changed_files.length > 0) { + lines.push("// Changed files:"); + for (const file of candidate.changed_files) { + lines.push(`// - ${file}`); + } + } + + lines.push(""); + } +} + process.stdout.write(lines.join("\n")); \ No newline at end of file diff --git a/.github/scripts/release-collect.js b/.github/scripts/release-collect.js index 4d5b4b87..27d59453 100644 --- a/.github/scripts/release-collect.js +++ b/.github/scripts/release-collect.js @@ -194,7 +194,8 @@ async function collectSources(owner, repo) { partial_count: 0, ignored_non_partial_file_count: 0, sources: [], - skipped: [] + skipped: [], + needs_editor_review: [] }; for (const pr of prs) { @@ -211,7 +212,27 @@ async function collectSources(owner, repo) { const ignoredFiles = files.filter((file) => !file.filename.startsWith(PARTIALS_PATH)); if (partialFiles.length === 0) { - if (INCLUDE_SKIPPED) { + const isPotentialReleaseNoteCandidate = + pr.user?.login === "IT-Kobiton" && + files.some((file) => + file.filename.startsWith("docs/modules/") + ); + + if (isPotentialReleaseNoteCandidate) { + output.needs_editor_review.push({ + pr_number: pr.number, + pr_title: pr.title, + pr_url: pr.html_url, + reason: + "IT-Kobiton docs PR without a release-note partial. Changed customer-facing docs surface. Human review recommended.", + signal: [ + "author: IT-Kobiton", + "changed_path: docs/modules/" + ], + changed_files: files.map((file) => file.filename) + }); + } + output.skipped.push({ pr_number: pr.number, pr_title: pr.title, @@ -219,7 +240,6 @@ async function collectSources(owner, repo) { reason: "No release-note partial files changed", changed_file_count: files.length }); - } continue; } diff --git a/.github/workflows/gazette-collect.yaml b/.github/workflows/gazette-collect.yaml index fca61821..fdffcfa6 100644 --- a/.github/workflows/gazette-collect.yaml +++ b/.github/workflows/gazette-collect.yaml @@ -27,7 +27,7 @@ on: release_date: description: "Target release date, YYYY-MM-DD" required: false - default: "2026-08-22" + default: "" type: string release_label: description: "Release label, for example 2608.18" @@ -58,6 +58,11 @@ on: - ".github/scripts/release-collect.js" - ".github/scripts/gazette-draft.js" + schedule: + # Thursday 9:00 PM Eastern during daylight saving time. + # GitHub cron uses UTC. + - cron: "0 13 * * 4" + permissions: contents: write pull-requests: write @@ -137,7 +142,7 @@ jobs: retention-days: 7 - name: Create Gazette pull request - if: ${{ github.event_name == 'workflow_dispatch' && inputs.create_pr == 'true' }} + if: ${{ github.event_name == 'schedule' || (github.event_name == 'workflow_dispatch' && inputs.create_pr == 'true') }} env: GH_TOKEN: ${{ secrets.GITHUB_TOKEN }} BRANCH: gazette/weekly-release-note-harvest @@ -196,4 +201,7 @@ jobs: --title "The Gazette: weekly release-note harvest" \ --body-file /tmp/gazette-pr-body.md \ --base main \ - --head "$BRANCH" \ No newline at end of file + --head "$BRANCH" + + +