Skip to content

Conversation

JoshuaKGoldberg
Copy link
Owner

@JoshuaKGoldberg JoshuaKGoldberg commented Apr 28, 2025

PR Checklist

Overview

Adds a runCommentCleanup function that's called in runOctoGuideAction if the payload type is deleted. If the payload has a comment, then the corresponding existing comment is retrieved and deleted.

Bot comment deletion notably does not go through the EntityActor interface added in #43. Because the "entity" is deleted and not available anymore, many of the methods there don't make sense.

Switches a few ancillary functions to take url strings instead of entities, since runCommentCleanup doesn't run with a full entity.

Also renames the octoguide function to runOctoGuideRules. That's more precisely what it does, and this disambiguates it from runCommentCleanup.

🗺️

Copy link

codecov bot commented Apr 28, 2025

Codecov Report

Attention: Patch coverage is 51.70068% with 71 lines in your changes missing coverage. Please review.

Project coverage is 62.91%. Comparing base (d9e5206) to head (20e0262).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/runOctoGuideRules.ts 0.00% 36 Missing ⚠️
src/action/runOctoGuideAction.ts 0.00% 20 Missing ⚠️
src/action/comments/setCommentForReports.ts 0.00% 7 Missing ⚠️
src/action/comments/createCommentIdentifier.ts 0.00% 2 Missing ⚠️
src/action/comments/getExistingComment.ts 0.00% 2 Missing ⚠️
src/cli.ts 0.00% 2 Missing ⚠️
src/action/comments/createCommentBody.ts 0.00% 1 Missing ⚠️
src/index.ts 0.00% 1 Missing ⚠️
Additional details and impacted files
@@             Coverage Diff             @@
##             main      #55       +/-   ##
===========================================
+ Coverage   45.94%   62.91%   +16.96%     
===========================================
  Files          39       39               
  Lines         975     1022       +47     
  Branches       54       77       +23     
===========================================
+ Hits          448      643      +195     
+ Misses        527      379      -148     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@JoshuaKGoldberg JoshuaKGoldberg merged commit 3f469c6 into main Apr 28, 2025
13 checks passed
@JoshuaKGoldberg JoshuaKGoldberg deleted the comment-cleanup branch April 28, 2025 12:41
Copy link

🎉 This is included in version v0.6.0 🎉

The release is available on:

Cheers! 📦🚀

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.

🚀 Feature: Delete bot comment if its target comment is deleted
1 participant