-
Notifications
You must be signed in to change notification settings - Fork 0
/
servicehookresource.go
63 lines (57 loc) · 2.48 KB
/
servicehookresource.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
package azuredevops
// ServiceHookResource holds fields related to the Service Hook resource
// Release event types:
// - ms.vss-release.release-abandoned-event
// - ms.vss-release.release-created-event
// Release Deployment Approval event types:
// - ms.vss-release.deployment-approval-completed-event
// - ms.vss-release.deployment-approval-pending-event
// Release Deployment event types:
// - ms.vss-release.deployment-completed-event
// - ms.vss-release.deployment-started-event
// Code event types:
// - tfvc.checkin
// - git.push
// Pull Request types:
// - git.pullrequest.created
// - git.pullrequest.merged
// - git.pullrequest.updated
// Work Item types:
// - workitem.created
// - workitem.deleted
// - workitem.restored
// - workitem.updated
// - workitem.commented
type ServiceHookResource struct {
IntDefinition // Event Types: build.complete (ID), Work Items
ServiceHookResourceBuildComplete
ServiceHookResourceCodeCheckedIn
ServiceHookResourceCodePushed
ServiceHookResourcePullRequest
ServiceHookResourceWorkItems
ServiceHookResourceWorkItemsUpdated
URL *string `json:"url"` // Event types: build.complete, Code, Pull Requests, Work Items
Reason *string `json:"reason"` // Event types: build.complete, Releases, Release Deployment Approvals
Status *string `json:"status"` // Event types: build.complete, Pull Requests
Approval *Approval `json:"approval"` // Event types: Approvals
Release *Release `json:"release"` // Event types: Releases, Release Deployment Approvals
Environment *Environment `json:"environment"` // Event types: Release Deployments
Project *StrDefinition `json:"project"` // Event types: Releases, Release Deployment Approvals, Release Deployments
Repository *GitRepository `json:"repository"` // Event types: git.push, Pull Requests
Commits []GitCommit `json:"commits"` // Event types: git.push, Pull Requests
}
// ServiceHookResourceContainers contains the value of the resourceContainers field
type ServiceHookResourceContainers struct {
Collection ServiceHookResourceContainer `json:"collection"`
Account ServiceHookResourceContainer `json:"account"`
Project ServiceHookResourceContainer `json:"project"`
}
// ServiceHookResourceContainer contains a Resouce Container defintiion
type ServiceHookResourceContainer struct {
ID string `json:"id"`
}
// ServiceHookResourceDefinition holds a basic resource definition for Service Hooks
type ServiceHookResourceDefinition struct {
IntDefinition
URL string `json:"url"`
}