mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-04-19 09:06:47 +00:00
log more
This commit is contained in:
parent
a6762eb223
commit
97bdebd585
3 changed files with 9 additions and 2 deletions
|
@ -196,14 +196,17 @@ async function createReviewComment(
|
|||
async function main() {
|
||||
const prDetails = await getPRDetails();
|
||||
let diff: string | null;
|
||||
|
||||
console.log("Running the action...");
|
||||
console.log("Event name:", process.env.GITHUB_EVENT_NAME);
|
||||
if (process.env.GITHUB_EVENT_NAME === "pull_request") {
|
||||
console.log("Pull request event");
|
||||
diff = await getDiff(
|
||||
prDetails.owner,
|
||||
prDetails.repo,
|
||||
prDetails.pull_number
|
||||
);
|
||||
} else if (process.env.GITHUB_EVENT_NAME === "push") {
|
||||
console.log("Push event");
|
||||
const pushEvent = JSON.parse(
|
||||
readFileSync(process.env.GITHUB_EVENT_PATH || "", "utf8")
|
||||
);
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue