From 171dd555b9ab6b18fa02519fdfacbb8bf671e1b4 Mon Sep 17 00:00:00 2001 From: Peter Evans <18365890+peter-evans@users.noreply.github.com> Date: Wed, 21 Sep 2022 10:40:38 +0900 Subject: [PATCH] fix: improve logging when checking fork (#1246) --- dist/index.js | 1 + src/create-pull-request.ts | 3 +++ 2 files changed, 4 insertions(+) diff --git a/dist/index.js b/dist/index.js index 2021d56bc8..99379c6bfe 100644 --- a/dist/index.js +++ b/dist/index.js @@ -314,6 +314,7 @@ function createPullRequest(inputs) { : baseRemote.repository; if (inputs.pushToFork) { // Check if the supplied fork is really a fork of the base + core.info(`Checking if '${branchRepository}' is a fork of '${baseRemote.repository}'`); const parentRepository = yield githubHelper.getRepositoryParent(branchRepository); if (parentRepository != baseRemote.repository) { throw new Error(`Repository '${branchRepository}' is not a fork of '${baseRemote.repository}'. Unable to continue.`); diff --git a/src/create-pull-request.ts b/src/create-pull-request.ts index 81caa8877f..4f59904d9e 100644 --- a/src/create-pull-request.ts +++ b/src/create-pull-request.ts @@ -60,6 +60,9 @@ export async function createPullRequest(inputs: Inputs): Promise { : baseRemote.repository if (inputs.pushToFork) { // Check if the supplied fork is really a fork of the base + core.info( + `Checking if '${branchRepository}' is a fork of '${baseRemote.repository}'` + ) const parentRepository = await githubHelper.getRepositoryParent( branchRepository )