passsy / write-good-pr-descriptionsr2
PR Description Style Guidelines
PublicGive a PR a verb-first title and a short description of the problem and the change, with examples or screenshots, and leave out fluff and test-plan lists.
tests, run by the registry11 passed · slowest 3.7 ms
✓fires1.9 ms
points at the principle on $text ({"text":"can you write the PR description","word":"PR"})
promptfired: "PR"
can you write the PR description✓fires2.7 ms
points at the principle on $text ({"text":"open a pull request for this","word":"pull request"})
promptfired: "pull request"
open a pull request for this✓fires3.7 ms
points at the principle on $text ({"text":"I left comments on both pull requests","word":"pull requests"})
promptfired: "pull requests"
I left comments on both pull requests✓quiet3.1 ms
stays quiet on the job runs on pull_request
promptstayed quiet
the job runs on pull_request✓quiet3.1 ms
stays quiet on run the pre-commit hook
promptstayed quiet
run the pre-commit hook✓quiet3.3 ms
stays quiet on Prüfe das Wetter
promptstayed quiet
Prüfe das Wetter✓fires1.1 ms
fires in full on the command $line ({"line":"gh pr create --title \"Fix CI\" --body \"why\"","match":"gh pr create"})
commandfired: "gh pr create"
gh pr create --title "Fix CI" --body "why"✓fires1.1 ms
fires in full on the command $line ({"line":"gh pr edit 166 --body \"why\"","match":"gh pr edit"})
commandfired: "gh pr edit"
gh pr edit 166 --body "why"✓quiet1.1 ms
stays quiet on the command gh pr view 166 --json state
commandstayed quiet
gh pr view 166 --json state✓quiet1.1 ms
stays quiet on the command gh pr checks 166
commandstayed quiet
gh pr checks 166✓quiet1.1 ms
stays quiet on the command printf '%s\n' 'gh pr create is the documented form'
commandstayed quiet
printf '%s\n' 'gh pr create is the documented form'detector.test.tseach detect() call runs the real detectorEdit
import { expect, test } from "vitest";
import { command, detect, prompt } from "@wellactually/sdk/v3/test";
test.each([
{ text: "can you write the PR description", word: "PR" },
{ text: "open a pull request for this", word: "pull request" },
{ text: "I left comments on both pull requests", word: "pull requests" },
])("points at the principle on $text", ({ text, word }) => {
expect(detect(prompt(text))).toEqual([{ match: word, depth: "pointer" }]);
});
test.each(["the job runs on pull_request", "run the pre-commit hook", "Prüfe das Wetter"])("stays quiet on %s", (text) => {
expect(detect(prompt(text))).toEqual([]);
});
test.each([
{ line: 'gh pr create --title "Fix CI" --body "why"', match: "gh pr create" },
{ line: 'gh pr edit 166 --body "why"', match: "gh pr edit" },
])("fires in full on the command $line", ({ line, match }) => {
expect(detect(command(line))).toEqual([{ match }]);
});
test.each(["gh pr view 166 --json state", "gh pr checks 166", "printf '%s\\n' 'gh pr create is the documented form'"])("stays quiet on the command %s", (line) => {
expect(detect(command(line))).toEqual([]);
});