You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
feat: add issue and PR comment delete actions - #116
Both DELETE repos/{owner}/{repo}/issues/comments/{commentId} through the catalog's fixed gh api path. A PR conversation comment is an issue comment in GitHub's API; each alias declares only its domain's write permission, mirroring the edit actions and pr:comment / issue:comment.
The catalog labels are issue comment-delete / pr comment-delete, so help and the generated README table are usable. Tests cover permissions, argv, and the README table. Full suite: 598 pass.
Summary by CodeRabbit
New Features
Added actions to delete comments on issues and pull requests.
The new actions require write permissions for the relevant issues or pull requests.
No actionable comments were generated in the recent review.
Walkthrough
The action catalog adds issue:comment-delete and pr:comment-delete. Both send DELETE requests to the issue-comment endpoint. The README and tests cover permissions and request arguments.
Changes: Comment deletion
Layer / File(s)
Summary
Define and expose comment deletion actions packages/core/src/actions.ts, test/unit/actions.test.ts, README.md, .changeset/comment-delete.md
ApiSpec.method now accepts DELETE. The action catalog registers issue and pull request comment deletion actions with their respective write permissions. Tests cover the action names, permissions, app user, and issue-comment request arguments. The README lists the required permissions, and the changeset records a minor release.
This adds issue and PR comment delete actions with the expected write permissions and request arguments. No actionable merge-blocking risk was found.
Security architecture risk: Moderate · up to d9ff9
The new actions permit permanent comment deletion without checking whether the comment belongs to the issue or pull-request domain named by the action. Existing repository restrictions, narrowly scoped App tokens, and GitHub authorization limit the exposure; this is not an unrestricted deletion capability.
Retained concerns
Medium · security · observed: The new issue and PR deletion aliases use the same comment-ID endpoint without validating the comment's parent domain. The supplied verification establishes that either domain's write grant can authorize the endpoint, so the alias-specific permission declarations do not isolate destructive operations to the named domain. This extends an existing editing limitation to deletion, within repository and credential authorization limits.
Security review details
Security Blast Radius
inferred — A caller able to submit actions can select individual conversation-comment IDs for deletion within allowed repositories and the execution identity's GitHub authority. Repetition can affect multiple authorized comments across those repositories. The inspected path does not provide arbitrary endpoints, cross-repository path injection, or additional App permissions.
Security Findings and Attack Paths
observed — The retained authorization finding concerns caller-selected comment identity crossing the issue/PR naming boundary: both aliases dispatch the same DELETE endpoint without checking the comment's parent type. The supplied verification reports that either write permission is accepted. The new destructive operation is PR-introduced; the shared endpoint and missing parent check already existed for editing.
Trust Boundaries and Controls
observed — Repository allowlisting, catalog validation, and identity eligibility remain enforced before provider execution. The App path checks grants and mints repository- and permission-restricted tokens. The user path uses a configured personal token instead, leaving final object authorization to that identity and GitHub rather than narrowing it to the action's App-permission declaration.
Resilience and Maintainability Implications
observed — The runner reports process failure and timeout, terminates timed-out process groups, and removes its temporary home in a finally block. The provider attempts to revoke minted action tokens after execution and returns a warning if revocation fails. These cleanup controls do not establish whether an interrupted remote deletion completed.
Hardening Proposals
proposed — If issue/PR domain isolation is intended, resolve the selected comment's parent and enforce the named domain consistently in both execution paths before deletion. Validate this contract with cross-domain comment IDs and restricted installation grants.
Pre-merge checks: 5
Check name
Status
Explanation
Description Check
Check skipped - CodeRabbit’s high-level summary is enabled.
Title check
The title "feat: add issue and PR comment delete actions" states the main change. The changeset adds issue:comment-delete and pr:comment-delete actions to the action catalog, with their permissions, R…
Docstring Coverage
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentat…
Linked Issues check
Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check
Check skipped because no linked issues were found for this pull request.
Full details: Title check
Explanation
The title "feat: add issue and PR comment delete actions" states the main change. The changeset adds issue:comment-delete and pr:comment-delete actions to the action catalog, with their permissions, README entries, and tests. The title is concise, specific, and follows conventional commit style. It does not describe anything absent from the changeset.
Full details: Docstring Coverage
Explanation
No eligible functions found in the changed files. Skipping docstring coverage check. Docstring coverage is scoped to functions touched by this diff with cyclomatic complexity of at least 2. Documentation-only edits and deletions within surviving functions are included; unchanged diff context and fully deleted functions are excluded. Analyzed 0 functions across 2 files. (2 skipped: 2 unsupported.)
Finishing Touches
Generate docstrings
Commit to this branch
Create a new PR
Autofix · Keep fixing CodeRabbit findings and required CI, and resolving merge conflicts
Recent review info
Run configuration
Source mode: Auto
Repository: Unavailable
Branch: Unavailable
File: No configuration file from this repository applied
Commit: Unavailable
Layers: Organization UI
Review profile: CHILL
Plan: Advanced
Run ID: df08a005-2937-4c8e-95cb-e1a27e027c75
Commits
Reviewing files that changed from the base of the PR and between eee2074 and d9ff970.
Files selected for processing: 4
.changeset/comment-delete.md
README.md
packages/core/src/actions.ts
test/unit/actions.test.ts
Included review availability: This review used your included allowance. Your plan provides up to 10 included reviews per hour; 8 remain after this review.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Complete the comment lifecycle with typed delete actions:
issue:comment-delete <commentId>—issues: writepr:comment-delete <commentId>—pull_requests: writeBoth DELETE
repos/{owner}/{repo}/issues/comments/{commentId}through the catalog's fixed gh api path. A PR conversation comment is an issue comment in GitHub's API; each alias declares only its domain's write permission, mirroring the edit actions andpr:comment/issue:comment.The catalog labels are
issue comment-delete/pr comment-delete, so help and the generated README table are usable. Tests cover permissions, argv, and the README table. Full suite: 598 pass.Summary by CodeRabbit