MCPcopy Create free account
hub / github.com/c1982/swe-dashboard / convertGithubCommitToCommit

Method convertGithubCommitToCommit

internal/scm/github/scm.go:439–453  ·  view source on GitHub ↗
(repoCommit *github.RepositoryCommit, repoID int)

Source from the content-addressed store, hash-verified

437}
438
439func (s *SCM) convertGithubCommitToCommit(repoCommit *github.RepositoryCommit, repoID int) *models.Commit {
440 commit := repoCommit.GetCommit()
441 return &models.Commit{
442 ID: commit.GetNodeID(),
443 ShortID: commit.GetSHA(),
444 Title: commit.GetMessage(),
445 Message: commit.GetMessage(),
446 AuthorName: repoCommit.GetAuthor().GetName(),
447 CommitterName: commit.GetAuthor().GetName(),
448 CommitterEmail: repoCommit.GetAuthor().GetEmail(),
449 CommittedDate: commit.GetCommitter().GetDate(),
450 CreatedAt: commit.GetAuthor().GetDate(),
451 ProjectID: repoID,
452 }
453}
454
455func (s *SCM) convertGithubPullRequestsCommentsToComments(comments []*github.PullRequestComment) []*models.Comment {
456 var commentsList []*models.Comment

Callers 1

Implementers 1

SCMinternal/scm/gitlab/scm.go

Calls

no outgoing calls

Tested by

no test coverage detected