forked from gitploy-io/gitploy
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathcommit.go
More file actions
43 lines (36 loc) · 1.02 KB
/
commit.go
File metadata and controls
43 lines (36 loc) · 1.02 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
package extent
import "time"
type (
Commit struct {
SHA string `json:"sha"`
Message string `json:"message"`
IsPullRequest bool `json:"is_pull_request"`
HTMLURL string `json:"html_url"`
Author *Author `json:"author,omitempty"`
}
Author struct {
Login string `json:"login"`
AvatarURL string `json:"avatar_url"`
Date time.Time `json:"date"`
}
StatusState string
Status struct {
Context string `json:"context"`
AvatarURL string `json:"avatar_url"`
TargetURL string `json:"target_url"`
State StatusState `json:"state"`
}
CommitFile struct {
FileName string `json:"filename"`
Additions int `json:"addtitions"`
Deletions int `json:"deletions"`
Changes int `json:"changes"`
}
)
const (
StatusStateSuccess StatusState = "success"
StatusStateFailure StatusState = "failure"
StatusStatePending StatusState = "pending"
StatusStateCancelled StatusState = "cancelled"
StatusStateSkipped StatusState = "skipped"
)