pr-shepherd 2.2.14 → 2.2.15

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.
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
3
  "description": "Autonomous PR CI monitor and review-comment resolver for agentic coding tools",
4
- "version": "2.2.14",
4
+ "version": "2.2.15",
5
5
  "author": {
6
6
  "name": "Jonathan Ong",
7
7
  "email": "jonathanrichardong@gmail.com"
package/README.md CHANGED
@@ -82,11 +82,12 @@ The plugin ships the skills, which drive the CLI, so install both.
82
82
 
83
83
  ```bash
84
84
  # Claude Code
85
- claude /plugin marketplace add jonathanong/pr-shepherd
86
- claude /plugin install pr-shepherd
85
+ claude plugin marketplace add jonathanong/harness-plugins
86
+ claude plugin install pr-shepherd@harness-plugins
87
87
 
88
- # Codex (then enable the pr-shepherd plugin)
89
- codex plugin marketplace add jonathanong/pr-shepherd
88
+ # Codex
89
+ codex plugin marketplace add jonathanong/harness-plugins --ref main
90
+ codex plugin add pr-shepherd@harness-plugins
90
91
 
91
92
  # Grok
92
93
  grok plugin marketplace add jonathanong/pr-shepherd
@@ -10,6 +10,7 @@ import snykNoIssues from "./snyk-no-issues.mjs";
10
10
  import socketReports from "./socket-reports.mjs";
11
11
  import sonarqubeGatePassed from "./sonarqube-gate-passed.mjs";
12
12
  import sourceryNotices from "./sourcery-notices.mjs";
13
+ import sourceryReviewGuide from "./sourcery-review-guide.mjs";
13
14
  /**
14
15
  * Bundled classification rules that `classify.standard` can enable by name.
15
16
  * Each rule matches conversation comments (`pr-comment`) only.
@@ -27,5 +28,6 @@ export const STANDARD_RULES = {
27
28
  "socket-reports": socketReports,
28
29
  "sonarqube-gate-passed": sonarqubeGatePassed,
29
30
  "sourcery-notices": sourceryNotices,
31
+ "sourcery-review-guide": sourceryReviewGuide,
30
32
  };
31
33
  export const STANDARD_RULE_NAMES = Object.keys(STANDARD_RULES);
@@ -1,4 +1,4 @@
1
1
  import type { ClassifyRule } from "../types.mts";
2
- /** Complete Sourcery private-repo upsell and weekly rate-limit notices. */
2
+ /** Complete Sourcery private-repo upsell, weekly rate-limit, and review-budget notices. */
3
3
  declare const rule: ClassifyRule;
4
4
  export default rule;
@@ -1,7 +1,11 @@
1
1
  import { isBotItem } from "./author.mjs";
2
2
  const NO_ACCESS = /^Hi @[A-Za-z0-9-]+! 👋\n\nYour private repo does not have access to Sourcery\.\n\nPlease \[upgrade\]\(https:\/\/app\.sourcery\.ai\/[^\s)]*\) to continue using Sourcery ✨$/;
3
3
  const RATE_LIMIT = /^Sorry @[A-Za-z0-9-]+, you have reached your weekly rate limit for Sourcery\. Please try again later\.$/;
4
- /** Complete Sourcery private-repo upsell and weekly rate-limit notices. */
4
+ const WAIT = String.raw `\d+ (?:days? and \d+ hours?|days?|hours? and \d+ minutes?|hours?|minutes?)`;
5
+ const REVIEW_BUDGET = new RegExp(String.raw `^Sorry @[A-Za-z0-9-]+, you've used your own review budget of \d{1,3}(?:,\d{3})* diff characters for the last \d+ days?\.` +
6
+ String.raw `\n\nYou can request another review in ${WAIT} by commenting \`@sourcery-ai review\`\. ` +
7
+ String.raw `\[Upgrade\]\(https:\/\/app\.sourcery\.ai\/[^\s)]*\) to get a review now\.$`);
8
+ /** Complete Sourcery private-repo upsell, weekly rate-limit, and review-budget notices. */
5
9
  const rule = (item) => {
6
10
  if (!isBotItem(item, ["sourcery-ai"], ["pr-comment"]))
7
11
  return null;
@@ -9,7 +13,7 @@ const rule = (item) => {
9
13
  if (NO_ACCESS.test(body)) {
10
14
  return { autoResolve: true, suppress: true, reason: "Sourcery no-access upsell" };
11
15
  }
12
- if (RATE_LIMIT.test(body)) {
16
+ if (RATE_LIMIT.test(body) || REVIEW_BUDGET.test(body)) {
13
17
  return { autoResolve: true, suppress: true, reason: "Sourcery rate-limit notice" };
14
18
  }
15
19
  return null;
@@ -0,0 +1,9 @@
1
+ import type { ClassifyRule } from "../types.mts";
2
+ /**
3
+ * Sourcery's "Reviewer's Guide" conversation comment: a summary of the PR's own diff with a tips
4
+ * section, edited in place on each push. The whole body must be one guide, framed by its start and
5
+ * end markers. Any content outside them, a second guide, or a marker of another kind (such as the
6
+ * linked-issues report, which can list unmet requirements) keeps it visible.
7
+ */
8
+ declare const rule: ClassifyRule;
9
+ export default rule;
@@ -0,0 +1,21 @@
1
+ import { isBotItem } from "./author.mjs";
2
+ const START = "<!-- Generated by sourcery-ai[bot]: start review_guide -->";
3
+ const END = "<!-- Generated by sourcery-ai[bot]: end review_guide -->";
4
+ const ANY_MARKER = /<!-- Generated by sourcery-ai\[bot\]: [^>]*-->/g;
5
+ /**
6
+ * Sourcery's "Reviewer's Guide" conversation comment: a summary of the PR's own diff with a tips
7
+ * section, edited in place on each push. The whole body must be one guide, framed by its start and
8
+ * end markers. Any content outside them, a second guide, or a marker of another kind (such as the
9
+ * linked-issues report, which can list unmet requirements) keeps it visible.
10
+ */
11
+ const rule = (item) => {
12
+ if (!isBotItem(item, ["sourcery-ai"], ["pr-comment"]))
13
+ return null;
14
+ const body = item.body.trim();
15
+ if (!body.startsWith(START) || !body.endsWith(END))
16
+ return null;
17
+ if ([...body.matchAll(ANY_MARKER)].length !== 2)
18
+ return null;
19
+ return { autoResolve: true, suppress: true, reason: "Sourcery Reviewer's Guide" };
20
+ };
21
+ export default rule;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
- "version": "2.2.14",
3
+ "version": "2.2.15",
4
4
  "description": "Autonomous PR CI monitor and review-comment resolver for agentic coding tools",
5
5
  "keywords": [
6
6
  "automation",
@@ -33,7 +33,6 @@
33
33
  "plugins/**/.codex-plugin/**",
34
34
  ".claude-plugin/**",
35
35
  ".grok-plugin/**",
36
- ".agents/plugins/marketplace.json",
37
36
  "marketplace.json",
38
37
  "pr-shepherd.schema.json",
39
38
  "README.md",
@@ -66,9 +65,9 @@
66
65
  "knip": "knip",
67
66
  "knip:production": "knip --production",
68
67
  "lint:dead-code": "npm run --silent knip && npm run --silent knip:production",
69
- "lint": "oxlint src/ test-helpers/ fixtures/*.mts test-cases/ plugins/ .agents/plugins/ site/build.mjs site/serve.mjs site/lib/ && npm run --silent lint:dead-code",
70
- "format": "oxfmt src/ test-helpers/ fixtures/*.mts test-cases/*.mts plugins/ .agents/plugins/ docs/ README.md site/build.mjs site/serve.mjs site/lib/",
71
- "format:check": "oxfmt --check src/ test-helpers/ fixtures/*.mts test-cases/*.mts plugins/ .agents/plugins/ docs/ README.md site/build.mjs site/serve.mjs site/lib/",
68
+ "lint": "oxlint src/ test-helpers/ fixtures/*.mts test-cases/ plugins/ site/build.mjs site/serve.mjs site/lib/ && npm run --silent lint:dead-code",
69
+ "format": "oxfmt src/ test-helpers/ fixtures/*.mts test-cases/*.mts plugins/ docs/ README.md site/build.mjs site/serve.mjs site/lib/",
70
+ "format:check": "oxfmt --check src/ test-helpers/ fixtures/*.mts test-cases/*.mts plugins/ docs/ README.md site/build.mjs site/serve.mjs site/lib/",
72
71
  "test": "vitest run",
73
72
  "test:coverage": "vitest run --coverage && node scripts/strip-lcov-branches.mjs",
74
73
  "test:watch": "vitest",
@@ -89,7 +88,7 @@
89
88
  "husky": "^9.1.7",
90
89
  "knip": "^6.14.1",
91
90
  "marked": "^18.0.11",
92
- "oxfmt": "^0.77.0",
91
+ "oxfmt": "^0.78.0",
93
92
  "oxlint": "^1.60.0",
94
93
  "typescript": "^7.0.2",
95
94
  "vitest": "^5.0.0"
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
3
  "description": "Autonomous PR CI monitor and review-comment resolver for agentic coding tools",
4
- "version": "2.2.14",
4
+ "version": "2.2.15",
5
5
  "author": {
6
6
  "name": "Jonathan Ong",
7
7
  "email": "jonathanrichardong@gmail.com"
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pr-shepherd",
3
- "version": "2.2.14",
3
+ "version": "2.2.15",
4
4
  "description": "Autonomous PR CI monitor and review-comment resolver for Codex.",
5
5
  "author": {
6
6
  "name": "Jonathan Ong",
@@ -1,6 +1,6 @@
1
1
  ---
2
2
  name: pr-shepherd
3
- description: 'Create, iterate, watch, or merge a GitHub pull request with pr-shepherd. Use for "make a PR and use pr-shepherd", "iterate PR #123", "tell me when #123 merges", and any PR status, CI, merge queue, or ejection question, instead of gh or custom polling scripts.'
3
+ description: 'Create, iterate, watch, or merge a GitHub pull request with pr-shepherd. Use for "make a PR and use pr-shepherd", "iterate PR #123", "tell me when #123 merges", and any PR status, CI, merge queue, or ejection question, instead of gh or custom polling scripts. Also use as soon as a merge or enqueue is refused or blocked (HTTP 405, a failing required check, "merge queue required"), or a PR turns out to have been removed or ejected from the merge queue.'
4
4
  user-invocable: true
5
5
  argument-hint: "[PR | stack PR...] [--merge|--merge-ready|--merge-through PR]"
6
6
  allowed-tools: Bash(npx pr-shepherd:*), Bash(pnpm exec pr-shepherd:*), Bash(pnpm dlx pr-shepherd:*), Bash(bunx pr-shepherd:*), Bash(pr-shepherd:*)
@@ -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: `claude-notices`, `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. If a name here is rejected as unknown, this list is stale for the installed version; trust the error.
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: `claude-notices`, `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`, `sourcery-notices`, and `sourcery-review-guide`. They do not match review summaries or inline review comments. Write a custom rule only when no bundled rule fits. If a name here is rejected as unknown, this list is stale for the installed version; trust the error.
6
6
 
7
7
  Place an `.mjs` 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 `.`. Prefer `.mjs`; an `.mts` rule also works if it uses only erasable TypeScript syntax.
8
8
 
@@ -372,7 +372,8 @@
372
372
  "snyk-no-issues",
373
373
  "socket-reports",
374
374
  "sonarqube-gate-passed",
375
- "sourcery-notices"
375
+ "sourcery-notices",
376
+ "sourcery-review-guide"
376
377
  ]
377
378
  },
378
379
  "additionalProperties": {
@@ -1,20 +0,0 @@
1
- {
2
- "name": "pr-shepherd",
3
- "interface": {
4
- "displayName": "pr-shepherd"
5
- },
6
- "plugins": [
7
- {
8
- "name": "pr-shepherd",
9
- "source": {
10
- "source": "local",
11
- "path": "./plugins/pr-shepherd"
12
- },
13
- "policy": {
14
- "installation": "AVAILABLE",
15
- "authentication": "ON_INSTALL"
16
- },
17
- "category": "Coding"
18
- }
19
- ]
20
- }
@@ -1,18 +0,0 @@
1
- {
2
- "$schema": "https://anthropic.com/claude-code/marketplace.schema.json",
3
- "name": "pr-shepherd",
4
- "description": "Autonomous PR CI monitor and review-comment resolver",
5
- "owner": {
6
- "name": "Jonathan Ong",
7
- "email": "jonathanrichardong@gmail.com"
8
- },
9
- "plugins": [
10
- {
11
- "name": "pr-shepherd",
12
- "description": "Autonomous PR CI monitor and review-comment resolver",
13
- "source": "./plugins/pr-shepherd",
14
- "category": "productivity",
15
- "homepage": "https://github.com/jonathanong/pr-shepherd"
16
- }
17
- ]
18
- }