Skip to content

Commit

Permalink
github action inputs can't be arrays; use a string instead
Browse files Browse the repository at this point in the history
  • Loading branch information
gregsdennis committed Aug 24, 2023
1 parent f64002d commit 9aa92ae
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 9 deletions.
3 changes: 1 addition & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -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 }}
```
4 changes: 2 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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: []
default: null
6 changes: 1 addition & 5 deletions index.js
Original file line number Diff line number Diff line change
@@ -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';
Expand All @@ -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],
Expand Down

0 comments on commit 9aa92ae

Please sign in to comment.