ConvertCommit Convert the API response to our DB model instance
(commit *GiteeApiCommitResponse)
| 114 | |
| 115 | // ConvertCommit Convert the API response to our DB model instance |
| 116 | func ConvertCommit(commit *GiteeApiCommitResponse) (*models.GiteeCommit, errors.Error) { |
| 117 | giteeCommit := &models.GiteeCommit{ |
| 118 | Sha: commit.Sha, |
| 119 | Message: commit.Commit.Message, |
| 120 | AuthorName: commit.Commit.Author.Name, |
| 121 | AuthorEmail: commit.Commit.Author.Email, |
| 122 | AuthoredDate: commit.Commit.Author.Date.ToTime(), |
| 123 | CommitterName: commit.Commit.Author.Name, |
| 124 | CommitterEmail: commit.Commit.Author.Email, |
| 125 | CommittedDate: commit.Commit.Author.Date.ToTime(), |
| 126 | WebUrl: commit.Url, |
| 127 | } |
| 128 | return giteeCommit, nil |
| 129 | } |
no test coverage detected