From d35c5b0d45c2389911e8fa57f5a409dc7eb4eba9 Mon Sep 17 00:00:00 2001 From: eric sciple Date: Wed, 18 Mar 2020 23:33:26 -0400 Subject: use token for workflow repo --- src/input-helper.ts | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) (limited to 'src/input-helper.ts') diff --git a/src/input-helper.ts b/src/input-helper.ts index 11a1ab6..6e35986 100644 --- a/src/input-helper.ts +++ b/src/input-helper.ts @@ -4,6 +4,8 @@ import * as github from '@actions/github' import * as path from 'path' import {IGitSourceSettings} from './git-source-settings' +const hostname = 'github.com' + export function getInputs(): IGitSourceSettings { const result = ({} as unknown) as IGitSourceSettings @@ -51,14 +53,14 @@ export function getInputs(): IGitSourceSettings { } // Workflow repository? - const isWorkflowRepository = + result.isWorkflowRepository = qualifiedRepository.toUpperCase() === `${github.context.repo.owner}/${github.context.repo.repo}`.toUpperCase() // Source branch, source version result.ref = core.getInput('ref') if (!result.ref) { - if (isWorkflowRepository) { + if (result.isWorkflowRepository) { result.ref = github.context.ref result.commit = github.context.sha -- cgit v1.2.3