Skip to content

Commit 78edfa6

Browse files
authored
feat: PR Management Tool (manage_prs) (#27)
* feat: add manage_prs tool for PR lifecycle management - Add 12 new methods to github_client.py for PR operations - Create unified manage_prs tool with 16 actions: list, view, create, update, merge, close, reopen, comment, request_reviewers, review, to_draft, ready_for_review, add_labels, remove_labels, add_assignees, remove_assignees - Auto-assign to self when creating PRs (default behavior) - Add integration tests for PR management Closes #16 * chore: add pr-summary command, update docs, bump versions - Add /quickcall:pr-summary command for listing open PRs - Update README with PR Management section and examples - Add manage_prs and manage_projects to tools list - Bump plugin version to 0.8.0 - Bump package version to 0.5.0 Closes #17
1 parent edcdf05 commit 78edfa6

8 files changed

Lines changed: 1394 additions & 4 deletions

File tree

README.md

Lines changed: 45 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ Add to MCP config (`~/.cursor/mcp.json` or `.cursor/mcp.json`):
7777
| **Slack** | Read/send messages, threads, channels | Yes |
7878

7979
<details>
80-
<summary><strong>Available Tools (24)</strong></summary>
80+
<summary><strong>Available Tools (26)</strong></summary>
8181

8282
### Git
8383
| Tool | Description |
@@ -94,6 +94,8 @@ Add to MCP config (`~/.cursor/mcp.json` or `.cursor/mcp.json`):
9494
| `get_commit` | Get commit details (message, stats, files) |
9595
| `list_branches` | List repository branches |
9696
| `manage_issues` | List, view, create, update, close, reopen, comment on issues + sub-issues |
97+
| `manage_prs` | Full PR lifecycle: create, update, merge, close, review, comment, labels, assignees |
98+
| `manage_projects` | GitHub Projects V2: add issues, update fields (Status, Priority, etc.) |
9799
| `check_github_connection` | Verify GitHub connection |
98100

99101
### Slack
@@ -180,6 +182,8 @@ GITHUB_USERNAME=your-username # Optional: for better UX
180182
| `/quickcall:status` | Show connection status |
181183
| `/quickcall:updates` | Get git updates (default: 1 day) |
182184
| `/quickcall:updates 7d` | Get updates for last 7 days |
185+
| `/quickcall:pr-summary` | List open PRs for a repo |
186+
| `/quickcall:pr-summary owner/repo` | List PRs for specific repo |
183187
| `/quickcall:slack-summary` | Summarize Slack messages (default: 1 day) |
184188
| `/quickcall:slack-summary 7d` | Summarize last 7 days |
185189

@@ -314,6 +318,46 @@ Create a bug report issue titled "Login fails on Safari"
314318
Create issue with feature_request template
315319
```
316320
321+
## PR Management
322+
323+
The `manage_prs` tool provides full pull request lifecycle management:
324+
325+
### Actions
326+
327+
| Action | Description |
328+
|--------|-------------|
329+
| `list` | List PRs with state filter |
330+
| `view` | View PR details |
331+
| `create` | Create PR (auto-assigns to self) |
332+
| `update` | Update title, body, base branch |
333+
| `merge` | Merge PR (merge/squash/rebase) |
334+
| `close` | Close PR without merging |
335+
| `reopen` | Reopen closed PR |
336+
| `comment` | Add comment to PR |
337+
| `request_reviewers` | Request user/team reviewers |
338+
| `review` | Submit review (APPROVE, REQUEST_CHANGES, COMMENT) |
339+
| `to_draft` | Convert PR to draft |
340+
| `ready_for_review` | Mark draft as ready |
341+
| `add_labels` | Add labels to PR |
342+
| `remove_labels` | Remove labels from PR |
343+
| `add_assignees` | Add assignees |
344+
| `remove_assignees` | Remove assignees |
345+
346+
### Examples
347+
348+
```
349+
List open PRs on my-repo
350+
Create a PR from feature-branch to main titled "Add new feature"
351+
Merge PR #42 with squash
352+
Request review from @alice on PR #42
353+
Approve PR #42 with comment "LGTM!"
354+
Add labels bug and urgent to PR #42
355+
```
356+
357+
### Auto-assign
358+
359+
When creating a PR, it automatically assigns to the current user unless `assignees` is explicitly provided.
360+
317361
## Troubleshooting
318362
319363
### Clean Reinstall

0 commit comments

Comments
 (0)