--- name: reviewing-prs description: Reviews GitHub pull requests for the Medusa repository. Checks PR template compliance, contribution guidelines, code conventions, and community contribution limits. Posts a review comment and applies initial-approval or requires-more label. Use when a PR is opened or updated. argument-hint: [title] [author] --- # PR Review Reviews GitHub pull requests for Medusa. Checks template compliance, contribution guidelines, code conventions, and community limits. Posts a concise review comment and applies a label. ## CRITICAL: Load Reference Files When Needed **⚠️ The quick reference in this file is NOT sufficient on its own.** You MUST load the relevant reference files before executing each step. **Load these references based on what you're doing:** - **Checking contribution guidelines?** → MUST load `reference/contribution-types.md` first - **Verifying code conventions?** → MUST load `reference/conventions.md` first - **Writing a review comment?** → MUST load `reference/comment-guidelines.md` first (includes bug, security, and performance reporting formats) **Minimum requirement:** Load at least the relevant reference file(s) before completing the review. ## Arguments | Argument | Required | Description | |----------|----------|-------------| | `pr_number` | Yes | GitHub PR number to review | | `title` | No | PR title (fetched via script if omitted) | | `author` | No | PR author login (fetched via script if omitted) | If title or author are not provided, fetch them with: ```bash bash scripts/get_pr.sh ``` ## Available Scripts ```bash bash scripts/get_pr.sh # Fetch PR details (title, body, author, diff stats) bash scripts/get_pr_files.sh # List files changed in the PR as JSON (metadata only) bash scripts/get_pr_diff.sh # Fetch the full unified diff of the PR (required for code review) bash scripts/get_linked_issues.sh # Fetch issues linked with closing keywords bash scripts/get_comments.sh # Fetch all existing comments on the PR bash scripts/get_labels.sh # Fetch current labels on the PR bash scripts/add_comment.sh # Post a comment on the PR bash scripts/labels.sh