Skip to content

Commit

Permalink
Support parsing Gitlab Note Hook event
Browse files Browse the repository at this point in the history
  • Loading branch information
rutvijmehta-harness committed Jun 15, 2022
1 parent 3ad574a commit b62b9fc
Show file tree
Hide file tree
Showing 6 changed files with 279 additions and 101 deletions.
Original file line number Diff line number Diff line change
@@ -0,0 +1,94 @@
{
"Action": "created",
"Repo": {
"ID": "4861503",
"Namespace": "gitlab-org",
"Name": "hello-world",
"Perm": null,
"Branch": "master",
"Archived": false,
"Private": false,
"Visibility": 0,
"Clone": "https://gitlab.com/gitlab-org/hello-world.git",
"CloneSSH": "git@gitlab.com:gitlab-org/hello-world.git",
"Link": "https://gitlab.com/gitlab-org/hello-world",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
},
"Issue": {
"Number": 1,
"Title": "update readme",
"Body": "update readme",
"Link": "https://gitlab.com/gitlab-org/hello-world",
"Labels": null,
"Closed": false,
"Locked": false,
"Author": {
"Login": "sytses",
"Name": "Sid Sijbrandij",
"Email": "",
"Avatar": "https://secure.gravatar.com/avatar/8c58a0be77ee441bb8f8595b7f1b4e87?s=80\u0026d=identicon",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
},
"PullRequest": {
"Number": 1,
"Title": "update readme",
"Body": "adding build instructions to readme",
"Sha": "c4c79227ed610f1151f05bbc5be33b4f340d39c8",
"Ref": "refs/merge-requests/1/head",
"Source": "feature",
"Target": "master",
"Fork": "",
"Link": "https://gitlab.com/gitlab-org/hello-world",
"Diff": "",
"Closed": false,
"Merged": false,
"Base": {
"Name": "",
"Path": "",
"Sha": ""
},
"Head": {
"Name": "",
"Path": "",
"Sha": ""
},
"Author": {
"Login": "sytses",
"Name": "Sid Sijbrandij",
"Email": "",
"Avatar": "https://secure.gravatar.com/avatar/8c58a0be77ee441bb8f8595b7f1b4e87?s=80\u0026d=identicon",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
},
"Created": "2017-12-10T17:01:11Z",
"Updated": "2017-12-10T17:05:14Z",
"Labels": null
},
"Created": "2017-12-10T17:05:14Z",
"Updated": "2017-12-10T17:05:14Z"
},
"Comment": {
"ID": 50772616,
"Body": "lgtm",
"Author": {
"Login": "sytses",
"Name": "Sid Sijbrandij",
"Email": "",
"Avatar": "https://secure.gravatar.com/avatar/8c58a0be77ee441bb8f8595b7f1b4e87?s=80\u0026d=identicon",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
},
"Created": "2017-12-10T17:05:14Z",
"Updated": "2017-12-10T17:05:14Z"
},
"Sender": {
"Login": "sytses",
"Name": "Sid Sijbrandij",
"Email": "",
"Avatar": "https://secure.gravatar.com/avatar/8c58a0be77ee441bb8f8595b7f1b4e87?s=80\u0026d=identicon",
"Created": "0001-01-01T00:00:00Z",
"Updated": "0001-01-01T00:00:00Z"
}
}
Empty file.
1 change: 1 addition & 0 deletions scm/driver/gitlab/user.go
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,7 @@ func (s *userService) ListEmail(ctx context.Context, opts scm.ListOptions) ([]*s
}

type user struct {
ID int `json:"id"`
Username string `json:"username"`
Name string `json:"name"`
Email null.String `json:"email"`
Expand Down
Loading

0 comments on commit b62b9fc

Please sign in to comment.