Skip to content
This repository was archived by the owner on May 30, 2024. It is now read-only.

Commit 3e6f2ea

Browse files
author
Noah Hanjun Lee
authored
Fix not to update the status when it has failed to create the remote deployment. (#122)
* Fix not to update the status of deployment * Remove unused type
1 parent 57e947a commit 3e6f2ea

File tree

2 files changed

+1
-11
lines changed

2 files changed

+1
-11
lines changed

internal/interactor/deployment.go

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -74,11 +74,6 @@ func (i *Interactor) CreateRemoteDeployment(ctx context.Context, u *ent.User, re
7474

7575
rd, err := i.SCM.CreateRemoteDeployment(ctx, u, re, d, e)
7676
if err != nil {
77-
d.Status = deployment.StatusFailure
78-
if _, err := i.UpdateDeployment(ctx, d); err != nil {
79-
return nil, err
80-
}
81-
8277
return nil, err
8378
}
8479

ui/src/redux/deployment.tsx

Lines changed: 1 addition & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,8 +11,7 @@ import {
1111
RequestStatus,
1212
HttpNotFoundError,
1313
HttpForbiddenError,
14-
HttpUnprocessableEntityError,
15-
DeploymentStatusEnum
14+
HttpUnprocessableEntityError,
1615
} from "../models"
1716
import {
1817
searchRepo,
@@ -295,10 +294,6 @@ export const deploymentSlice = createSlice({
295294

296295
.addCase(deployToSCM.rejected, (state) => {
297296
state.deploying = RequestStatus.Idle
298-
299-
if (state.deployment) {
300-
state.deployment.status = DeploymentStatusEnum.Failure
301-
}
302297
})
303298

304299
.addCase(fetchApprovals.fulfilled, (state, action) => {

0 commit comments

Comments
 (0)