feat: add convertCommitFile
This commit is contained in:
parent
0c78013f38
commit
8abe1e7981
|
@ -196,6 +196,23 @@ func convertLabel(label *structs.Label) *github.Label {
|
|||
}
|
||||
}
|
||||
|
||||
func convertCommitFile(file *structs.ChangedFile) *github.CommitFile {
|
||||
if file == nil {
|
||||
return &github.CommitFile{}
|
||||
}
|
||||
|
||||
return &github.CommitFile{
|
||||
Filename: stringPtr(file.Filename),
|
||||
PreviousFilename: stringPtr(file.PreviousFilename),
|
||||
Additions: intPtr(file.Additions),
|
||||
Deletions: intPtr(file.Deletions),
|
||||
Changes: intPtr(file.Changes),
|
||||
Status: stringPtr(file.Status),
|
||||
BlobURL: stringPtr(file.ContentsURL),
|
||||
RawURL: stringPtr(file.RawURL),
|
||||
}
|
||||
}
|
||||
|
||||
func translatePrAction(action structs.HookIssueAction) string {
|
||||
translatedAction := ""
|
||||
|
||||
|
|
Loading…
Reference in New Issue