forked from forgejo/forgejo
Add directory level commit message
This commit is contained in:
parent
3164354255
commit
b8368f98ff
6 changed files with 32 additions and 11 deletions
|
@ -521,8 +521,17 @@ type UserCommit struct {
|
|||
*git.Commit
|
||||
}
|
||||
|
||||
// ValidCommitsWithEmails checks if authors' e-mails of commits are correcponding to users.
|
||||
func ValidCommitsWithEmails(oldCommits *list.List) *list.List {
|
||||
// ValidateCommitWithEmail chceck if author's e-mail of commit is corresponsind to a user.
|
||||
func ValidateCommitWithEmail(c *git.Commit) (uname string) {
|
||||
u, err := GetUserByEmail(c.Author.Email)
|
||||
if err == nil {
|
||||
uname = u.Name
|
||||
}
|
||||
return uname
|
||||
}
|
||||
|
||||
// ValidateCommitsWithEmails checks if authors' e-mails of commits are corresponding to users.
|
||||
func ValidateCommitsWithEmails(oldCommits *list.List) *list.List {
|
||||
emails := map[string]string{}
|
||||
newCommits := list.New()
|
||||
e := oldCommits.Front()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue