Commit f173f60a authored by Claude's avatar Claude Committed by Tobias Koppers

Fix prettier formatting in pr-status.js

https://claude.ai/code/session_01HMJMvZoLTzC54SdjVK6WD9
parent 38324ad1
...@@ -117,11 +117,7 @@ function connectTunnel(proxy, targetHost, targetPort) { ...@@ -117,11 +117,7 @@ function connectTunnel(proxy, targetHost, targetPort) {
function handleResponse(res, parsedUrl, options, resolve) { function handleResponse(res, parsedUrl, options, resolve) {
// Handle redirects // Handle redirects
if ( if (res.statusCode >= 300 && res.statusCode < 400 && res.headers.location) {
res.statusCode >= 300 &&
res.statusCode < 400 &&
res.headers.location
) {
const redirectUrl = new URL(res.headers.location) const redirectUrl = new URL(res.headers.location)
const newOptions = { ...options } const newOptions = { ...options }
// Strip auth header when redirecting to a different host // Strip auth header when redirecting to a different host
...@@ -216,7 +212,11 @@ async function githubRequest(apiPath, { accept, method, body } = {}) { ...@@ -216,7 +212,11 @@ async function githubRequest(apiPath, { accept, method, body } = {}) {
if (accept) headers['Accept'] = accept if (accept) headers['Accept'] = accept
if (body) headers['Content-Type'] = 'application/json' if (body) headers['Content-Type'] = 'application/json'
const resp = await httpRequest(url, { method: method || 'GET', headers, body }) const resp = await httpRequest(url, {
method: method || 'GET',
headers,
body,
})
if (resp.statusCode < 200 || resp.statusCode >= 300) { if (resp.statusCode < 200 || resp.statusCode >= 300) {
throw new Error( throw new Error(
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment