Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions .github/scripts/gazette-draft.js
Original file line number Diff line number Diff line change
Expand Up @@ -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"));
26 changes: 23 additions & 3 deletions .github/scripts/release-collect.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand All @@ -211,15 +212,34 @@ 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,
pr_url: pr.html_url,
reason: "No release-note partial files changed",
changed_file_count: files.length
});
}

continue;
}
Expand Down
14 changes: 11 additions & 3 deletions .github/workflows/gazette-collect.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -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
Expand Down Expand Up @@ -196,4 +201,7 @@ jobs:
--title "The Gazette: weekly release-note harvest" \
--body-file /tmp/gazette-pr-body.md \
--base main \
--head "$BRANCH"
--head "$BRANCH"



Loading