You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

commit.go 566B

123456789101112131415161718192021
  1. // Copyright 2021 Gitea. All rights reserved.
  2. // Use of this source code is governed by a MIT-style
  3. // license that can be found in the LICENSE file.
  4. package models
  5. import (
  6. user_model "code.gitea.io/gitea/models/user"
  7. "code.gitea.io/gitea/modules/git"
  8. )
  9. // ConvertFromGitCommit converts git commits into SignCommitWithStatuses
  10. func ConvertFromGitCommit(commits []*git.Commit, repo *Repository) []*SignCommitWithStatuses {
  11. return ParseCommitsWithStatus(
  12. ParseCommitsWithSignature(
  13. user_model.ValidateCommitsWithEmails(commits),
  14. repo,
  15. ),
  16. repo,
  17. )
  18. }