diff --git a/index.js b/index.js index 57216c3..f616fa7 100644 --- a/index.js +++ b/index.js @@ -9,6 +9,10 @@ async function run() { console.log(`Searching for tag: ${tag} in ${repoInput}`); + if (!repoInput.contains('/')) { + throw new Error(`${repoInput} is not a valid repo`); + } + // Get owner and repo from context of payload that triggered the action const [ owner, ...repository ] = repoInput.split('/'); const repo = repository.join('/'); @@ -38,4 +42,4 @@ async function run() { } } -run(); \ No newline at end of file +run();