@@ -112,7 +112,8 @@ type PipelineEventPayload struct {
112
112
Project Project `json:"project"`
113
113
Commit Commit `json:"commit"`
114
114
ObjectAttributes PipelineObjectAttributes `json:"object_attributes"`
115
- Jobs []Job `json:"jobs"`
115
+ MergeRequest MergeRequest `json:"merge_request"`
116
+ Builds []Build `json:"builds"`
116
117
}
117
118
118
119
// CommentEventPayload contains the information for GitLab's comment event
@@ -153,25 +154,27 @@ type BuildEventPayload struct {
153
154
154
155
// JobEventPayload contains the information for GitLab's Job status change
155
156
type JobEventPayload struct {
156
- ObjectKind string `json:"object_kind"`
157
- Ref string `json:"ref"`
158
- Tag bool `json:"tag"`
159
- BeforeSHA string `json:"before_sha"`
160
- SHA string `json:"sha"`
161
- JobID int64 `json:"Job_id"`
162
- JobName string `json:"Job_name"`
163
- JobStage string `json:"Job_stage"`
164
- JobStatus string `json:"Job_status"`
165
- JobStartedAt customTime `json:"Job_started_at"`
166
- JobFinishedAt customTime `json:"Job_finished_at"`
167
- JobDuration int64 `json:"Job_duration"`
168
- Job bool `json:"Job"`
169
- JobFailureReason string `json:"job_failure_reason"`
170
- ProjectID int64 `json:"project_id"`
171
- ProjectName string `json:"project_name"`
172
- User User `json:"user"`
173
- Commit BuildCommit `json:"commit"`
174
- Repository Repository `json:"repository"`
157
+ ObjectKind string `json:"object_kind"`
158
+ Ref string `json:"ref"`
159
+ Tag bool `json:"tag"`
160
+ BeforeSHA string `json:"before_sha"`
161
+ SHA string `json:"sha"`
162
+ BuildID int64 `json:"build_id"`
163
+ BuildName string `json:"build_name"`
164
+ BuildStage string `json:"build_stage"`
165
+ BuildStatus string `json:"build_status"`
166
+ BuildStartedAt customTime `json:"build_started_at"`
167
+ BuildFinishedAt customTime `json:"build_finished_at"`
168
+ BuildDuration int64 `json:"build_duration"`
169
+ BuildAllowFailure bool `json:"build_allow_failure"`
170
+ BuildFailureReason string `json:"build_failure_reason"`
171
+ PipelineID int64 `json:"pipeline_id"`
172
+ ProjectID int64 `json:"project_id"`
173
+ ProjectName string `json:"project_name"`
174
+ User User `json:"user"`
175
+ Commit BuildCommit `json:"commit"`
176
+ Repository Repository `json:"repository"`
177
+ Runner Runner `json:"runner"`
175
178
}
176
179
177
180
// SystemHookPayload contains the ObjectKind to match with real hook events
@@ -197,8 +200,8 @@ type Issue struct {
197
200
IID int64 `json:"iid"`
198
201
}
199
202
200
- // Job contains all of the GitLab job information
201
- type Job struct {
203
+ // Build contains all of the GitLab Build information
204
+ type Build struct {
202
205
ID int64 `json:"id"`
203
206
Stage string `json:"stage"`
204
207
Name string `json:"name"`
@@ -240,6 +243,7 @@ type Wiki struct {
240
243
type Commit struct {
241
244
ID string `json:"id"`
242
245
Message string `json:"message"`
246
+ Title string `json:"title"`
243
247
Timestamp customTime `json:"timestamp"`
244
248
URL string `json:"url"`
245
249
Author Author `json:"author"`
@@ -304,28 +308,40 @@ type Project struct {
304
308
305
309
// Repository contains all of the GitLab repository information
306
310
type Repository struct {
307
- Name string `json:"name"`
308
- URL string `json:"url"`
309
- Description string `json:"description"`
310
- Homepage string `json:"homepage"`
311
+ Name string `json:"name"`
312
+ URL string `json:"url"`
313
+ Description string `json:"description"`
314
+ Homepage string `json:"homepage"`
315
+ GitSSHURL string `json:"git_ssh_url"`
316
+ GitHTTPURL string `json:"git_http_url"`
317
+ VisibilityLevel int64 `json:"visibility_level"`
311
318
}
312
319
313
320
// ObjectAttributes contains all of the GitLab object attributes information
314
321
type ObjectAttributes struct {
315
322
ID int64 `json:"id"`
316
323
Title string `json:"title"`
324
+ AssigneeIDS []int64 `json:"assignee_ids"`
317
325
AssigneeID int64 `json:"assignee_id"`
318
326
AuthorID int64 `json:"author_id"`
319
327
ProjectID int64 `json:"project_id"`
320
328
CreatedAt customTime `json:"created_at"`
321
329
UpdatedAt customTime `json:"updated_at"`
322
- ChangePosition Position `json:"change_position"`
323
- OriginalPosition Position `json:"original_position"`
330
+ UpdatedByID int64 `json:"updated_by_id"`
331
+ LastEditedAt customTime `json:"last_edited_at"`
332
+ LastEditedByID int64 `json:"last_edited_by_id"`
333
+ RelativePosition int64 `json:"relative_position"`
324
334
Position Position `json:"position"`
325
335
BranchName string `json:"branch_name"`
326
336
Description string `json:"description"`
327
337
MilestoneID int64 `json:"milestone_id"`
328
338
State string `json:"state"`
339
+ StateID int64 `json:"state_id"`
340
+ Confidential bool `json:"confidential"`
341
+ DiscussionLocked bool `json:"discussion_locked"`
342
+ DueDate customTime `json:"due_date"`
343
+ TimeEstimate int64 `json:"time_estimate"`
344
+ TotalTimeSpent int64 `json:"total_time_spent"`
329
345
IID int64 `json:"iid"`
330
346
URL string `json:"url"`
331
347
Action string `json:"action"`
@@ -374,6 +390,13 @@ type PipelineObjectAttributes struct {
374
390
CreatedAt customTime `json:"created_at"`
375
391
FinishedAt customTime `json:"finished_at"`
376
392
Duration int64 `json:"duration"`
393
+ Variables []Variable `json:"variables"`
394
+ }
395
+
396
+ // Variable contains pipeline variables
397
+ type Variable struct {
398
+ Key string `json:"key"`
399
+ Value string `json:"value"`
377
400
}
378
401
379
402
// Position defines a specific location, identified by paths line numbers and
@@ -421,6 +444,7 @@ type MergeRequest struct {
421
444
LastCommit LastCommit `json:"last_commit"`
422
445
WorkInProgress bool `json:"work_in_progress"`
423
446
Assignee Assignee `json:"assignee"`
447
+ URL string `json:"url"`
424
448
}
425
449
426
450
// Assignee contains all of the GitLab assignee information
0 commit comments