Skip to content

Commit

Permalink
Patch Attempt 2: 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)"}

Which shows that both `undefined` and empty string have the same result.

Fixing oversight from this change:
#46
  • Loading branch information
QuintinWillison committed Sep 27, 2022
1 parent 01b9011 commit 1e494f7
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 || undefined,
task: artifactName || 'root',
required_contexts: [],
githubEnvironmentName,
auto_merge: false,
Expand Down

0 comments on commit 1e494f7

Please sign in to comment.