lighthousebot icon indicating copy to clipboard operation
lighthousebot copied to clipboard

Proposal: Add link to the report in the bot comment

Open abdonrd opened this issue 8 years ago • 7 comments

It would be great if the bot comment had a link to the report.

From:

Updated Lighthouse report for the changes in this PR:

Category Score
Progressive Web App 91
Performance 93
Accessibility 100
Best Practices 92

Tested with Lighthouse version: 2.3.0

To:

Updated Lighthouse report for the changes in this PR:

Category Score
Progressive Web App 91
Performance 93
Accessibility 100
Best Practices 92

Tested with Lighthouse version: 2.3.0

abdonrd avatar Oct 27 '17 18:10 abdonrd

Good call. Want to send a PR?

ebidel avatar Oct 27 '17 20:10 ebidel

@ebidel btw, what's the retention policy for these reports ? how long are they going to be available ?

mderazon avatar Dec 12 '17 11:12 mderazon

There's no guarantees on uptime, retention, or reports being available, long-term. I suggest running your own setup if that's something important to you :)

ebidel avatar Dec 12 '17 18:12 ebidel

Is there any progress on this?

balazsorban44 avatar Jan 24 '19 10:01 balazsorban44

@ebidel I'm interested in making a PR for this, but I'd love some insights :slightly_smiling_face:

So we can generate the html file by passing output: html:

curl -X POST \
  -H "Content-Type: application/json" \
  -H "X-API-KEY: [secret]" \
  --data '{"output": "html", "url": "https://developers.google.com/web/tools/lighthouse/"}' \
  https://builder-dot-lighthouse-ci.appspot.com/ci

One thing we could do is add a flag in the request to /ci that would only send back the generated fileName (timestamp-based) so we can add the URL to the comment.

This can be done in runLH: https://github.com/GoogleChromeLabs/lighthousebot/blob/7f87bcaeb221009354d90ab706379ed21eed0d39/builder/server.js#L41

robinmetral avatar Aug 23 '19 07:08 robinmetral

Hey @robinmetral @balazsorban44 @abdonrd ✋

lighthouse-keeper uploads not only full html reports but also keeps track of how metrics change between PR. You should check it out!

krzkaczor avatar Aug 29 '19 12:08 krzkaczor

@krzkaczor thanks, I'll take a look! :smiley:

robinmetral avatar Aug 29 '19 13:08 robinmetral