accessibility-alt-text-bot icon indicating copy to clipboard operation
accessibility-alt-text-bot copied to clipboard

Update existing comment

Open mprins opened this issue 2 years ago • 3 comments

When alt-text is added (and the flagged problem is resolved) the comment placed by the workflow should be removed or hidden (and marked as resolved)

mprins avatar Aug 07 '23 14:08 mprins

I am not how easy it would be to track which image the bot comment was referring to 🤔.

We might be able to add a data-attribute inside our comment: <span data-image-name={NAME_OF_IMAGE}></span>. Adding the attribute would allow us to know which comment to remove when the alt text issue is resolved...

Searching through each comment might be costly though.

cc. @khiga8

kendallgassner avatar Aug 21 '23 15:08 kendallgassner

I love this idea!

Each comment should have a unique ID associated with it so we could try including that as a data attribute in the posted comment like @kendallgassner suggests. For example, @kendallgassner comment URL is https://github.com/github/accessibility-alt-text-bot/issues/31#issuecomment-1686597422. I believe 1686597422 is the unique issue comment ID.

Searching through each comment might be costly though.

Could we filter by bot author and comment body content?

khiga8 avatar Aug 21 '23 16:08 khiga8

Could we filter by bot author and comment body content?

O! genius 🧠!!

kendallgassner avatar Aug 21 '23 21:08 kendallgassner