Skip to content
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Merge branch 'main' of https://github.com/go-gitea/gitea into refacto…
…r-list
  • Loading branch information
KN4CK3R committed Jun 29, 2021
commit a0f9e9dabb19ba3ea2fe6e55ce8b7eb006f81910
2 changes: 1 addition & 1 deletion modules/repository/commits.go
Original file line number Diff line number Diff line change
Expand Up @@ -180,5 +180,5 @@ func GitToPushCommits(gitCommits []*git.Commit) *PushCommits {
for _, commit := range gitCommits {
commits = append(commits, CommitToPushCommit(commit))
}
return &PushCommits{len(commits), commits, "", make(map[string]string), make(map[string]*models.User)}
return &PushCommits{commits, nil, "", make(map[string]string), make(map[string]*models.User)}
}
1 change: 0 additions & 1 deletion modules/repository/commits_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -188,7 +188,6 @@ func TestListToPushCommits(t *testing.T) {
}

pushCommits := GitToPushCommits(l)
assert.Equal(t, 2, pushCommits.Len)
if assert.Len(t, pushCommits.Commits, 2) {
assert.Equal(t, "Message1", pushCommits.Commits[0].Message)
assert.Equal(t, hexString1, pushCommits.Commits[0].Sha1)
Expand Down
3 changes: 2 additions & 1 deletion services/repository/push.go
Original file line number Diff line number Diff line change
Expand Up @@ -190,7 +190,8 @@ func pushUpdates(optsList []*repo_module.PushUpdateOptions) error {
}
}

commits = repo_module.GitToPushCommits(l)
commits := repo_module.GitToPushCommits(l)
commits.HeadCommit = repo_module.CommitToPushCommit(newCommit)

if err := repofiles.UpdateIssuesCommit(pusher, repo, commits.Commits, refName); err != nil {
log.Error("updateIssuesCommit: %v", err)
Expand Down
You are viewing a condensed version of this merge commit. You can view the full changes here.