mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2025-04-20 01:26:47 +00:00
remove unnecessary logging
This commit is contained in:
parent
6454621f44
commit
cc415382f7
3 changed files with 2 additions and 17 deletions
|
@ -196,22 +196,17 @@ async function createReviewComment(
|
|||
async function main() {
|
||||
const prDetails = await getPRDetails();
|
||||
let diff: string | null;
|
||||
console.log("Running the action...");
|
||||
const eventData = JSON.parse(
|
||||
readFileSync(process.env.GITHUB_EVENT_PATH ?? "", "utf8")
|
||||
);
|
||||
console.log("Event data:");
|
||||
console.log(eventData);
|
||||
|
||||
if (eventData.action === "opened") {
|
||||
console.log("Pull request event");
|
||||
diff = await getDiff(
|
||||
prDetails.owner,
|
||||
prDetails.repo,
|
||||
prDetails.pull_number
|
||||
);
|
||||
} else if (eventData.action === "synchronize") {
|
||||
console.log("Push event");
|
||||
console.log(eventData);
|
||||
const newBaseSha = eventData.before;
|
||||
const newHeadSha = eventData.after;
|
||||
|
||||
|
@ -227,8 +222,6 @@ async function main() {
|
|||
.request({ url: response.data.diff_url })
|
||||
.then((res) => res.data)
|
||||
: null;
|
||||
console.log("Diff:");
|
||||
console.log(diff);
|
||||
} else {
|
||||
console.log("Unsupported event:", process.env.GITHUB_EVENT_NAME);
|
||||
return;
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue