From b3c23a476e3a69f4940c027b07f7586aaef7cd2b Mon Sep 17 00:00:00 2001 From: James Ives Date: Thu, 21 Nov 2019 09:29:43 -0500 Subject: [PATCH] Fixing issue with GITHUB_REPOSITORY being undefined in scheduled tests --- lib/constants.js | 4 +++- src/constants.ts | 5 ++++- 2 files changed, 7 insertions(+), 2 deletions(-) diff --git a/lib/constants.js b/lib/constants.js index 76caa83a..a38706db 100644 --- a/lib/constants.js +++ b/lib/constants.js @@ -17,7 +17,9 @@ exports.isTest = process.env.UNIT_TEST; // Required action data. exports.action = { build: exports.folder, - gitHubRepository: repository ? repository.full_name : "", + gitHubRepository: repository && repository.full_name + ? repository.full_name + : process.env.GITHUB_REPOSITORY, gitHubToken: core.getInput("GITHUB_TOKEN"), accessToken: core.getInput("ACCESS_TOKEN"), branch: core.getInput("BRANCH"), diff --git a/src/constants.ts b/src/constants.ts index ef5cab82..8d546be5 100644 --- a/src/constants.ts +++ b/src/constants.ts @@ -11,7 +11,10 @@ export const isTest = process.env.UNIT_TEST; // Required action data. export const action = { build: folder, - gitHubRepository: repository ? repository.full_name : "", + gitHubRepository: + repository && repository.full_name + ? repository.full_name + : process.env.GITHUB_REPOSITORY, gitHubToken: core.getInput("GITHUB_TOKEN"), accessToken: core.getInput("ACCESS_TOKEN"), branch: core.getInput("BRANCH"),