forked from jenkins-x/go-scm
-
Notifications
You must be signed in to change notification settings - Fork 0
/
commit.go
54 lines (49 loc) · 1.06 KB
/
commit.go
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
44
45
46
47
48
49
50
51
52
53
54
package scm
import (
"context"
"time"
)
type (
// CommitStatus for commit status
CommitStatus struct {
Status string
Created time.Time
Started time.Time
Name string
AllowFailure bool
Author CommitStatusAuthor
Description string
Sha string
TargetURL string
Finished time.Time
ID int
Ref string
Coverage float64
}
// CommitStatusAuthor for commit author
CommitStatusAuthor struct {
Username string
State string
WebURL string
AvatarURL string
ID int
Name string
}
// CommitStatusUpdateOptions for update options
CommitStatusUpdateOptions struct {
ID string
Sha string
State string
Ref string
Name string
TargetURL string
Description string
Coverage float64
PipelineID *int
}
)
// CommitService commit interface
type CommitService interface {
UpdateCommitStatus(ctx context.Context,
repo string, sha string, options *CommitStatusUpdateOptions) (*CommitStatus, *Response, error)
}