From 21b8de70ae6d75f683abf6d2c948f7bb361def9a Mon Sep 17 00:00:00 2001 From: Jan Calanog Date: Wed, 22 Jan 2025 14:40:39 +0100 Subject: [PATCH] ok --- .github/workflows/preview.yml | 8 +++----- 1 file changed, 3 insertions(+), 5 deletions(-) diff --git a/.github/workflows/preview.yml b/.github/workflows/preview.yml index 1c15a39..ec19dd0 100644 --- a/.github/workflows/preview.yml +++ b/.github/workflows/preview.yml @@ -25,7 +25,7 @@ jobs: result-encoding: string retries: 3 script: | - const deployment = await github.rest.repos.createDeployment({ + const response.data = await github.rest.repos.createDeployment({ issue_number: context.issue.number, owner: context.repo.owner, repo: context.repo.repo, @@ -35,17 +35,15 @@ jobs: description: `Preview deployment for PR ${context.issue.number}`, }) - console.log(deployment) - await github.rest.repos.createDeploymentStatus({ - deployment_id: deployment.id, + deployment_id: response.data.id, owner: context.repo.owner, repo: context.repo.repo, state: "in_progress", description: "Deployment created", }) - return { deploymentId: deployment.id } + return { deploymentId: response.data.id } # - name: Delete a comment if exists