From 9aa92ae7e8e88b967582803af153f789f68a9551 Mon Sep 17 00:00:00 2001 From: Greg Dennis Date: Thu, 24 Aug 2023 14:20:23 +1200 Subject: [PATCH] github action inputs can't be arrays; use a string instead --- README.md | 3 +-- action.yml | 4 ++-- index.js | 6 +----- 3 files changed, 4 insertions(+), 9 deletions(-) diff --git a/README.md b/README.md index 6cb0b2f4..3a5918e1 100644 --- a/README.md +++ b/README.md @@ -37,8 +37,7 @@ jobs: steps: - uses: gregsdennis/dependencies-action@main with: - custom-domains: - - my-custom-domain.io + custom-domains: my-custom-domain.io another.domain.com env: GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} ``` diff --git a/action.yml b/action.yml index 55179821..341948ca 100644 --- a/action.yml +++ b/action.yml @@ -8,6 +8,6 @@ runs: main: 'index.js' inputs: custom-domains: - description: 'Define custom domains other than "github.com"' + description: 'Space-delimited list of custom domains where issues may be found' required: false - default: [] \ No newline at end of file + default: null \ No newline at end of file diff --git a/index.js b/index.js index 4cca82c4..ce2c16be 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,7 @@ const core = require('@actions/core'); const github = require('@actions/github'); -var customDomains = core.getInput('custom-domains') ?? []; +var customDomains = core.getInput('custom-domains')?.split(/(\s+)/) ?? []; const keyPhrases = 'depends on|blocked by'; const issueTypes = 'issues|pull'; @@ -22,10 +22,6 @@ function combineDomains(domains) { return domains.map(x => escapeDomainForRegex(x)).join("|"); } -console.log(fullUrlRegex); - -return; - function extractFromMatch(match) { return { owner: match[2],