GoogleChromeLabs / lighthousebot

Run Lighthouse in CI, as a web service, using Docker. Pass/Fail GH pull requests.
Apache License 2.0
2.24k stars 127 forks source link

Proposal: Add link to the report in the bot comment #11

Open abdonrd opened 7 years ago

abdonrd commented 7 years ago

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

ebidel commented 7 years ago

Good call. Want to send a PR?

mderazon commented 6 years ago

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

ebidel commented 6 years ago

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 :)

balazsorban44 commented 5 years ago

Is there any progress on this?

robinmetral commented 5 years ago

@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

krzkaczor commented 5 years ago

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!

robinmetral commented 5 years ago

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