Skip to content

Conversation

@konard
Copy link
Member

@konard konard commented Sep 14, 2025

Summary

  • Fixed the issue where the bot does not delete messages with + as replies to other messages after 6 hours have passed since the last + message
  • Added missing comment management functionality to GitHubStorage
  • Implemented time-based deletion logic for + comments

Changes Made

GitHubStorage.cs

  • Added GetIssueComments(long repositoryId, int issueNumber) method to retrieve issue comments
  • Added DeleteIssueComment(long repositoryId, long commentId) method to delete specific comments

DeletePlusMessagesTrigger.cs (New)

  • Created new trigger that automatically processes issues with + comments
  • Checks if 6 hours have passed since the last + comment was posted
  • Deletes all + comments from the issue when the time threshold is met
  • Includes comprehensive error handling and logging

Program.cs

  • Integrated the new DeletePlusMessagesTrigger into the issue tracker pipeline

Test Plan

The bot will now:

  1. Scan all open issues for comments containing only + (plus followed by space)
  2. Check if 6 hours have passed since the last such comment was posted
  3. Delete all + comments from the issue if the time threshold is met
  4. Log successful deletions for monitoring

See examples/test_plus_message_deletion.md for detailed testing instructions.

Behavior

  • Only comments containing exactly + are deleted
  • All + comments in an issue are deleted together once 6 hours pass since the last one
  • Regular comments remain untouched
  • Robust error handling prevents bot crashes

Fixes #44

🤖 Generated with Claude Code

Adding CLAUDE.md with task information for AI processing.
This file will be removed when the task is complete.

Issue: #44
@konard konard self-assigned this Sep 14, 2025
- Added GetIssueComments and DeleteIssueComment methods to GitHubStorage
- Created DeletePlusMessagesTrigger to handle '+ ' comment deletion logic
- Integrated new trigger into Program.cs issue tracker
- Comments containing only '+ ' are deleted after 6 hours since last such comment
- Added test documentation for the new feature

Fixes #44

🤖 Generated with [Claude Code](https://claude.ai/code)

Co-Authored-By: Claude <[email protected]>
@konard konard changed the title [WIP] the bot does not delete messages Fix bot not deleting '+ ' messages after 6 hours Sep 14, 2025
@konard konard marked this pull request as ready for review September 14, 2025 00:51
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.

the bot does not delete messages

1 participant