gituser

package
v1.27.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jul 13, 2026 License: MIT Imports: 6 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func RepoCommitSearchByEmailLink(repoLink string, ref git.RefName) string

Types

type AvatarStackData

type AvatarStackData struct {
	Participants      []*CommitParticipant
	SearchByEmailLink string
}

AvatarStackData is the view-model for the AvatarStack render helpers. Participants[0] is the primary participant (commit author), painted on top; the rest follow.

func BuildAvatarStackData

func BuildAvatarStackData(ctx context.Context, allParticipants []*git.CommitIdentity, emailUserMap *user.EmailUserMap) *AvatarStackData

type CommitParticipant

type CommitParticipant struct {
	GitIdentity *git.CommitIdentity // git identity (name/email), never nil
	GiteaUser   *user.User          // matched Gitea user, nil if unmatched
}

CommitParticipant is one participant of a commit (its author or a co-author): a git identity, optionally matched to a Gitea user.

type UserCommit

type UserCommit struct {
	GitCommit       *git.Commit
	AuthorUser      *user.User
	AvatarStackData *AvatarStackData
}

UserCommit represents a commit with matched of database "author" user.

func GetUserCommitsByGitCommits

func GetUserCommitsByGitCommits(ctx context.Context, gitCommits []*git.Commit, repoLink string, currentRef git.RefName) ([]*UserCommit, error)

GetUserCommitsByGitCommits checks if authors' e-mails of commits are corresponding to users.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL