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
2 changes: 1 addition & 1 deletion .github/scripts/issue-review/common.mjs
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
import crypto from "node:crypto";

export const ISSUE_REVIEW_SCHEMA_VERSION = 4;
export const PREFIXED_TITLE = /^[a-z][a-z0-9-]*(?:\/[a-z][a-z0-9-]*)*: \S.*$/;
export const PREFIXED_TITLE = /^[a-z][a-z0-9_-]*(?:\/[a-z][a-z0-9_-]*)*: \S.*$/;

export function sha256(value) {
return crypto.createHash("sha256").update(value).digest("hex");
Expand Down
17 changes: 15 additions & 2 deletions .github/scripts/pr-readiness/test.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,25 @@ assert.deepEqual(
analyzePullRequest(manyLinkedIssuesInput).deterministic_blockers,
[],
);
assert.ok(!blockerCodes(analyzePullRequest({
...input,
title: "h106/zero_esp: add the Zero ESP Main App package",
})).includes("invalid-title"));
assert.ok(blockerCodes(analyzePullRequest({
...manyLinkedIssuesInput,
linked_issue_count: manyLinkedIssues.length + 1,
})).includes("too-many-closing-issues"));
assert.ok(analyzePullRequest({ ...input, title: "Bad title" })
.deterministic_blockers.some((item) => item.code === "invalid-title"));
for (const title of [
"Bad title",
"H106/zero_esp: add the Zero ESP Main App package",
"h106/_zero_esp: add the Zero ESP Main App package",
"h106//zero_esp: add the Zero ESP Main App package",
"h106/zero esp: add the Zero ESP Main App package",
"h106/zero_esp: ",
]) {
assert.ok(analyzePullRequest({ ...input, title })
.deterministic_blockers.some((item) => item.code === "invalid-title"));
}
assert.ok(analyzePullRequest({ ...input, body: "" })
.deterministic_blockers.some((item) => item.code === "missing-body"));
assert.ok(analyzePullRequest({ ...input, body_truncated: true })
Expand Down
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,9 @@ default-branch `AGENTS.md` hierarchy and the Issue-review documents it
designates. The workflow itself enforces only cross-project integrity and PR
linkage requirements:

- PR titles use lowercase `prefix: Subject` form.
- PR titles use lowercase `prefix: Subject` form. Each slash-separated prefix
segment starts with a lowercase letter and may then contain lowercase letters,
digits, hyphens, or underscores.
- The PR body describes the delivered result and validation.
- The PR has at least one same-repository native closing Issue from GraphQL
`closingIssuesReferences`; text-only references do not count.
Expand Down
Loading