mirror of
https://github.com/freeedcom/ai-codereviewer.git
synced 2024-11-22 20:19:02 +00:00
remove unnecessary logging
This commit is contained in:
parent
6454621f44
commit
cc415382f7
8
dist/index.js
vendored
8
dist/index.js
vendored
@ -201,17 +201,11 @@ function main() {
|
||||
return __awaiter(this, void 0, void 0, function* () {
|
||||
const prDetails = yield getPRDetails();
|
||||
let diff;
|
||||
console.log("Running the action...");
|
||||
const eventData = JSON.parse((0, fs_1.readFileSync)((_a = process.env.GITHUB_EVENT_PATH) !== null && _a !== void 0 ? _a : "", "utf8"));
|
||||
console.log("Event data:");
|
||||
console.log(eventData);
|
||||
if (eventData.action === "opened") {
|
||||
console.log("Pull request event");
|
||||
diff = yield 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;
|
||||
const response = yield octokit.repos.compareCommits({
|
||||
@ -225,8 +219,6 @@ 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);
|
||||
|
2
dist/index.js.map
vendored
2
dist/index.js.map
vendored
File diff suppressed because one or more lines are too long
@ -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…
Reference in New Issue
Block a user