Skip to content

chore(shortcuts): self-assign PR in pnpm review fix#2510

Merged
senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel:chore/review-fix-self-assign
May 23, 2026
Merged

chore(shortcuts): self-assign PR in pnpm review fix#2510
senamakel merged 1 commit into
tinyhumansai:mainfrom
senamakel:chore/review-fix-self-assign

Conversation

@senamakel
Copy link
Copy Markdown
Member

@senamakel senamakel commented May 23, 2026

Summary

  • pnpm review fix <pr> now assigns the PR to the current GitHub user after sync_pr, mirroring pnpm work's existing WORK_AUTO_ASSIGN behavior for issues.
  • Gated by REVIEW_AUTO_ASSIGN (default 1); set to 0 to opt out.

Problem

When multiple people pick up open PRs (CodeRabbit follow-ups, conflict resolution, etc.), there's no signal in GitHub for who's actively working a PR. pnpm work already self-assigns issues; pnpm review fix did not do the same for PRs.

Solution

Call the existing gh_assign_self_pr helper from scripts/shortcuts/review/lib.sh right after sync_pr in scripts/shortcuts/review/fix.sh, gated by REVIEW_AUTO_ASSIGN=1. The helper already prints an [INFO] line on success and warns-but-continues on failure, so callers don't need extra error handling.

Submission Checklist

  • N/A: shell-only dev shortcut with no runtime behavior; covered by manual invocation
  • N/A: shell-only dev shortcut, no Vitest/Rust coverage applicable
  • N/A: behaviour-only change to a dev shortcut
  • N/A: no feature surface affected
  • N/A: no new external network dependencies
  • N/A: dev shortcut, not a release-cut surface
  • N/A: no linked issue

Impact

  • Dev-shortcut only. No runtime, app, or release impact. Existing users get auto-assignment by default; opt out with REVIEW_AUTO_ASSIGN=0.

Related

  • Closes:
  • Follow-up PR(s)/TODOs:

AI Authored PR Metadata (required for Codex/Linear PRs)

Linear Issue

  • Key: N/A
  • URL: N/A

Commit & Branch

  • Branch: chore/review-fix-self-assign
  • Commit SHA: c84722d

Validation Run

  • N/A: shell-only change, no app code touched
  • N/A: shell-only change
  • N/A: no tests to run for shell shortcut
  • N/A: no Rust touched
  • N/A: no Tauri touched

Validation Blocked

  • command: N/A
  • error: N/A
  • impact: N/A

Behavior Changes

  • Intended behavior change: pnpm review fix <pr> now self-assigns the PR.
  • User-visible effect: PR shows current gh user in the Assignees field after running the shortcut.

Parity Contract

  • Legacy behavior preserved: REVIEW_AUTO_ASSIGN=0 reverts to the previous no-assign behavior.
  • Guard/fallback/dispatch parity checks: mirrors WORK_AUTO_ASSIGN in scripts/shortcuts/work/start.sh.

Duplicate / Superseded PR Handling

  • Duplicate PR(s): N/A
  • Canonical PR: N/A
  • Resolution: N/A

Mirrors the WORK_AUTO_ASSIGN behavior in `pnpm work` — after sync_pr,
assign the PR to @me via `gh pr edit --add-assignee` so it's clear
who's actively working it. Gated by REVIEW_AUTO_ASSIGN (default on).
@senamakel senamakel requested a review from a team May 23, 2026 00:37
@coderabbitai
Copy link
Copy Markdown
Contributor

coderabbitai Bot commented May 23, 2026

Caution

Review failed

The pull request is closed.

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Organization UI

Review profile: CHILL

Plan: Pro

Run ID: ab30f657-af8b-48d1-ae3b-dbb1eb1b17ed

📥 Commits

Reviewing files that changed from the base of the PR and between d6ee4aa and c84722d.

📒 Files selected for processing (1)
  • scripts/shortcuts/review/fix.sh

📝 Walkthrough

Walkthrough

The PR adds a conditional auto-assignment feature to the review script. When REVIEW_AUTO_ASSIGN is set to "1", the fix.sh script invokes gh_assign_self_pr with the PR number and resolved repository before loading the prompt template and running the selected agent.

Changes

PR Auto-Assignment Feature

Layer / File(s) Summary
Conditional PR auto-assignment
scripts/shortcuts/review/fix.sh
Environment-variable gate checks REVIEW_AUTO_ASSIGN=1 and calls gh_assign_self_pr to auto-assign the PR to the current user before running the review agent.

Estimated code review effort

🎯 1 (Trivial) | ⏱️ ~3 minutes

Possibly related PRs

  • tinyhumansai/openhuman#2271: Introduces the gh_assign_self_pr helper function in scripts/shortcuts/review/lib.sh that this PR calls to implement the auto-assignment mechanism.

Poem

🐰 A hop, a skip, a PR assigned!
No more forgotten tasks left behind.
With one small gate and a helper call,
Auto-assignment handles it all.
Swift like a bunny, to self it goes—
That's how the review workflow flows! 🚀


Comment @coderabbitai help to get the list of available commands and usage tips.

@senamakel senamakel merged commit 9b2eb90 into tinyhumansai:main May 23, 2026
19 of 23 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant