Skip to content

Commit

Permalink
Merge pull request #131 from riyadhalnur/fix/gitlab-mr-assignee
Browse files Browse the repository at this point in the history
FIX: gitlab merge request event assignee payload
  • Loading branch information
Toshik1978 authored May 3, 2021
2 parents e1c6b64 + e55d994 commit ec227ef
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 1 deletion.
3 changes: 3 additions & 0 deletions gitlab/payload.go
Original file line number Diff line number Diff line change
Expand Up @@ -57,6 +57,7 @@ type MergeRequestEventPayload struct {
Project Project `json:"project"`
Repository Repository `json:"repository"`
Labels []Label `json:"labels"`
Assignees []Assignee `json:"assignees"`
}

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

// Assignee contains all of the GitLab assignee information
type Assignee struct {
ID int64 `json:"id"`
Name string `json:"name"`
Username string `json:"username"`
AvatarURL string `json:"avatar_url"`
Email string `json:"email"`
}

// StDiff contains all of the GitLab diff information
Expand Down
11 changes: 10 additions & 1 deletion testdata/gitlab/merge-request-event.json
Original file line number Diff line number Diff line change
Expand Up @@ -136,5 +136,14 @@
"group_id": 41
}]
}
}
},
"assignees": [
{
"id": 6,
"name": "User1",
"username": "user1",
"avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
"email": "[email protected]"
}
]
}

0 comments on commit ec227ef

Please sign in to comment.