Skip to content

Commit ec227ef

Browse files
authored
Merge pull request #131 from riyadhalnur/fix/gitlab-mr-assignee
FIX: gitlab merge request event assignee payload
2 parents e1c6b64 + e55d994 commit ec227ef

File tree

2 files changed

+13
-1
lines changed

2 files changed

+13
-1
lines changed

gitlab/payload.go

+3
Original file line numberDiff line numberDiff line change
@@ -57,6 +57,7 @@ type MergeRequestEventPayload struct {
5757
Project Project `json:"project"`
5858
Repository Repository `json:"repository"`
5959
Labels []Label `json:"labels"`
60+
Assignees []Assignee `json:"assignees"`
6061
}
6162

6263
// PushEventPayload contains the information for GitLab's push event
@@ -449,9 +450,11 @@ type MergeRequest struct {
449450

450451
// Assignee contains all of the GitLab assignee information
451452
type Assignee struct {
453+
ID int64 `json:"id"`
452454
Name string `json:"name"`
453455
Username string `json:"username"`
454456
AvatarURL string `json:"avatar_url"`
457+
Email string `json:"email"`
455458
}
456459

457460
// StDiff contains all of the GitLab diff information

testdata/gitlab/merge-request-event.json

+10-1
Original file line numberDiff line numberDiff line change
@@ -136,5 +136,14 @@
136136
"group_id": 41
137137
}]
138138
}
139-
}
139+
},
140+
"assignees": [
141+
{
142+
"id": 6,
143+
"name": "User1",
144+
"username": "user1",
145+
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
146+
"email": "[email protected]"
147+
}
148+
]
140149
}

0 commit comments

Comments
 (0)