lighthousebot
lighthousebot copied to clipboard
fix: run endpoint with output json by default
https://lighthouse-ci.appspot.com/run_on_chrome it was failing if output is not provided. So now it works by set output
property to json
by default.
This didn't work:
curl --request POST \
--url https://lighthouse-ci.appspot.com/run_on_chrome \
--header 'content-type: application/json' \
--header 'x-api-key: <key>' \
--data '{
"testUrl": "<test>",
"addComment": false,
"repo": {
"owner": "<owner>",
"name": "<name>"
},
"pr": {
"number": "<pr>"
}
}'
With this PR it does.
This should already be taken care of here: https://github.com/ebidel/lighthouse-ci/blob/master/frontend/server.js#L172
It's but if you send the payload without output
property it breaks (as in the docs), so I decided instead of changing the docs, to add the default value.