Skip to content

Commit 8878cfa

Browse files
authored
Fix lint (#9688)
1 parent 17b844a commit 8878cfa

File tree

2 files changed

+4
-2
lines changed

2 files changed

+4
-2
lines changed

Diff for: models/pull_test.go

+1-1
Original file line numberDiff line numberDiff line change
@@ -182,7 +182,7 @@ func TestPullRequest_UpdateCols(t *testing.T) {
182182
BaseBranch: "baseBranch",
183183
HeadBranch: "headBranch",
184184
}
185-
pr.UpdateCols("head_branch")
185+
assert.NoError(t, pr.UpdateCols("head_branch"))
186186

187187
pr = AssertExistsAndLoadBean(t, &PullRequest{ID: 1}).(*PullRequest)
188188
assert.Equal(t, "master", pr.BaseBranch)

Diff for: services/pull/check.go

+3-1
Original file line numberDiff line numberDiff line change
@@ -201,7 +201,9 @@ func TestPullRequests(ctx context.Context) {
201201
} else if err = TestPatch(pr); err != nil {
202202
log.Error("testPatch[%d]: %v", pr.ID, err)
203203
pr.Status = models.PullRequestStatusError
204-
pr.UpdateCols("status")
204+
if err := pr.UpdateCols("status"); err != nil {
205+
log.Error("update pr [%d] status to PullRequestStatusError failed: %v", pr.ID, err)
206+
}
205207
continue
206208
}
207209
checkAndUpdateStatus(pr)

0 commit comments

Comments
 (0)