mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-04-20 09:36:47 +00:00
Well yeah, let's break it down [review]
This commit is contained in:
parent
cfdf159e52
commit
4677946e97
3 changed files with 9 additions and 2 deletions
4
dist/index.js
vendored
4
dist/index.js
vendored
|
@ -176,8 +176,10 @@ require("./sourcemap-register.js");
|
||||||
case "opened":
|
case "opened":
|
||||||
case "synchronize":
|
case "synchronize":
|
||||||
return getPrFromEvent(eventData);
|
return getPrFromEvent(eventData);
|
||||||
|
break;
|
||||||
case "push":
|
case "push":
|
||||||
return getPrFromApi(eventData);
|
return getPrFromApi(eventData);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported event: action=${eventName}`);
|
throw new Error(`Unsupported event: action=${eventName}`);
|
||||||
}
|
}
|
||||||
|
@ -551,6 +553,7 @@ ${chunk.changes
|
||||||
prDetails.repo,
|
prDetails.repo,
|
||||||
prDetails.pull_number
|
prDetails.pull_number
|
||||||
);
|
);
|
||||||
|
break;
|
||||||
case "synchronize":
|
case "synchronize":
|
||||||
const newBaseSha = eventData.before;
|
const newBaseSha = eventData.before;
|
||||||
const newHeadSha = eventData.after;
|
const newHeadSha = eventData.after;
|
||||||
|
@ -564,6 +567,7 @@ ${chunk.changes
|
||||||
head: newHeadSha,
|
head: newHeadSha,
|
||||||
});
|
});
|
||||||
diff = String(response.data);
|
diff = String(response.data);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.log(
|
console.log(
|
||||||
`Unsupported event: eventName=${eventName}, process.env.GITHUB_EVENT_NAME=${process.env.GITHUB_EVENT_NAME}`
|
`Unsupported event: eventName=${eventName}, process.env.GITHUB_EVENT_NAME=${process.env.GITHUB_EVENT_NAME}`
|
||||||
|
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
|
@ -92,8 +92,10 @@ async function getPrDetails(
|
||||||
case "opened":
|
case "opened":
|
||||||
case "synchronize":
|
case "synchronize":
|
||||||
return getPrFromEvent(eventData);
|
return getPrFromEvent(eventData);
|
||||||
|
break;
|
||||||
case "push":
|
case "push":
|
||||||
return getPrFromApi(eventData);
|
return getPrFromApi(eventData);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
throw new Error(`Unsupported event: action=${eventName}`);
|
throw new Error(`Unsupported event: action=${eventName}`);
|
||||||
}
|
}
|
||||||
|
@ -448,6 +450,7 @@ async function main() {
|
||||||
prDetails.repo,
|
prDetails.repo,
|
||||||
prDetails.pull_number
|
prDetails.pull_number
|
||||||
);
|
);
|
||||||
|
break;
|
||||||
case "synchronize":
|
case "synchronize":
|
||||||
const newBaseSha = eventData.before;
|
const newBaseSha = eventData.before;
|
||||||
const newHeadSha = eventData.after;
|
const newHeadSha = eventData.after;
|
||||||
|
@ -461,8 +464,8 @@ async function main() {
|
||||||
base: newBaseSha,
|
base: newBaseSha,
|
||||||
head: newHeadSha,
|
head: newHeadSha,
|
||||||
});
|
});
|
||||||
|
|
||||||
diff = String(response.data);
|
diff = String(response.data);
|
||||||
|
break;
|
||||||
default:
|
default:
|
||||||
console.log(
|
console.log(
|
||||||
`Unsupported event: eventName=${eventName}, process.env.GITHUB_EVENT_NAME=${process.env.GITHUB_EVENT_NAME}`
|
`Unsupported event: eventName=${eventName}, process.env.GITHUB_EVENT_NAME=${process.env.GITHUB_EVENT_NAME}`
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue