Explorar o código

delete deployment from DB

Mohammed Nafees %!s(int64=3) %!d(string=hai) anos
pai
achega
c86b8c0546
Modificáronse 1 ficheiros con 1 adicións e 4 borrados
  1. 1 4
      api/server/handlers/webhook/github_incoming.go

+ 1 - 4
api/server/handlers/webhook/github_incoming.go

@@ -293,10 +293,7 @@ func (c *GithubIncomingWebhookHandler) deleteDeployment(
 		&deploymentStatusRequest,
 	)
 
-	depl.Status = types.DeploymentStatusInactive
-
-	// update the deployment to mark it inactive
-	_, err = c.Repo().Environment().UpdateDeployment(depl)
+	_, err = c.Repo().Environment().DeleteDeployment(depl)
 
 	if err != nil {
 		return fmt.Errorf("[owner: %s, repo: %s, environmentID: %d, deploymentID: %d] error updating deployment: %w",