mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-04-22 10: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
|
@ -92,8 +92,10 @@ async function getPrDetails(
|
|||
case "opened":
|
||||
case "synchronize":
|
||||
return getPrFromEvent(eventData);
|
||||
break;
|
||||
case "push":
|
||||
return getPrFromApi(eventData);
|
||||
break;
|
||||
default:
|
||||
throw new Error(`Unsupported event: action=${eventName}`);
|
||||
}
|
||||
|
@ -448,6 +450,7 @@ async function main() {
|
|||
prDetails.repo,
|
||||
prDetails.pull_number
|
||||
);
|
||||
break;
|
||||
case "synchronize":
|
||||
const newBaseSha = eventData.before;
|
||||
const newHeadSha = eventData.after;
|
||||
|
@ -461,8 +464,8 @@ async function main() {
|
|||
base: newBaseSha,
|
||||
head: newHeadSha,
|
||||
});
|
||||
|
||||
diff = String(response.data);
|
||||
break;
|
||||
default:
|
||||
console.log(
|
||||
`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