kuldeepkeshwar / size-plugin-bot

A Github bot for size-plugin
https://github.com/apps/size-plugin
MIT License
84 stars 9 forks source link

Reuse comments instead of posting new ones #36

Closed marvinhagemeister closed 5 years ago

marvinhagemeister commented 5 years ago

On some PRs with many pushes and commits there is a bit of comment noise caused by size-plugin-bot. See https://github.com/preactjs/preact-www/pull/415 for an example of that. I wonder if there is a way to edit an existing comment if there is any instead of always making a new one. That would clean up the thread considerably.

issue-label-bot[bot] commented 5 years ago

Issue-Label Bot is automatically applying the label feature_request to this issue, with a confidence of 0.82. Please mark this comment with :thumbsup: or :thumbsdown: to give our bot feedback!

Links: app homepage, dashboard and code for this bot.

kuldeepkeshwar commented 5 years ago

@marvinhagemeister updating the existing comment can have side effects too, imagine someone refers that comment (by bot) in another pr/issue and now bot comes and update the comment as there is a new commit pushed. here context for the previous commit will be lost(although GitHub has comment history feature, this can be very tricky).

Also, if bot keeps on updating the existing comment, I am not sure whether the user will even scroll up to notice what changes bot made in the comment. A new comment always comes at the bottom is more noticeable by the user.

PS Github also understands the fact that too many comments in a pr are not good for UX so they collapse them after a threshold.

Although I also not a fan of a bot which keeps on bombarding comments in the PR. I need to see how to make it better without introducing any side effect. I am just wondering how other bots do it.

developit commented 5 years ago

Personally I'd much rather have size-plugin-bot update a single comment. It'll generally be the first comment on a given PR, which gives it high visibility. Comment references can still be understood via history, or simply by quoting the text.

Currently on a longstanding PR I find it difficult to pick out the actual comments from within all the size-plugin bot comments.

One option if we're concerned about size history would be to use <details><summary>{previous-commit-hash}</summary>{previous-sizes}</details>.

kuldeepkeshwar commented 5 years ago

@marvinhagemeister @developit sorry for the delay, I will update it before the weekend.