Skip to content

Conversation

sushitommy
Copy link

@sushitommy sushitommy commented Sep 13, 2025

This PR adds a new tool to permanently delete issues.

Changes

  • Added delete_issue tool in src/tools/issues.ts
  • The tool accepts project_id and issue_id parameters
  • Includes warning about permanent deletion

Usage

The tool can be used to permanently delete issues. Use with caution as this action cannot be undone.

Testing

  • Tool has been tested with valid issue IDs
  • Error handling works correctly for invalid IDs
  • Confirmation message displays correctly

Summary by CodeRabbit

  • New Features
    • Added the ability to permanently delete an issue. Provide the project ID and issue ID to perform the deletion, and receive a confirmation message on success.

Copy link

coderabbitai bot commented Sep 13, 2025

Walkthrough

Adds a new delete_issue tool to issue tools and annotates registerIssueTools to return void. The delete_issue tool performs a DELETE request to the Plane API using workspace slug, project_id, and issue_id, then returns a confirmation string.

Changes

Cohort / File(s) Summary of changes
Issue tools
src/tools/issues.ts
- Add delete_issue tool registration performing DELETE to Plane API with inputs: project_id, issue_id (z.string()).
- Return success message after awaiting request; errors bubble from makePlaneRequest.
- Update registerIssueTools signature to explicitly return void.

Sequence Diagram(s)

sequenceDiagram
    autonumber
    participant C as Client
    participant S as McpServer
    participant T as delete_issue Tool
    participant P as Plane API

    C->>S: Invoke delete_issue(project_id, issue_id)
    S->>T: Execute tool with inputs
    T->>P: DELETE /workspaces/:slug/projects/:project_id/issues/:issue_id
    alt Success
        P-->>T: 2xx
        T-->>S: "Issue <id> deleted" (text)
        S-->>C: Success response
    else Error
        P-->>T: 4xx/5xx
        T-->>S: Propagated error
        S-->>C: Error response
    end
Loading

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

I nibble on tickets, ears held high,
A swift DELETE—goodbye, goodbye!
Two IDs hop along the trail,
The Plane replies: success, no fail.
With typed returns and tidy might,
I bounce to merge—ears in flight. 🐇✨

Pre-merge checks and finishing touches

✅ Passed checks (3 passed)
Check name Status Explanation
Description Check ✅ Passed Check skipped - CodeRabbit’s high-level summary is enabled.
Title Check ✅ Passed The title "feat: add delete issue tool" is concise and directly describes the primary change—adding a tool to delete issues—using a conventional "feat:" prefix; it clearly signals the intent and is easy for reviewers to scan.
Docstring Coverage ✅ Passed No functions found in the changes. Docstring coverage check skipped.
✨ Finishing touches
  • 📝 Generate Docstrings
🧪 Generate unit tests
  • Create PR with unit tests
  • Post copyable unit tests in a comment

📜 Recent review details

Configuration used: CodeRabbit UI

Review profile: CHILL

Plan: Pro

📥 Commits

Reviewing files that changed from the base of the PR and between 1a199cd and cf49226.

📒 Files selected for processing (1)
  • src/tools/issues.ts (2 hunks)
🧰 Additional context used
🧬 Code graph analysis (1)
src/tools/issues.ts (1)
src/common/request-helper.ts (1)
  • makePlaneRequest (3-36)
🔇 Additional comments (2)
src/tools/issues.ts (2)

7-7: Explicit return type on registerIssueTools is good

Calling out the return type clarifies intent and prevents accidental return-type drift.


133-154: Harden delete_issue: validate UUIDs & return JSON; don’t add confirm without repo-wide alignment

  • Validate project_id and issue_id with z.string().uuid() (repository already uses z.string().uuid() in schemas).
  • Return a JSON-shaped result (e.g. content: [{ type: "text", text: JSON.stringify({ status: "deleted", project_id, issue_id }, null, 2) }]).
  • Type the DELETE call as makePlaneRequest(...).
  • Do NOT add a standalone confirm flag here — many other delete_* tools in src/tools/* do not use confirm; either apply a confirm param consistently across all delete tools or omit it to avoid breaking callers.

Location: src/tools/issues.ts (around lines 133–154)

Tip

👮 Agentic pre-merge checks are now available in preview!

Pro plan users can now enable pre-merge checks in their settings to enforce checklists before merging PRs.

  • Built-in checks – Quickly apply ready-made checks to enforce title conventions, require pull request descriptions that follow templates, validate linked issues for compliance, and more.
  • Custom agentic checks – Define your own rules using CodeRabbit’s advanced agentic capabilities to enforce organization-specific policies and workflows. For example, you can instruct CodeRabbit’s agent to verify that API documentation is updated whenever API schema files are modified in a PR. Note: Upto 5 custom checks are currently allowed during the preview period. Pricing for this feature will be announced in a few weeks.

Please see the documentation for more information.

Example:

reviews:
  pre_merge_checks:
    custom_checks:
      - name: "Undocumented Breaking Changes"
        mode: "warning"
        instructions: |
          Pass/fail criteria: All breaking changes to public APIs, CLI flags, environment variables, configuration keys, database schemas, or HTTP/GraphQL endpoints must be documented in the "Breaking Change" section of the PR description and in CHANGELOG.md. Exclude purely internal or private changes (e.g., code not exported from package entry points or explicitly marked as internal).

Please share your feedback with us on this Discord post.


Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

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

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