From 6c824d7c3cd0d2160d94e30380f4cc70e5411169 Mon Sep 17 00:00:00 2001 From: garronej Date: Wed, 19 Jan 2022 01:15:46 +0100 Subject: [PATCH] add logs --- dist/index.js | 2 +- src/test/getCommitAhead.ts | 20 ++++++++++++++++++++ src/update_changelog.ts | 2 +- 3 files changed, 22 insertions(+), 2 deletions(-) create mode 100644 src/test/getCommitAhead.ts diff --git a/dist/index.js b/dist/index.js index 1385e98..9efb914 100644 --- a/dist/index.js +++ b/dist/index.js @@ -9186,7 +9186,7 @@ function action(_actionName, params, core) { "branchAhead": branch }).catch(() => ({ "commits": undefined })); if (commits === undefined) { - core.warning(`${branchBehind} probably does not exist`); + core.warning(`${owner}/${repo}#${branchBehind} probably does not exist ( branch: ${branch})`); return; } const [branchBehindVersion, branchAheadVersion] = yield Promise.all([branchBehind, branch] diff --git a/src/test/getCommitAhead.ts b/src/test/getCommitAhead.ts new file mode 100644 index 0000000..8c57d61 --- /dev/null +++ b/src/test/getCommitAhead.ts @@ -0,0 +1,20 @@ +import { createOctokit } from "../tools/createOctokit"; +import { getCommitAheadFactory } from "../tools/octokit-addons/getCommitAhead"; + +(async ()=>{ + + const octokit = createOctokit({ "github_token": "" }); + + const { getCommitAhead } = getCommitAheadFactory({ octokit }); + + const { commits } = await getCommitAhead({ + "owner": "InseeFrLab", + "repo": "keycloakify", + "branchBehind": "v4.5.1", + "branchAhead": "Ann2827/pull" + }).catch(() => ({ "commits": undefined })); + + console.log(commits); + + +})() diff --git a/src/update_changelog.ts b/src/update_changelog.ts index 588b8ac..f23fdbd 100644 --- a/src/update_changelog.ts +++ b/src/update_changelog.ts @@ -73,7 +73,7 @@ export async function action( if( commits === undefined ){ - core.warning(`${branchBehind} probably does not exist`); + core.warning(`${owner}/${repo}#${branchBehind} probably does not exist ( branch: ${branch})`); return;