From 8a241b5b4d9f8cd0d8f75d29f235481aff4b404a Mon Sep 17 00:00:00 2001
From: James Bradlee <james.bradlee@telenor.no>
Date: Tue, 20 Aug 2024 10:46:49 +0200
Subject: [PATCH] in input-helper, make ref fallback to commit if the commit
 was provided but not ref

Signed-off-by: James Bradlee <james.bradlee@telenor.no>
---
 src/input-helper.ts | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/src/input-helper.ts b/src/input-helper.ts
index 6146c9a..bc9382f 100644
--- a/src/input-helper.ts
+++ b/src/input-helper.ts
@@ -58,7 +58,7 @@ export async function getInputs(): Promise<IGitSourceSettings> {
 
   // Source branch, source version
   result.commit = core.getInput('commit')
-  result.ref = core.getInput('ref')
+  result.ref = core.getInput('ref') ?? result.commit
   if (!result.ref) {
     if (isWorkflowRepository) {
       result.ref = github.context.ref