w3c/prbuildbot

Post a single comment per browser and edit it

Closed this issue · 1 comments

Currently, we post one comment for each CI job: for PRs that touch large numbers of files this ends up with a huge amount of vertical space being taken up by the stability checker output which makes it hard to look through comments on the PR.

Ideally, the bot should just update the existing comment for that browser, as some other CI tools do (codecov for example).

@gsnedders: That is already built in courtesy of copying @jgraham's GitHub class from check_stability. If it sees a comment in the PR issue that leads with the PRODUCT under test, it will find and replace it via HTTP PATCH. See https://github.com/bobholt/prbuildbot/blob/master/github.py#L111-L118 [comment edited to correctly say PATCH, not POST]

If you're testing this locally, you have to push a change to web-platform-tests that removes the existing GitHub commenting, otherwise the comment will lead with "Can't log to GitHub" and the find won't work. It took a while until I realized that was the issue in my testing, because I was getting multiple comments.

You can see in my test issue in my fork that the comments have been edited - that's from re-running the build several times and the above logic working: bobholt/web-platform-tests#4 (comment)