From 6d8169070c8d8909cf087c81ce1f4120a0cfcbc5 Mon Sep 17 00:00:00 2001 From: Michal Dorner Date: Thu, 25 Mar 2021 23:45:44 +0100 Subject: [PATCH] Improve logging --- dist/index.js | 4 ++-- src/git.ts | 2 +- src/main.ts | 2 +- 3 files changed, 4 insertions(+), 4 deletions(-) diff --git a/dist/index.js b/dist/index.js index ec0889e..7ac8911 100644 --- a/dist/index.js +++ b/dist/index.js @@ -3871,7 +3871,7 @@ async function getChangesSinceMergeBase(base, ref, initialFetchDepth) { return (baseRef !== undefined && (await exec_1.default('git', ['merge-base', baseRef, ref], { ignoreReturnCode: true })).code === 0); } let noMergeBase = false; - core.startGroup(`Searching for merge-base ${baseRef}...${ref}`); + core.startGroup(`Searching for merge-base ${base}...${ref}`); try { baseRef = await getFullRef(base); if (!(await hasMergeBase())) { @@ -4776,7 +4776,7 @@ async function getChangedFilesFromGit(base, initialFetchDepth) { return await git.getChanges(baseSha); } // Changes introduced by current branch against the base branch - core.info(`Changes will be detected against the branch ${baseRef}`); + core.info(`Changes will be detected against ${baseRef}`); return await git.getChangesSinceMergeBase(baseRef, ref, initialFetchDepth); } // Uses github REST api to get list of files changed in PR diff --git a/src/git.ts b/src/git.ts index 0c31214..4831e83 100644 --- a/src/git.ts +++ b/src/git.ts @@ -63,7 +63,7 @@ export async function getChangesSinceMergeBase(base: string, ref: string, initia } let noMergeBase = false - core.startGroup(`Searching for merge-base ${baseRef}...${ref}`) + core.startGroup(`Searching for merge-base ${base}...${ref}`) try { baseRef = await getFullRef(base) if (!(await hasMergeBase())) { diff --git a/src/main.ts b/src/main.ts index e3d6ebc..de33bc2 100644 --- a/src/main.ts +++ b/src/main.ts @@ -121,7 +121,7 @@ async function getChangedFilesFromGit(base: string, initialFetchDepth: number): } // Changes introduced by current branch against the base branch - core.info(`Changes will be detected against the branch ${baseRef}`) + core.info(`Changes will be detected against ${baseRef}`) return await git.getChangesSinceMergeBase(baseRef, ref, initialFetchDepth) }