Skip to content

Commit cc41538

Browse files
committed
remove unnecessary logging
1 parent 6454621 commit cc41538

File tree

3 files changed

+2
-17
lines changed

3 files changed

+2
-17
lines changed

dist/index.js

Lines changed: 0 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -201,17 +201,11 @@ function main() {
201201
return __awaiter(this, void 0, void 0, function* () {
202202
const prDetails = yield getPRDetails();
203203
let diff;
204-
console.log("Running the action...");
205204
const eventData = JSON.parse((0, fs_1.readFileSync)((_a = process.env.GITHUB_EVENT_PATH) !== null && _a !== void 0 ? _a : "", "utf8"));
206-
console.log("Event data:");
207-
console.log(eventData);
208205
if (eventData.action === "opened") {
209-
console.log("Pull request event");
210206
diff = yield getDiff(prDetails.owner, prDetails.repo, prDetails.pull_number);
211207
}
212208
else if (eventData.action === "synchronize") {
213-
console.log("Push event");
214-
console.log(eventData);
215209
const newBaseSha = eventData.before;
216210
const newHeadSha = eventData.after;
217211
const response = yield octokit.repos.compareCommits({
@@ -225,8 +219,6 @@ function main() {
225219
.request({ url: response.data.diff_url })
226220
.then((res) => res.data)
227221
: null;
228-
console.log("Diff:");
229-
console.log(diff);
230222
}
231223
else {
232224
console.log("Unsupported event:", process.env.GITHUB_EVENT_NAME);

dist/index.js.map

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

src/main.ts

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -196,22 +196,17 @@ async function createReviewComment(
196196
async function main() {
197197
const prDetails = await getPRDetails();
198198
let diff: string | null;
199-
console.log("Running the action...");
200199
const eventData = JSON.parse(
201200
readFileSync(process.env.GITHUB_EVENT_PATH ?? "", "utf8")
202201
);
203-
console.log("Event data:");
204-
console.log(eventData);
202+
205203
if (eventData.action === "opened") {
206-
console.log("Pull request event");
207204
diff = await getDiff(
208205
prDetails.owner,
209206
prDetails.repo,
210207
prDetails.pull_number
211208
);
212209
} else if (eventData.action === "synchronize") {
213-
console.log("Push event");
214-
console.log(eventData);
215210
const newBaseSha = eventData.before;
216211
const newHeadSha = eventData.after;
217212

@@ -227,8 +222,6 @@ async function main() {
227222
.request({ url: response.data.diff_url })
228223
.then((res) => res.data)
229224
: null;
230-
console.log("Diff:");
231-
console.log(diff);
232225
} else {
233226
console.log("Unsupported event:", process.env.GITHUB_EVENT_NAME);
234227
return;

0 commit comments

Comments
 (0)