Skip to content

Commit

Permalink
Patch Attempt 3: for when artifactName is empty string.
Browse files Browse the repository at this point in the history
The Error we are seeing when the action is run before this change:
Validation Failed: {"resource":"Deployment","code":"custom","field":"task","message":"task is too short (minimum is 1 character)"}

Fixing oversight from this change:
#46
  • Loading branch information
QuintinWillison committed Sep 27, 2022
1 parent 1e494f7 commit 906d5fd
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion src/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -106,7 +106,7 @@ const createDeployment = async () => {
const response = await octokit.repos.createDeployment({
...context.repo,
ref: githubDeploymentRef,
task: artifactName || 'root',
task: (artifactName && artifactName.length > 0) ? artifactName : 'root',
required_contexts: [],
githubEnvironmentName,
auto_merge: false,
Expand Down

0 comments on commit 906d5fd

Please sign in to comment.