Skip to content

Commit 1ad800d

Browse files
committed
Fix test
1 parent ca473de commit 1ad800d

File tree

2 files changed

+4
-1
lines changed

2 files changed

+4
-1
lines changed

routers/web/repo/issue_view.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -757,6 +757,9 @@ func prepareIssueViewCommentsAndSidebarParticipants(ctx *context.Context, issue
757757
}
758758
if !ctx.Repo.CanRead(unit.TypeActions) {
759759
for _, commit := range comment.Commits {
760+
if commit.Status == nil {
761+
continue
762+
}
760763
commit.Status.HideActionsURL(ctx)
761764
git_model.CommitStatusesHideActionsURL(ctx, commit.Statuses)
762765
}

tests/integration/pull_status_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -100,7 +100,7 @@ func TestPullCreate_CommitStatus(t *testing.T) {
100100

101101
repo1 := unittest.AssertExistsAndLoadBean(t, &repo_model.Repository{OwnerName: "user1", Name: "repo1"})
102102
css := unittest.AssertExistsAndLoadBean(t, &git_model.CommitStatusSummary{RepoID: repo1.ID, SHA: commitID})
103-
assert.Equal(t, commitstatus.CommitStatusWarning, css.State)
103+
assert.Equal(t, commitstatus.CommitStatusSuccess, css.State)
104104
})
105105
}
106106

0 commit comments

Comments
 (0)