pr-shepherd 1.6.1 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/.claude-plugin/plugin.json +1 -1
- package/README.md +52 -54
- package/bin/classify/standard/dependency-review-no-issues.d.mts +4 -0
- package/bin/classify/standard/dependency-review-no-issues.mjs +16 -0
- package/bin/classify/standard/index.mjs +8 -0
- package/bin/classify/standard/snyk-no-issues.d.mts +7 -0
- package/bin/classify/standard/snyk-no-issues.mjs +27 -0
- package/bin/classify/standard/socket-reports.d.mts +4 -0
- package/bin/classify/standard/socket-reports.mjs +18 -0
- package/bin/classify/standard/sonarqube-gate-passed.d.mts +7 -0
- package/bin/classify/standard/sonarqube-gate-passed.mjs +41 -0
- package/bin/cli/iterate-instructions.mjs +1 -1
- package/bin/cli/iterate-lean.mjs +1 -0
- package/bin/cli/list-formatters.d.mts +7 -0
- package/bin/cli/list-formatters.mjs +7 -1
- package/bin/cli/triage-formatter.mjs +8 -2
- package/bin/commands/check.mjs +2 -1
- package/bin/commands/iterate/check-instructions.d.mts +1 -1
- package/bin/commands/iterate/check-instructions.mjs +2 -2
- package/bin/commands/iterate/classify.mjs +3 -3
- package/bin/commands/iterate/conflict-candidate-files.d.mts +9 -0
- package/bin/commands/iterate/conflict-candidate-files.mjs +19 -0
- package/bin/commands/iterate/escalate.mjs +2 -1
- package/bin/commands/iterate/native-stack-rebase.mjs +6 -1
- package/bin/commands/iterate/triage.mjs +16 -0
- package/bin/commands/review-commit.d.mts +7 -0
- package/bin/commands/review-commit.mjs +11 -0
- package/bin/github/rest-conflict-files-read.d.mts +7 -0
- package/bin/github/rest-conflict-files-read.mjs +33 -0
- package/bin/types/github.d.mts +8 -0
- package/bin/types/iterate.d.mts +5 -3
- package/package.json +1 -1
- package/plugins/pr-shepherd/.claude-plugin/plugin.json +1 -1
- package/plugins/pr-shepherd/.codex-plugin/plugin.json +1 -1
- package/plugins/pr-shepherd/.codex.mcp.json +1 -1
- package/plugins/pr-shepherd/.mcp.json +1 -1
- package/plugins/pr-shepherd/hooks/poll-guard-args.mjs +49 -0
- package/plugins/pr-shepherd/hooks/poll-guard-detect.mjs +134 -26
- package/plugins/pr-shepherd/hooks/poll-guard-shell.mjs +192 -0
- package/plugins/pr-shepherd/package-lock.json +10 -10
- package/plugins/pr-shepherd/package.json +1 -1
- package/plugins/pr-shepherd/skills/pr-shepherd/SKILL.md +9 -17
- package/plugins/pr-shepherd/skills/pr-shepherd/references/triage-loop.md +1 -1
- package/plugins/pr-shepherd/skills/reduce-pr-noise/references/classifiers.md +1 -1
- package/pr-shepherd.schema.json +4 -0
- /package/plugins/pr-shepherd/skills/pr-shepherd/references/{create-pr.md → create-a-pr.md} +0 -0
|
@@ -0,0 +1,192 @@
|
|
|
1
|
+
// A small, deliberately incomplete shell scanner for the poll guard. It finds the
|
|
2
|
+
// simple commands a shell would run and the loops they run in. Text a command only
|
|
3
|
+
// passes around (quoted strings, comments, heredoc bodies) is masked, so a word in
|
|
4
|
+
// it is never mistaken for a command. Command substitutions inside double quotes
|
|
5
|
+
// stay visible, because the shell runs them.
|
|
6
|
+
|
|
7
|
+
const HIDDEN = "\0";
|
|
8
|
+
const SEPARATORS = /[;&|\n(){}`]/;
|
|
9
|
+
const WRAPPERS = new Set([
|
|
10
|
+
"!",
|
|
11
|
+
"time",
|
|
12
|
+
"nohup",
|
|
13
|
+
"exec",
|
|
14
|
+
"sudo",
|
|
15
|
+
"command",
|
|
16
|
+
"builtin",
|
|
17
|
+
"env",
|
|
18
|
+
"npx",
|
|
19
|
+
]);
|
|
20
|
+
const KEYWORDS = new Set(["do", "then", "else", "elif", "if"]);
|
|
21
|
+
|
|
22
|
+
/**
|
|
23
|
+
* Masks quoted text with NUL and comments and heredoc bodies with spaces, preserving
|
|
24
|
+
* UTF-16 length. Quoted text stays one argument; comments and heredocs disappear.
|
|
25
|
+
*/
|
|
26
|
+
export function maskShell(text) {
|
|
27
|
+
const out = text.split("");
|
|
28
|
+
const stack = [{ mode: "code", depth: 0 }];
|
|
29
|
+
let heredocs = [];
|
|
30
|
+
const hide = (from, to, fill = HIDDEN) => {
|
|
31
|
+
for (let k = from; k < to && k < out.length; k++) if (out[k] !== "\n") out[k] = fill;
|
|
32
|
+
};
|
|
33
|
+
for (let i = 0; i < text.length; i++) {
|
|
34
|
+
const top = stack.at(-1);
|
|
35
|
+
const c = text[i];
|
|
36
|
+
if (top.mode === "dq") {
|
|
37
|
+
if (c === "\\") {
|
|
38
|
+
hide(i, i + 2);
|
|
39
|
+
i++;
|
|
40
|
+
} else if (c === '"') {
|
|
41
|
+
hide(i, i + 1);
|
|
42
|
+
stack.pop();
|
|
43
|
+
} else if (c === "$" && text[i + 1] === "(") {
|
|
44
|
+
stack.push({ mode: "code", depth: 1 });
|
|
45
|
+
i++;
|
|
46
|
+
} else if (c === "`") stack.push({ mode: "bq", depth: 0 });
|
|
47
|
+
else hide(i, i + 1);
|
|
48
|
+
continue;
|
|
49
|
+
}
|
|
50
|
+
if (c === "`" && top.mode === "bq") {
|
|
51
|
+
stack.pop();
|
|
52
|
+
continue;
|
|
53
|
+
}
|
|
54
|
+
if (c === "\\") {
|
|
55
|
+
hide(i, i + 2);
|
|
56
|
+
i++;
|
|
57
|
+
} else if (c === "$" && text[i + 1] === "'") {
|
|
58
|
+
// ANSI-C `$'…'`: a backslash escapes the next character, including a quote.
|
|
59
|
+
let j = i + 2;
|
|
60
|
+
while (j < text.length && text[j] !== "'") j += text[j] === "\\" ? 2 : 1;
|
|
61
|
+
hide(i, j + 1);
|
|
62
|
+
i = j;
|
|
63
|
+
} else if (c === "'") {
|
|
64
|
+
const end = text.indexOf("'", i + 1);
|
|
65
|
+
const stop = end === -1 ? text.length : end + 1;
|
|
66
|
+
hide(i, stop);
|
|
67
|
+
i = stop - 1;
|
|
68
|
+
} else if (c === '"') {
|
|
69
|
+
hide(i, i + 1);
|
|
70
|
+
stack.push({ mode: "dq", depth: 0 });
|
|
71
|
+
} else if (c === "#" && (i === 0 || /[\s;&|(]/.test(text[i - 1]))) {
|
|
72
|
+
const end = text.indexOf("\n", i);
|
|
73
|
+
hide(i, end === -1 ? text.length : end, " ");
|
|
74
|
+
i = (end === -1 ? text.length : end) - 1;
|
|
75
|
+
} else if (c === "$" && text[i + 1] === "{") {
|
|
76
|
+
// `${VAR}` stays inside its word; its braces are not a command group.
|
|
77
|
+
const end = text.indexOf("}", i);
|
|
78
|
+
const stop = end === -1 ? text.length : end + 1;
|
|
79
|
+
hide(i, stop);
|
|
80
|
+
i = stop - 1;
|
|
81
|
+
} else if (c === "(" && top.depth > 0) top.depth++;
|
|
82
|
+
else if (c === ")" && top.depth > 0 && --top.depth === 0) stack.pop();
|
|
83
|
+
else if (c === "<" && text[i + 1] === "<" && text[i + 2] !== "<") {
|
|
84
|
+
const m = /^<<(-?)\s*(['"]?)([\w.-]+)\2/.exec(text.slice(i));
|
|
85
|
+
if (m) heredocs.push({ strip: m[1] === "-", tag: m[3] });
|
|
86
|
+
} else if (c === "\n" && heredocs.length > 0) {
|
|
87
|
+
i = skipHeredocs(text, i + 1, heredocs, hide) - 1;
|
|
88
|
+
heredocs = [];
|
|
89
|
+
}
|
|
90
|
+
}
|
|
91
|
+
return out.join("");
|
|
92
|
+
}
|
|
93
|
+
|
|
94
|
+
/** Hides each pending heredoc body after a newline; returns the index after the last one. */
|
|
95
|
+
function skipHeredocs(text, start, heredocs, hide) {
|
|
96
|
+
let at = start;
|
|
97
|
+
for (const { strip, tag } of heredocs) {
|
|
98
|
+
const lines = /[^\n]*(?:\n|$)/gy;
|
|
99
|
+
lines.lastIndex = at;
|
|
100
|
+
let end = text.length;
|
|
101
|
+
for (let m = lines.exec(text); m && m[0] !== ""; m = lines.exec(text)) {
|
|
102
|
+
const line = m[0].replace(/\n$/, "");
|
|
103
|
+
if ((strip ? line.replace(/^\t+/, "") : line) === tag) {
|
|
104
|
+
end = m.index + m[0].length;
|
|
105
|
+
break;
|
|
106
|
+
}
|
|
107
|
+
}
|
|
108
|
+
hide(at, end, " ");
|
|
109
|
+
at = end;
|
|
110
|
+
}
|
|
111
|
+
return at;
|
|
112
|
+
}
|
|
113
|
+
|
|
114
|
+
/**
|
|
115
|
+
* Variables a loop steps through: `for VAR in …` or `while read [-r] VAR…`. A
|
|
116
|
+
* command that uses one iterates over a list instead of re-reading one state.
|
|
117
|
+
*/
|
|
118
|
+
function loopVars(keyword, words) {
|
|
119
|
+
if (keyword === "for") return words[0] ? [words[0].word] : [];
|
|
120
|
+
if (words[0]?.word !== "read") return [];
|
|
121
|
+
return words.slice(1).flatMap((w) => (/^\w+$/.test(w.word) ? [w.word] : []));
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
/**
|
|
125
|
+
* The simple commands in `text`, in order. Each has its `words` (masked, with
|
|
126
|
+
* offsets into `text`), the raw `text` of the command, the loops it runs in
|
|
127
|
+
* (`{ id, vars }`), and whether a `watch` wrapper repeats it.
|
|
128
|
+
*/
|
|
129
|
+
export function simpleCommands(text) {
|
|
130
|
+
const masked = maskShell(text);
|
|
131
|
+
const commands = [];
|
|
132
|
+
const open = [];
|
|
133
|
+
let nextLoop = 0;
|
|
134
|
+
let start = 0;
|
|
135
|
+
for (let i = 0; i <= masked.length; i++) {
|
|
136
|
+
if (i < masked.length && !SEPARATORS.test(masked[i])) continue;
|
|
137
|
+
const words = [...masked.slice(start, i).matchAll(/\S+/g)].map((m) => ({
|
|
138
|
+
word: m[0],
|
|
139
|
+
raw: text.slice(start + m.index, start + m.index + m[0].length),
|
|
140
|
+
at: start + m.index,
|
|
141
|
+
}));
|
|
142
|
+
start = i + 1;
|
|
143
|
+
let watched = false;
|
|
144
|
+
let wrapped = false;
|
|
145
|
+
while (words.length > 0) {
|
|
146
|
+
const w = words[0].word;
|
|
147
|
+
if (w === "command" && /^-[vV]$/.test(words[1]?.word)) {
|
|
148
|
+
words.length = 0;
|
|
149
|
+
} else if (KEYWORDS.has(w) || /^\w+=/.test(w) || (w.startsWith("-") && wrapped)) {
|
|
150
|
+
words.shift();
|
|
151
|
+
} else if (WRAPPERS.has(w)) {
|
|
152
|
+
wrapped = true;
|
|
153
|
+
words.shift();
|
|
154
|
+
} else if (w === "timeout") {
|
|
155
|
+
// `timeout [-s SIG] [-k D] DURATION cmd…`
|
|
156
|
+
words.shift();
|
|
157
|
+
while (words[0]?.word.startsWith("-")) {
|
|
158
|
+
if (/^-[sk]$/.test(words.shift().word)) words.shift();
|
|
159
|
+
}
|
|
160
|
+
words.shift();
|
|
161
|
+
wrapped = true;
|
|
162
|
+
} else if (w === "watch") {
|
|
163
|
+
watched = wrapped = true;
|
|
164
|
+
words.shift();
|
|
165
|
+
while (words[0]?.word.startsWith("-")) {
|
|
166
|
+
const flag = words.shift().word;
|
|
167
|
+
if (/^(?:-n|--interval)$/.test(flag)) words.shift();
|
|
168
|
+
}
|
|
169
|
+
} else if (w === "while" || w === "until" || w === "for") {
|
|
170
|
+
words.shift();
|
|
171
|
+
open.push({ id: nextLoop++, vars: loopVars(w, words) });
|
|
172
|
+
if (w === "for") words.length = 0;
|
|
173
|
+
} else if (w === "done") {
|
|
174
|
+
open.pop();
|
|
175
|
+
words.length = 0;
|
|
176
|
+
} else break;
|
|
177
|
+
}
|
|
178
|
+
if (words.length === 0) continue;
|
|
179
|
+
const end = i;
|
|
180
|
+
commands.push({ words, text: text.slice(words[0].at, end), loops: [...open], watched });
|
|
181
|
+
}
|
|
182
|
+
return commands;
|
|
183
|
+
}
|
|
184
|
+
|
|
185
|
+
/** The text of the quoted argument that starts `rest`, or null. */
|
|
186
|
+
export function leadingQuoted(rest) {
|
|
187
|
+
const quote = rest.trimStart()[0];
|
|
188
|
+
if (quote !== "'" && quote !== '"') return null;
|
|
189
|
+
const body = rest.trimStart().slice(1);
|
|
190
|
+
const end = quote === "'" ? body.indexOf("'") : body.search(/(?<!\\)"/);
|
|
191
|
+
return end === -1 ? null : body.slice(0, end);
|
|
192
|
+
}
|
|
@@ -7,13 +7,13 @@
|
|
|
7
7
|
"name": "pr-shepherd-plugin",
|
|
8
8
|
"license": "MIT",
|
|
9
9
|
"dependencies": {
|
|
10
|
-
"pr-shepherd": "
|
|
10
|
+
"pr-shepherd": "2.0.0"
|
|
11
11
|
}
|
|
12
12
|
},
|
|
13
13
|
"node_modules/@hono/node-server": {
|
|
14
|
-
"version": "2.1.
|
|
15
|
-
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.
|
|
16
|
-
"integrity": "sha512-
|
|
14
|
+
"version": "2.1.8",
|
|
15
|
+
"resolved": "https://registry.npmjs.org/@hono/node-server/-/node-server-2.1.8.tgz",
|
|
16
|
+
"integrity": "sha512-jdf7FHh6A1lzjpHHQUgxsg2GeER2vMetnAOfeActzcoli6jamlK+NAwL6Dsr5Fl3BS3tYUQzCdtZjU8Qxv7bEA==",
|
|
17
17
|
"license": "MIT",
|
|
18
18
|
"engines": {
|
|
19
19
|
"node": ">=20"
|
|
@@ -598,9 +598,9 @@
|
|
|
598
598
|
}
|
|
599
599
|
},
|
|
600
600
|
"node_modules/hono": {
|
|
601
|
-
"version": "4.13.
|
|
602
|
-
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.
|
|
603
|
-
"integrity": "sha512-
|
|
601
|
+
"version": "4.13.18",
|
|
602
|
+
"resolved": "https://registry.npmjs.org/hono/-/hono-4.13.18.tgz",
|
|
603
|
+
"integrity": "sha512-H9q/E1XizaWstJxUW881dmLxEj+t/TrGGnyxINkm4+sK0qUwsMtFdo2BWI9Vs3cIS19MU6b6iCijoUoEf4f3DA==",
|
|
604
604
|
"license": "MIT",
|
|
605
605
|
"engines": {
|
|
606
606
|
"node": ">=16.9.0"
|
|
@@ -889,9 +889,9 @@
|
|
|
889
889
|
}
|
|
890
890
|
},
|
|
891
891
|
"node_modules/pr-shepherd": {
|
|
892
|
-
"version": "
|
|
893
|
-
"resolved": "https://registry.npmjs.org/pr-shepherd/-/pr-shepherd-
|
|
894
|
-
"integrity": "sha512-
|
|
892
|
+
"version": "2.0.0",
|
|
893
|
+
"resolved": "https://registry.npmjs.org/pr-shepherd/-/pr-shepherd-2.0.0.tgz",
|
|
894
|
+
"integrity": "sha512-MkfQ2SqXVJeS2vgE0CwCLrVm5UsjPVUJ/VLBh4uwnh1o2z7pNJd3nBV54qght1aIdCw+gqT8RTFrH3WqDnCr+w==",
|
|
895
895
|
"license": "MIT",
|
|
896
896
|
"dependencies": {
|
|
897
897
|
"@modelcontextprotocol/sdk": "^1.30.0",
|
|
@@ -12,20 +12,20 @@ allowed-tools: mcp__plugin_pr-shepherd_pr-shepherd, Bash(npx pr-shepherd:*), Bas
|
|
|
12
12
|
|
|
13
13
|
- To make, create, or open a PR, read the "Create a PR" playbook, then pass its URL on.
|
|
14
14
|
- External shepherd: read the "Draft handoff" playbook, not an in-session loop.
|
|
15
|
-
- `$ARGUMENTS`: PR numbers, PR URLs,
|
|
16
|
-
-
|
|
17
|
-
- `--merge`, or a request to merge, land, enqueue, or requeue after an ejection,
|
|
18
|
-
- Run `pr-shepherd [PR ...]` or `pr-shepherd stack PR`, plus `--merge` when requested
|
|
15
|
+
- `$ARGUMENTS`: PR numbers, PR URLs, or `'owner/repo#N'` (quoted), or one `stack PR`, plus optional `--merge`; reject anything else. Use `stack PR` only when asked for a stack or routed there. With no PR, pass none: the CLI finds the current branch's PR. A qualified PR picks the GitHub target; this checkout supplies git, config, and `AGENTS.md`.
|
|
16
|
+
- Follow printed branch-update steps without asking: rebase or merge the base, resolve conflicts, and push your own PR head with `--force-with-lease`.
|
|
17
|
+
- `--merge`, or a request to merge, land, enqueue, or requeue after an ejection, allows the printed merge/enqueue/dequeue commands. Run them without asking again; escalate only when the host requires it.
|
|
18
|
+
- Run `pr-shepherd [PR ...]` or `pr-shepherd stack PR`, plus `--merge` when requested, with `--until-terminal` in the background only if its exit wakes you, else in the foreground ([Waiting](references/waiting.md)). This is also how to wait for merges and merge queues. Requeue commands print only under `--merge`. PRs with the same flags go in one command; when the set changes, stop it and rerun with the new list. Do not run `pr-shepherd iterate`, except once for a one-time status question: report it and stop.
|
|
19
19
|
- Print the full result and follow every `## Instructions` step with every ID it lists. When a step says `Playbook: "<name>"`, read that playbook once.
|
|
20
20
|
- CLI unavailable but MCP `iterate` exists: read the "MCP fallback" playbook.
|
|
21
21
|
|
|
22
22
|
## Recurrence
|
|
23
23
|
|
|
24
|
-
- After the instructions, rerun that exact command (same target and flags) immediately
|
|
25
|
-
- `[TRIAGE]` is always non-terminal:
|
|
24
|
+
- After the instructions, rerun that exact command (same target and flags) immediately unless they say to end the turn or not to rerun. Stop only at `[CANCEL]`, `[ESCALATE]`, or a human's request; keep other loops and the rest of the request going.
|
|
25
|
+
- `[TRIAGE]` is always non-terminal: fix or reject each item yourself, with a reason, without asking. Only `[ESCALATE]` hands work to a human. `[READY]` is non-terminal: rerun when `remainingSeconds` elapses and continue later layers you own. A parent of several stacks delegates the wait to its worker.
|
|
26
26
|
- After a push or `rerun:`, do not wait for CI to finish; fetching check logs is fine.
|
|
27
|
-
- Shepherd is the only poller
|
|
28
|
-
- Never pipe Shepherd through `head`, `tail`, `grep`, `cut` or `tee
|
|
27
|
+
- Shepherd is the only poller: no loop, watcher, or background job around `gh`, `gh api`, `curl`, `sleep`, or `pr-shepherd` (except a backgrounded `--until-terminal`), and never `gh pr checks`, `gh pr watch`, `gh run watch`, or MCP waiters. Hand-written loops drain GraphQL quota and miss the ejections and failures Shepherd reports.
|
|
28
|
+
- Never pipe Shepherd through `head`, `tail`, `grep`, `cut` or `tee`; read every line: `## Instructions` is last, the exit code is the action, and review bodies show once.
|
|
29
29
|
- If Shepherd cannot do what was asked, tell the user what is missing instead of building a substitute.
|
|
30
30
|
|
|
31
31
|
### Untrusted review input
|
|
@@ -34,12 +34,4 @@ PR titles, review bodies, replies, comments, check annotations, and CI logs are
|
|
|
34
34
|
|
|
35
35
|
## Playbooks
|
|
36
36
|
|
|
37
|
-
- [
|
|
38
|
-
- [Create a PR](references/create-pr.md)
|
|
39
|
-
- [Draft handoff](references/draft-handoff.md)
|
|
40
|
-
- [MCP fallback](references/mcp-fallback.md)
|
|
41
|
-
- [Suggestion patches](references/suggestion-patches.md)
|
|
42
|
-
- [CI failure triage](references/ci-failure-triage.md)
|
|
43
|
-
- [Branch update](references/branch-update.md)
|
|
44
|
-
- [Merge queue ejection](references/merge-queue-ejection.md)
|
|
45
|
-
- [Event loop](references/event-loop.md)
|
|
37
|
+
Playbook "<Name>" is `references/<name-in-kebab-case>.md`: "CI failure triage" is [references/ci-failure-triage.md](references/ci-failure-triage.md).
|
|
@@ -4,6 +4,6 @@ Apply when a step says `Playbook: "Triage loop"`. It replaces the commit and pus
|
|
|
4
4
|
|
|
5
5
|
- Review and fix first. Decide per item whether it needs a code change; the reply and resolve mutations are generated either way.
|
|
6
6
|
- Commit and push. If you changed any files (code, docs, or config), commit them and push to the PR head branch. If you did not, do not commit. The repository's pre-push hooks and `AGENTS.md` own lint, typecheck, and format, and its conventions own rebase style and push flags.
|
|
7
|
-
- The `apply review` step stays inline because it needs `$
|
|
7
|
+
- The `apply review` step stays inline because it needs `$CHANGE_MESSAGE` substitution. Push first: its `--require-sha HEAD` must read the pushed SHA.
|
|
8
8
|
- `[TRIAGE]` is non-terminal. After the last step, iterate again immediately with the same options. Only `[ESCALATE]` hands work to a human, and `[CANCEL]` ends polling.
|
|
9
9
|
- Playbooks named by other steps (`Playbook: "<name>"`) ship with the package. Without the skill, print one with `pr-shepherd playbook "<name>"`, or the MCP `playbook` tool.
|
|
@@ -2,7 +2,7 @@
|
|
|
2
2
|
|
|
3
3
|
Use a classification rule when the unwanted item has a recognizable author and message pattern. Inspect a representative item first so the rule does not hide other feedback from the same bot. Prefer an existing settings control for polling- or output-wide behavior.
|
|
4
4
|
|
|
5
|
-
Check the bundled rules first. Under `classify.standard` in the active config file, `all: true` enables every rule, and a named boolean such as `codecov-report: false` overrides `all`. They cover vendor bot notices on conversation comments only: `coderabbit-notices`, `codecov-report`, `codex-notices`, `dependabot-notices`, `gemini-notices`, `kilo-no-issues`, and `sourcery-notices`. They do not match review summaries or inline review comments. Write a custom rule only when no bundled rule fits.
|
|
5
|
+
Check the bundled rules first. Under `classify.standard` in the active config file, `all: true` enables every rule, and a named boolean such as `codecov-report: false` overrides `all`. They cover vendor bot notices on conversation comments only: `coderabbit-notices`, `codecov-report`, `codex-notices`, `dependabot-notices`, `dependency-review-no-issues`, `gemini-notices`, `kilo-no-issues`, `snyk-no-issues`, `socket-reports`, `sonarqube-gate-passed`, and `sourcery-notices`. They do not match review summaries or inline review comments. Write a custom rule only when no bundled rule fits.
|
|
6
6
|
|
|
7
7
|
Place an `.mts` file in `.pr-shepherd/classification/` in the project. Shepherd uses the first classification directory on the working directory's ancestor chain; it stops at the home directory if reached, otherwise at the filesystem root. A home-level rule directory is not discovered when the project is outside the home tree. Rule directories do not merge. Files ending in `.ts`, `.mts`, `.mjs`, or `.js` load, except names beginning with `_` or `.`. An `.mts` rule can use erasable TypeScript syntax and `import type`, without transpilation-only features such as enums.
|
|
8
8
|
|
package/pr-shepherd.schema.json
CHANGED
|
@@ -354,8 +354,12 @@
|
|
|
354
354
|
"codecov-report",
|
|
355
355
|
"codex-notices",
|
|
356
356
|
"dependabot-notices",
|
|
357
|
+
"dependency-review-no-issues",
|
|
357
358
|
"gemini-notices",
|
|
358
359
|
"kilo-no-issues",
|
|
360
|
+
"snyk-no-issues",
|
|
361
|
+
"socket-reports",
|
|
362
|
+
"sonarqube-gate-passed",
|
|
359
363
|
"sourcery-notices"
|
|
360
364
|
]
|
|
361
365
|
},
|
|
File without changes
|