-
Notifications
You must be signed in to change notification settings - Fork 250
/
types.go
121 lines (95 loc) · 3.35 KB
/
types.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
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
// This source code file is AUTO-GENERATED by github.com/taskcluster/jsonschema2go
package tcgithub
import (
tcclient "github.com/taskcluster/taskcluster/v48/clients/client-go"
)
type (
Build struct {
// The initial creation time of the build. This is when it became pending.
Created tcclient.Time `json:"created"`
// The GitHub webhook deliveryId. Extracted from the header 'X-GitHub-Delivery'
//
// One of:
// * GithubGUID
// * UnknownGithubGUID
EventID string `json:"eventId"`
// Type of Github event that triggered the build (i.e. push, pull_request.opened).
EventType string `json:"eventType"`
// Github organization associated with the build.
//
// Syntax: ^([a-zA-Z0-9-_%]*)$
// Min length: 1
// Max length: 100
Organization string `json:"organization"`
// Github repository associated with the build.
//
// Syntax: ^([a-zA-Z0-9-_%]*)$
// Min length: 1
// Max length: 100
Repository string `json:"repository"`
// Github revision associated with the build.
//
// Min length: 40
// Max length: 40
Sha string `json:"sha"`
// Github status associated with the build.
//
// Possible values:
// * "pending"
// * "success"
// * "error"
// * "failure"
State string `json:"state"`
// Taskcluster task-group associated with the build.
//
// Syntax: ^[A-Za-z0-9_-]{8}[Q-T][A-Za-z0-9_-][CGKOSWaeimquy26-][A-Za-z0-9_-]{10}[AQgw]$
TaskGroupID string `json:"taskGroupId"`
// The last updated of the build. If it is done, this is when it finished.
Updated tcclient.Time `json:"updated"`
}
// A paginated list of builds
BuildsResponse struct {
// A simple list of builds.
Builds []Build `json:"builds"`
// Passed back from Azure to allow us to page through long result sets.
ContinuationToken string `json:"continuationToken,omitempty"`
}
// Write a new comment on a GitHub Issue or Pull Request.
// Full specification on [GitHub docs](https://developer.github.com/v3/issues/comments/#create-a-comment)
CreateCommentRequest struct {
// The contents of the comment.
Body string `json:"body"`
}
// Create a commit status on GitHub.
// Full specification on [GitHub docs](https://developer.github.com/v3/repos/statuses/#create-a-status)
CreateStatusRequest struct {
// A string label to differentiate this status from the status of other systems.
Context string `json:"context,omitempty"`
// A short description of the status.
Description string `json:"description,omitempty"`
// The state of the status.
//
// Possible values:
// * "pending"
// * "success"
// * "error"
// * "failure"
State string `json:"state"`
// The target URL to associate with this status. This URL will be linked from the GitHub UI to allow users to easily see the 'source' of the Status.
Target_URL string `json:"target_url,omitempty"`
}
// The GitHub webhook deliveryId. Extracted from the header 'X-GitHub-Delivery'
//
// Syntax: ^[a-zA-Z0-9]{8}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{4}-[a-zA-Z0-9]{12}$
GithubGUID string
// Any Taskcluster-specific Github repository information.
RepositoryResponse struct {
// True if integration is installed, False otherwise.
Installed bool `json:"installed"`
}
// The GitHub webhook deliveryId. Extracted from the header 'X-GitHub-Delivery'
//
// Possible values:
// * "Unknown"
UnknownGithubGUID string
)