@@ -38,6 +38,7 @@ type IssueEventPayload struct {
38
38
Repository Repository `json:"repository"`
39
39
ObjectAttributes ObjectAttributes `json:"object_attributes"`
40
40
Assignee Assignee `json:"assignee"`
41
+ Changes Changes `json:"changes"`
41
42
}
42
43
43
44
// ConfidentialIssueEventPayload contains the information for GitLab's confidential issue event
@@ -52,6 +53,7 @@ type MergeRequestEventPayload struct {
52
53
ObjectKind string `json:"object_kind"`
53
54
User User `json:"user"`
54
55
ObjectAttributes ObjectAttributes `json:"object_attributes"`
56
+ Changes Changes `json:"changes"`
55
57
}
56
58
57
59
// PushEventPayload contains the information for GitLab's push event
@@ -409,3 +411,28 @@ type Author struct {
409
411
Name string `json:"name"`
410
412
Email string `json:"email"`
411
413
}
414
+
415
+ // Changes contains all changes associated with a GitLab issue or MR
416
+ type Changes struct {
417
+ LabelChanges LabelChanges `json:"labels"`
418
+ }
419
+
420
+ // LabelChanges contains changes in labels assocatiated with a GitLab issue or MR
421
+ type LabelChanges struct {
422
+ Previous []Label `json:"previous"`
423
+ Current []Label `json:"current"`
424
+ }
425
+
426
+ // Label contains all of the GitLab label information
427
+ type Label struct {
428
+ Id int64 `json:"id"`
429
+ Title string `json:"title"`
430
+ Color string `json:"color"`
431
+ ProjectId int64 `json:"project_id"`
432
+ CreatedAt customTime `json:"created_at"`
433
+ UpdatedAt customTime `json:"updated_at"`
434
+ Template bool `json:"template"`
435
+ Description string `json:"description"`
436
+ Type string `json:"type"`
437
+ GroupId int64 `json:"group_id"`
438
+ }
0 commit comments