From 99bb876b39193da7a85b591bb27ba0e1d6c258fb Mon Sep 17 00:00:00 2001 From: Hari Gopal Date: Mon, 20 Feb 2023 02:13:08 +0530 Subject: [PATCH] Begin work on GitHub URL index support --- check_repo/action.yml | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/check_repo/action.yml b/check_repo/action.yml index b356d09..5f9ac9d 100644 --- a/check_repo/action.yml +++ b/check_repo/action.yml @@ -12,6 +12,10 @@ inputs: description: Set to true for debugging required: false default: "false" + githubUrlIndex: + description: Index for the submission checklist item asking for GitHub URL + required: false + default: "0" outputs: result: description: Returns 'success' if all checks pass. @@ -29,7 +33,7 @@ runs: result-encoding: string script: | const submission = require('./submission.json'); - const gitURL = submission.checklist[0].result; + const gitURL = submission.checklist[${{ inputs.githubUrlIndex }}].result; const regex = /(?:git@|https:\/\/)github.com[:\/]([a-zA-Z0-9\-_.]+\/[a-zA-Z0-9\-_.\/]+)$/g; const matches = regex.exec(gitURL);