cloudposse / cloudposse/github-commenter

Feature request: Restrict deletion of previous comments to current user

Open
#10 2 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Go
Stars
112
Forks
17
PR merge metrics
No merged PRs in 30d

Description

`GITHUB_DELETE_COMMENT_REGEX` can be used to delete previous comments before posting the new one. The current implementation will delete matching comments regardless of who they were posted by. This can easily lead to false positives where someone happens to post comment that matches your regex (due to loose regex, or quoting, etc).

I do not see a use case to delete comments by others, and recommend restricting it to the user that the tool is running as.

Contributor guide

Open the contributing guide

Research direction

Locate the implementation of GITHUB_DELETE_COMMENT_REGEX and the path that deletes matching comments. Check how the current user and comment author are represented, then ensure matching comments are deleted only when they were posted by the current user; done means comments by other users remain untouched.

Written by the indexing model from the issue text.

Assessment

Tech stack
github, go
Domain
api, cli
Issue type
Feature
Difficulty
3/5
Estimated time
1-2 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
45/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.