mirror of
https://github.com/garrytan/gstack.git
synced 2026-11-18 14:14:37 +01:00
* WIP plain PR bodies and squash messages Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Fold PR bodies to three plain lines and land every PR as one plainly titled commit Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Expect the plain commit body in the train land tests Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Count the new policy keys in the floor tests and record the ship size change Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Let older, generated and Dependabot PRs pass the body check, and keep comments posting The opening check now follows the same date and branch exemption as the rest of the body check, Dependabot branches are exempt, the exemption only counts for branches in this repository, a merge that cannot read the PR waits instead of refusing, and a broken policy file no longer stops comments. Review-Finding: p1/specialist-batched#1 reader=testing Review-Finding: p1/specialist-batched#2 reader=testing Review-Finding: p1/red-team#1 reader=red-team Review-Finding: p1/red-team#2 reader=red-team Review-Finding: p1/red-team#4 reader=red-team Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Stop re-posted PR bodies from duplicating sections, and let file names through the word check Posting an already-folded body now replaces each section once instead of keeping the old copy beside it, and listed words inside file paths or file names, such as a test file in the Tests section, no longer count as prose. Review-Finding: v2/outside-voice#3 reader=outside-voice Review-Finding: v2/adversarial-native#2 reader=adversarial-native Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> * Describe the folded three-line PR body in the skills guide and the prose lint help Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com> --------- Co-authored-by: capy-ai[bot] <230910855+capy-ai[bot]@users.noreply.github.com>
47 lines
2.8 KiB
TypeScript
47 lines
2.8 KiB
TypeScript
/**
|
|
* Result codes for the plain-English title check (lib/plain-title.ts,
|
|
* bin/gstack-plain-title, the "Plain title" CI check; R76). Kept beside
|
|
* lib/result-codes.ts (which spreads this table into RESULT_CODES) so the owner
|
|
* module stays within the module-size ratchet; the same rules apply: one stable
|
|
* docs/troubleshooting.md anchor, a summary and a fix clause each.
|
|
*/
|
|
import type { ResultCode } from './result-codes';
|
|
|
|
export const PLAIN_RESULT_CODES = {
|
|
PLAIN_TITLE_REFUSED: {
|
|
anchor: 'plain-title-refused',
|
|
summary: 'the PR title has a tracker code, a project-only word or a type(scope): prefix before its trailing reference group',
|
|
fix: 'rewrite the title as a plain sentence about what changed for someone using the project; keep at most one trailing group like (ABC-123)',
|
|
},
|
|
PLAIN_BRANCH_REFUSED: {
|
|
anchor: 'plain-branch-refused',
|
|
summary: 'the branch name has a tracker code or a project-only word before its last segment',
|
|
fix: 'name the branch in plain words, with at most one tracker code at the very end (owner/what-changed-abc-123)',
|
|
},
|
|
PLAIN_OPENING_REFUSED: {
|
|
anchor: 'plain-opening-refused',
|
|
summary: 'the PR body does not open with a plain paragraph of at most three lines',
|
|
fix: 'start the body with up to three plain lines: what changed for a user, why, and anything the reader has to do; move codes and records to the Agent notes section at the end',
|
|
},
|
|
PLAIN_BODY_REFUSED: {
|
|
anchor: 'plain-body-refused',
|
|
summary: 'the PR body, once folded, shows more than three lines or 600 characters before its first fold, leaves text outside a fold, uses a listed word above the Agent notes section, or does not end with that section',
|
|
fix: 'keep the opening to three plain lines, put everything else under ## headings (gstack-post folds them), say listed words in everyday words, and let gstack place the receipt in the Agent notes section at the end',
|
|
},
|
|
PLAIN_CHANGELOG_REFUSED: {
|
|
anchor: 'plain-changelog-refused',
|
|
summary: 'the changelog entry has a tracker code, or a project-only word in its bold lead',
|
|
fix: 'drop tracker codes from the entry and rewrite the bold lead in everyday words',
|
|
},
|
|
PLAIN_COMMIT_REFUSED: {
|
|
anchor: 'plain-commit-refused',
|
|
summary: 'a commit subject has a tracker code, a project-only word or a type(scope): prefix before its trailing reference group',
|
|
fix: 'write later commit subjects as plain sentences; the squash commit takes the PR title, so this is a warning only',
|
|
},
|
|
PLAIN_POLICY_INVALID: {
|
|
anchor: 'plain-policy-invalid',
|
|
summary: '.gstack/plain-titles.json is not valid JSON or breaks the schema; the line names the key',
|
|
fix: 'fix the named key (codes, terms, allow, since, exempt_branch_prefixes), then run gstack-plain-title validate',
|
|
},
|
|
} as const satisfies Record<string, ResultCode>;
|