pi-pr-review 1.11.2 → 1.11.3

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/CHANGELOG.md CHANGED
@@ -1,5 +1,12 @@
1
1
  # Changelog
2
2
 
3
+ ## [1.11.3](https://github.com/10ego/pi-pr-review/compare/v1.11.2...v1.11.3) (2026-07-22)
4
+
5
+
6
+ ### Bug Fixes
7
+
8
+ * **publish:** downgrade self-approval to comment ([#44](https://github.com/10ego/pi-pr-review/issues/44)) ([f7c8b71](https://github.com/10ego/pi-pr-review/commit/f7c8b71ca587fb9551bbb24448e70de9733b135b))
9
+
3
10
  ## [1.11.2](https://github.com/10ego/pi-pr-review/compare/v1.11.1...v1.11.2) (2026-07-22)
4
11
 
5
12
 
package/README.md CHANGED
@@ -251,7 +251,7 @@ Each finding includes:
251
251
  | `P3` | Low-priority improvement. |
252
252
  | `nit` | Trivial or optional. |
253
253
 
254
- The verdict is `request_changes` only when a validated P0 or P1 finding exists. Otherwise it is `approve` or `comment`. By default, publication uses the GitHub `COMMENT` event. When `approveMaxPriorityLevel` is set to `P2`, `P3`, or `nit`, a review whose verdict is `approve` and whose findings are all at or below that level is published as a GitHub `APPROVE` event instead. A stale publication additionally requires `allowStaleApprovals: true`; authorized non-open publications do not.
254
+ The verdict is `request_changes` only when a validated P0 or P1 finding exists. Otherwise it is `approve` or `comment`. By default, publication uses the GitHub `COMMENT` event. When `approveMaxPriorityLevel` is set to `P2`, `P3`, or `nit`, a review whose verdict is `approve` and whose findings are all at or below that level is published as a GitHub `APPROVE` event instead. GitHub does not permit authors to approve their own PRs, so a self-authored PR is published as `COMMENT` even when it otherwise qualifies. A stale publication additionally requires `allowStaleApprovals: true`; authorized non-open publications do not.
255
255
 
256
256
  | Setting | Behavior |
257
257
  |---|---|
@@ -1425,6 +1425,7 @@ interface PullState {
1425
1425
  draft?: boolean;
1426
1426
  merged_at?: string | null;
1427
1427
  head?: { sha?: string };
1428
+ user?: { login?: string };
1428
1429
  }
1429
1430
 
1430
1431
  export interface HeadPublicationPlan {
@@ -1626,7 +1627,11 @@ export async function publishPullReview(input: {
1626
1627
  }
1627
1628
  // Stale publication authorization is independent from merge-relevant stale
1628
1629
  // approval. The latter requires its own explicit frozen config opt-in.
1630
+ // GitHub rejects a formal APPROVE from the PR author. Downgrade before the
1631
+ // single write rather than retrying a rejected review as COMMENT.
1632
+ const isSelfAuthored = pull.user?.login?.toLowerCase() === identity.toLowerCase();
1629
1633
  const isApprove =
1634
+ !isSelfAuthored &&
1630
1635
  (!headPlan.stale || allowStaleApprovals) &&
1631
1636
  shouldApproveReview(validatedReview, approveMaxPriorityLevel);
1632
1637
  const built = buildLosslessReviewPayload({
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "pi-pr-review",
3
- "version": "1.11.2",
3
+ "version": "1.11.3",
4
4
  "description": "Parallel AI code review for GitHub pull requests in the Pi coding agent, with model-agnostic tiered subagents, structured findings, optional verification, and safe COMMENT-only publishing.",
5
5
  "keywords": [
6
6
  "pi-package",