From aab364320b68b4e4130b759ca8982752d6e0c148 Mon Sep 17 00:00:00 2001 From: Daniel Hwang Date: Tue, 16 Jun 2020 18:45:19 -0700 Subject: [PATCH] gists: result.ref = refs/heads/master --- dist/index.js | 3 +++ src/input-helper.ts | 4 ++++ 2 files changed, 7 insertions(+) diff --git a/dist/index.js b/dist/index.js index 0761a94..109373b 100644 --- a/dist/index.js +++ b/dist/index.js @@ -14518,6 +14518,9 @@ function getInputs() { result.ref = `refs/heads/${result.ref}`; } } + if (result.isGist && !result.ref && !result.commit) { + result.ref = 'refs/heads/master'; + } } // SHA? else if (result.ref.match(/^[0-9a-fA-F]{40}$/)) { diff --git a/src/input-helper.ts b/src/input-helper.ts index e3e823b..84c9707 100644 --- a/src/input-helper.ts +++ b/src/input-helper.ts @@ -76,6 +76,10 @@ export function getInputs(): IGitSourceSettings { result.ref = `refs/heads/${result.ref}` } } + + if (result.isGist && !result.ref && !result.commit) { + result.ref = 'refs/heads/master' + } } // SHA? else if (result.ref.match(/^[0-9a-fA-F]{40}$/)) {