Repository: xanzy/go-gitlab
Pull request #1695 (2023-04-12 21:34:36)

Updated MergeEvent


Patch:
diff --git a/event_parsing.go b/event_parsing.go
index 3943aba..3a6868a 100644
--- a/event_parsing.go
+++ b/event_parsing.go
@@ -31,7 +31,6 @@ const (
 	EventConfidentialNote  EventType = "Confidential Note Hook"
 	EventTypeBuild         EventType = "Build Hook"
 	EventTypeDeployment    EventType = "Deployment Hook"
-	EventTypeFeatureFlag   EventType = "Feature Flag Hook"
 	EventTypeIssue         EventType = "Issue Hook"
 	EventTypeJob           EventType = "Job Hook"
 	EventTypeMember        EventType = "Member Hook"
@@ -213,8 +212,6 @@ func ParseWebhook(eventType EventType, payload []byte) (event interface{}, err e
 		event = &BuildEvent{}
 	case EventTypeDeployment:
 		event = &DeploymentEvent{}
-	case EventTypeFeatureFlag:
-		event = &FeatureFlagEvent{}
 	case EventTypeIssue, EventConfidentialIssue:
 		event = &IssueEvent{}
 	case EventTypeJob:
diff --git a/event_webhook_types.go b/event_webhook_types.go
index 882304a..0a19b20 100644
--- a/event_webhook_types.go
+++ b/event_webhook_types.go
@@ -80,11 +80,9 @@ type BuildEvent struct {
 // https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#comment-on-a-commit
 type CommitCommentEvent struct {
 	ObjectKind string `json:"object_kind"`
-	EventType  string `json:"event_type"`
 	User       *User  `json:"user"`
 	ProjectID  int    `json:"project_id"`
 	Project    struct {
-		ID                int             `json:"id"`
 		Name              string          `json:"name"`
 		Description       string          `json:"description"`
 		AvatarURL         string          `json:"avatar_url"`
@@ -114,9 +112,18 @@ type CommitCommentEvent struct {
 		CommitID     string `json:"commit_id"`
 		NoteableID   int    `json:"noteable_id"`
 		System       bool   `json:"system"`
-		StDiff       *Diff  `json:"st_diff"`
-		Description  string `json:"description"`
-		URL          string `json:"url"`
+		StDiff       struct {
+			Diff        string `json:"diff"`
+			NewPath     string `json:"new_path"`
+			OldPath     string `json:"old_path"`
+			AMode       string `json:"a_mode"`
+			BMode       string `json:"b_mode"`
+			NewFile     bool   `json:"new_file"`
+			RenamedFile bool   `json:"renamed_file"`
+			DeletedFile bool   `json:"deleted_file"`
+		} `json:"st_diff"`
+		Description string `json:"description"`
+		URL         string `json:"url"`
 	} `json:"object_attributes"`
 	Commit *struct {
 		ID        string     `json:"id"`
@@ -171,40 +178,6 @@ type DeploymentEvent struct {
 	CommitTitle string     `json:"commit_title"`
 }
 
-// FeatureFlagEvent represents a feature flag event
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#feature-flag-events
-type FeatureFlagEvent struct {
-	ObjectKind string `json:"object_kind"`
-	Project    struct {
-		ID                int     `json:"id"`
-		Name              string  `json:"name"`
-		Description       string  `json:"description"`
-		WebURL            string  `json:"web_url"`
-		AvatarURL         *string `json:"avatar_url"`
-		GitSSHURL         string  `json:"git_ssh_url"`
-		GitHTTPURL        string  `json:"git_http_url"`
-		Namespace         string  `json:"namespace"`
-		VisibilityLevel   int     `json:"visibility_level"`
-		PathWithNamespace string  `json:"path_with_namespace"`
-		DefaultBranch     string  `json:"default_branch"`
-		CIConfigPath      string  `json:"ci_config_path"`
-		Homepage          string  `json:"homepage"`
-		URL               string  `json:"url"`
-		SSHURL            string  `json:"ssh_url"`
-		HTTPURL           string  `json:"http_url"`
-	} `json:"project"`
-	User             *EventUser `json:"user"`
-	UserURL          string     `json:"user_url"`
-	ObjectAttributes struct {
-		ID          int    `json:"id"`
-		Name        string `json:"name"`
-		Description string `json:"description"`
-		Active      bool   `json:"active"`
-	} `json:"object_attributes"`
-}
-
 // IssueCommentEvent represents a comment on an issue event.
 //
 // GitLab API docs:
@@ -282,7 +255,6 @@ type IssueCommentEvent struct {
 // https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#issue-events
 type IssueEvent struct {
 	ObjectKind string     `json:"object_kind"`
-	EventType  string     `json:"event_type"`
 	User       *EventUser `json:"user"`
 	Project    struct {
 		ID                int             `json:"id"`
@@ -303,45 +275,21 @@ type IssueEvent struct {
 	} `json:"project"`
 	Repository       *Repository `json:"repository"`
 	ObjectAttributes struct {
-		ID                  int      `json:"id"`
-		Title               string   `json:"title"`
-		AssigneeIDs         []int    `json:"assignee_ids"`
-		AssigneeID          int      `json:"assignee_id"`
-		AuthorID            int      `json:"author_id"`
-		ProjectID           int      `json:"project_id"`
-		CreatedAt           string   `json:"created_at"` // Should be *time.Time (see Gitlab issue #21468)
-		UpdatedAt           string   `json:"updated_at"` // Should be *time.Time (see Gitlab issue #21468)
-		UpdatedByID         int      `json:"updated_by_id"`
-		LastEditedAt        string   `json:"last_edited_at"`
-		LastEditedByID      int      `json:"last_edited_by_id"`
-		RelativePosition    int      `json:"relative_position"`
-		BranchName          string   `json:"branch_name"`
-		Description         string   `json:"description"`
-		MilestoneID         int      `json:"milestone_id"`
-		StateID             StateID  `json:"state_id"`
-		Confidential        bool     `json:"confidential"`
-		DiscussionLocked    bool     `json:"discussion_locked"`
-		DueDate             *ISOTime `json:"due_date"`
-		MovedToID           int      `json:"moved_to_id"`
-		DuplicatedToID      int      `json:"duplicated_to_id"`
-		TimeEstimate        int      `json:"time_estimate"`
-		TotalTimeSpent      int      `json:"total_time_spent"`
-		TimeChange          int      `json:"time_change"`
-		HumanTotalTimeSpent string   `json:"human_total_time_spent"`
-		HumanTimeEstimate   string   `json:"human_time_estimate"`
-		HumanTimeChange     string   `json:"human_time_change"`
-		Weight              string   `json:"weight"`
-		IID                 int      `json:"iid"`
-		URL                 string   `json:"url"`
-		State               string   `json:"state"`
-		Action              string   `json:"action"`
-		Severity            string   `json:"severity"`
-		EscalationStatus    string   `json:"escalation_status"`
-		EscalationPolicy    struct {
-			ID   int    `json:"id"`
-			Name string `json:"name"`
-		} `json:"escalation_policy"`
-		Labels []*EventLabel `json:"labels"`
+		ID          int    `json:"id"`
+		Title       string `json:"title"`
+		AssigneeID  int    `json:"assignee_id"`
+		AuthorID    int    `json:"author_id"`
+		ProjectID   int    `json:"project_id"`
+		CreatedAt   string `json:"created_at"` // Should be *time.Time (see Gitlab issue #21468)
+		UpdatedAt   string `json:"updated_at"` // Should be *time.Time (see Gitlab issue #21468)
+		Position    int    `json:"position"`
+		BranchName  string `json:"branch_name"`
+		Description string `json:"description"`
+		MilestoneID int    `json:"milestone_id"`
+		State       string `json:"state"`
+		IID         int    `json:"iid"`
+		URL         string `json:"url"`
+		Action      string `json:"action"`
 	} `json:"object_attributes"`
 	Assignee  *EventUser    `json:"assignee"`
 	Assignees *[]EventUser  `json:"assignees"`
@@ -404,9 +352,9 @@ type JobEvent struct {
 	BuildStartedAt      string     `json:"build_started_at"`
 	BuildFinishedAt     string     `json:"build_finished_at"`
 	BuildDuration       float64    `json:"build_duration"`
-	BuildQueuedDuration float64    `json:"build_queued_duration"`
 	BuildAllowFailure   bool       `json:"build_allow_failure"`
 	BuildFailureReason  string     `json:"build_failure_reason"`
+	BuildQueuedDuration float64    `json:"build_queued_duration"`
 	RetriesCount        int        `json:"retries_count"`
 	PipelineID          int        `json:"pipeline_id"`
 	ProjectID           int        `json:"project_id"`
@@ -427,14 +375,11 @@ type JobEvent struct {
 	} `json:"commit"`
 	Repository *Repository `json:"repository"`
 	Runner     struct {
-		ID          int      `json:"id"`
-		Active      bool     `json:"active"`
-		RunnerType  string   `json:"runner_type"`
-		IsShared    bool     `json:"is_shared"`
-		Description string   `json:"description"`
-		Tags        []string `json:"tags"`
+		ID          int    `json:"id"`
+		Active      bool   `json:"active"`
+		Shared      bool   `json:"is_shared"`
+		Description string `json:"description"`
 	} `json:"runner"`
-	Environment string `json:"environment"`
 }
 
 // MemberEvent represents a member event.
@@ -463,11 +408,9 @@ type MemberEvent struct {
 // https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#comment-on-a-merge-request
 type MergeCommentEvent struct {
 	ObjectKind string     `json:"object_kind"`
-	EventType  string     `json:"event_type"`
 	User       *EventUser `json:"user"`
 	ProjectID  int        `json:"project_id"`
 	Project    struct {
-		ID                int             `json:"id"`
 		Name              string          `json:"name"`
 		Description       string          `json:"description"`
 		AvatarURL         string          `json:"avatar_url"`
@@ -511,42 +454,41 @@ type MergeCommentEvent struct {
 	} `json:"object_attributes"`
 	Repository   *Repository `json:"repository"`
 	MergeRequest struct {
-		ID                        int           `json:"id"`
-		TargetBranch              string        `json:"target_branch"`
-		SourceBranch              string        `json:"source_branch"`
-		SourceProjectID           int           `json:"source_project_id"`
-		AuthorID                  int           `json:"author_id"`
-		AssigneeID                int           `json:"assignee_id"`
-		AssigneeIDs               []int         `json:"assignee_ids"`
-		Title                     string        `json:"title"`
-		CreatedAt                 string        `json:"created_at"`
-		UpdatedAt                 string        `json:"updated_at"`
-		MilestoneID               int           `json:"milestone_id"`
-		State                     string        `json:"state"`
-		MergeStatus               string        `json:"merge_status"`
-		TargetProjectID           int           `json:"target_project_id"`
-		IID                       int           `json:"iid"`
-		Description               string        `json:"description"`
-		Position                  int           `json:"position"`
-		Labels                    []*EventLabel `json:"labels"`
-		LockedAt                  string        `json:"locked_at"`
-		UpdatedByID               int           `json:"updated_by_id"`
-		MergeError                string        `json:"merge_error"`
-		MergeParams               *MergeParams  `json:"merge_params"`
-		MergeWhenPipelineSucceeds bool          `json:"merge_when_pipeline_succeeds"`
-		MergeUserID               int           `json:"merge_user_id"`
-		MergeCommitSHA            string        `json:"merge_commit_sha"`
-		DeletedAt                 string        `json:"deleted_at"`
-		InProgressMergeCommitSHA  string        `json:"in_progress_merge_commit_sha"`
-		LockVersion               int           `json:"lock_version"`
-		ApprovalsBeforeMerge      string        `json:"approvals_before_merge"`
-		RebaseCommitSHA           string        `json:"rebase_commit_sha"`
-		TimeEstimate              int           `json:"time_estimate"`
-		Squash                    bool          `json:"squash"`
-		LastEditedAt              string        `json:"last_edited_at"`
-		LastEditedByID            int           `json:"last_edited_by_id"`
-		Source                    *Repository   `json:"source"`
-		Target                    *Repository   `json:"target"`
+		ID                        int          `json:"id"`
+		TargetBranch              string       `json:"target_branch"`
+		SourceBranch              string       `json:"source_branch"`
+		SourceProjectID           int          `json:"source_project_id"`
+		AuthorID                  int          `json:"author_id"`
+		AssigneeID                int          `json:"assignee_id"`
+		AssigneeIDs               []int        `json:"assignee_ids"`
+		Title                     string       `json:"title"`
+		CreatedAt                 string       `json:"created_at"`
+		UpdatedAt                 string       `json:"updated_at"`
+		MilestoneID               int          `json:"milestone_id"`
+		State                     string       `json:"state"`
+		MergeStatus               string       `json:"merge_status"`
+		TargetProjectID           int          `json:"target_project_id"`
+		IID                       int          `json:"iid"`
+		Description               string       `json:"description"`
+		Position                  int          `json:"position"`
+		LockedAt                  string       `json:"locked_at"`
+		UpdatedByID               int          `json:"updated_by_id"`
+		MergeError                string       `json:"merge_error"`
+		MergeParams               *MergeParams `json:"merge_params"`
+		MergeWhenPipelineSucceeds bool         `json:"merge_when_pipeline_succeeds"`
+		MergeUserID               int          `json:"merge_user_id"`
+		MergeCommitSHA            string       `json:"merge_commit_sha"`
+		DeletedAt                 string       `json:"deleted_at"`
+		InProgressMergeCommitSHA  string       `json:"in_progress_merge_commit_sha"`
+		LockVersion               int          `json:"lock_version"`
+		ApprovalsBeforeMerge      string       `json:"approvals_before_merge"`
+		RebaseCommitSHA           string       `json:"rebase_commit_sha"`
+		TimeEstimate              int          `json:"time_estimate"`
+		Squash                    bool         `json:"squash"`
+		LastEditedAt              string       `json:"last_edited_at"`
+		LastEditedByID            int          `json:"last_edited_by_id"`
+		Source                    *Repository  `json:"source"`
+		Target                    *Repository  `json:"target"`
 		LastCommit                struct {
 			ID        string     `json:"id"`
 			Title     string     `json:"title"`
@@ -558,11 +500,9 @@ type MergeCommentEvent struct {
 				Email string `json:"email"`
 			} `json:"author"`
 		} `json:"last_commit"`
-		WorkInProgress      bool       `json:"work_in_progress"`
-		TotalTimeSpent      int        `json:"total_time_spent"`
-		HeadPipelineID      int        `json:"head_pipeline_id"`
-		Assignee            *EventUser `json:"assignee"`
-		DetailedMergeStatus string     `json:"detailed_merge_status"`
+		WorkInProgress bool `json:"work_in_progress"`
+		TotalTimeSpent int  `json:"total_time_spent"`
+		HeadPipelineID int  `json:"head_pipeline_id"`
 	} `json:"merge_request"`
 }
 
@@ -572,6 +512,7 @@ type MergeCommentEvent struct {
 // https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#merge-request-events
 type MergeEvent struct {
 	ObjectKind string     `json:"object_kind"`
+	EventType  string     `json:"event_type"`
 	User       *EventUser `json:"user"`
 	Project    struct {
 		ID                int             `json:"id"`
@@ -583,6 +524,7 @@ type MergeEvent struct {
 		Namespace         string          `json:"namespace"`
 		PathWithNamespace string          `json:"path_with_namespace"`
 		DefaultBranch     string          `json:"default_branch"`
+		CIConfigPath      string          `json:"ci_config_path"`
 		Homepage          string          `json:"homepage"`
 		URL               string          `json:"url"`
 		SSHURL            string          `json:"ssh_url"`
@@ -604,7 +546,10 @@ type MergeEvent struct {
 		UpdatedAt                string       `json:"updated_at"` // Should be *time.Time (see Gitlab issue #21468)
 		StCommits                []*Commit    `json:"st_commits"`
 		StDiffs                  []*Diff      `json:"st_diffs"`
+		LastEditedAt             string       `json:"last_edited_at"`
+		LastEditedByID           int          `json:"last_edited_by_id"`
 		MilestoneID              int          `json:"milestone_id"`
+		StateID                  StateID      `json:"state_id"`
 		State                    string       `json:"state"`
 		MergeStatus              string       `json:"merge_status"`
 		TargetProjectID          int          `json:"target_project_id"`
@@ -630,6 +575,7 @@ type MergeEvent struct {
 		LastCommit               struct {
 			ID        string     `json:"id"`
 			Message   string     `json:"message"`
+			Title     string     `json:"title"`
 			Timestamp *time.Time `json:"timestamp"`
 			URL       string     `json:"url"`
 			Author    struct {
@@ -639,18 +585,19 @@ type MergeEvent struct {
 		} `json:"last_commit"`
 		BlockingDiscussionsResolved bool          `json:"blocking_discussions_resolved"`
 		WorkInProgress              bool          `json:"work_in_progress"`
+		TotalTimeSpent              int           `json:"total_time_spent"`
+		TimeChange                  int           `json:"time_change"`
+		HumanTotalTimeSpent         string        `json:"human_total_time_spent"`
+		HumanTimeChange             string        `json:"human_time_change"`
+		HumanTimeEstimate           string        `json:"human_time_estimate"`
 		FirstContribution           bool          `json:"first_contribution"`
 		URL                         string        `json:"url"`
 		Labels                      []*EventLabel `json:"labels"`
 		Action                      string        `json:"action"`
 		DetailedMergeStatus         string        `json:"detailed_merge_status"`
 		OldRev                      string        `json:"oldrev"`
-		Assignee                    *EventUser    `json:"assignee"`
 	} `json:"object_attributes"`
 	Repository *Repository   `json:"repository"`
-	Assignee   *EventUser    `json:"assignee"`
-	Assignees  []*EventUser  `json:"assignees"`
-	Reviewers  []*EventUser  `json:"reviewers"`
 	Labels     []*EventLabel `json:"labels"`
 	Changes    struct {
 		Assignees struct {
@@ -669,6 +616,18 @@ type MergeEvent struct {
 			Previous []*EventLabel `json:"previous"`
 			Current  []*EventLabel `json:"current"`
 		} `json:"labels"`
+		LastEditedAt struct {
+			Previous string `json:"previous"`
+			Current  string `json:"current"`
+		} `json:"last_edited_at"`
+		LastEditedByID struct {
+			Previous int `json:"previous"`
+			Current  int `json:"current"`
+		} `json:"last_edited_by_id"`
+		MilestoneID struct {
+			Previous int `json:"previous"`
+			Current  int `json:"current"`
+		} `json:"milestone_id"`
 		SourceBranch struct {
 			Previous string `json:"previous"`
 			Current  string `json:"current"`
@@ -701,11 +660,9 @@ type MergeEvent struct {
 			Previous int `json:"previous"`
 			Current  int `json:"current"`
 		} `json:"updated_by_id"`
-		MilestoneID struct {
-			Previous int `json:"previous"`
-			Current  int `json:"current"`
-		} `json:"milestone_id"`
 	} `json:"changes"`
+	Assignees []*EventUser `json:"assignees"`
+	Reviewers []*EventUser `json:"reviewers"`
 }
 
 // EventUser represents a user record in an event and is used as an even initiator or a merge assignee.
@@ -782,17 +739,16 @@ type PipelineEvent struct {
 		} `json:"variables"`
 	} `json:"object_attributes"`
 	MergeRequest struct {
-		ID                  int    `json:"id"`
-		IID                 int    `json:"iid"`
-		Title               string `json:"title"`
-		SourceBranch        string `json:"source_branch"`
-		SourceProjectID     int    `json:"source_project_id"`
-		TargetBranch        string `json:"target_branch"`
-		TargetProjectID     int    `json:"target_project_id"`
-		State               string `json:"state"`
-		MergeRequestStatus  string `json:"merge_status"`
-		DetailedMergeStatus string `json:"detailed_merge_status"`
-		URL                 string `json:"url"`
+		ID                 int    `json:"id"`
+		IID                int    `json:"iid"`
+		Title              string `json:"title"`
+		SourceBranch       string `json:"source_branch"`
+		SourceProjectID    int    `json:"source_project_id"`
+		TargetBranch       string `json:"target_branch"`
+		TargetProjectID    int    `json:"target_project_id"`
+		State              string `json:"state"`
+		MergeRequestStatus string `json:"merge_status"`
+		URL                string `json:"url"`
 	} `json:"merge_request"`
 	User    *EventUser `json:"user"`
 	Project struct {
@@ -873,7 +829,6 @@ type PipelineEvent struct {
 // https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#push-events
 type PushEvent struct {
 	ObjectKind   string `json:"object_kind"`
-	EventName    string `json:"event_name"`
 	Before       string `json:"before"`
 	After        string `json:"after"`
 	Ref          string `json:"ref"`
@@ -885,7 +840,6 @@ type PushEvent struct {
 	UserAvatar   string `json:"user_avatar"`
 	ProjectID    int    `json:"project_id"`
 	Project      struct {
-		ID                int             `json:"id"`
 		Name              string          `json:"name"`
 		Description       string          `json:"description"`
 		AvatarURL         string          `json:"avatar_url"`
@@ -984,7 +938,6 @@ type ReleaseEvent struct {
 // https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#comment-on-a-code-snippet
 type SnippetCommentEvent struct {
 	ObjectKind string     `json:"object_kind"`
-	EventType  string     `json:"event_type"`
 	User       *EventUser `json:"user"`
 	ProjectID  int        `json:"project_id"`
 	Project    struct {
@@ -1063,7 +1016,6 @@ type SubGroupEvent struct {
 // https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#tag-events
 type TagEvent struct {
 	ObjectKind   string `json:"object_kind"`
-	EventName    string `json:"event_name"`
 	Before       string `json:"before"`
 	After        string `json:"after"`
 	Ref          string `json:"ref"`
@@ -1076,7 +1028,6 @@ type TagEvent struct {
 	ProjectID    int    `json:"project_id"`
 	Message      string `json:"message"`
 	Project      struct {
-		ID                int             `json:"id"`
 		Name              string          `json:"name"`
 		Description       string          `json:"description"`
 		AvatarURL         string          `json:"avatar_url"`
@@ -1148,7 +1099,6 @@ type WikiPageEvent struct {
 		Slug    string `json:"slug"`
 		URL     string `json:"url"`
 		Action  string `json:"action"`
-		DiffURL string `json:"diff_url"`
 	} `json:"object_attributes"`
 }
 
diff --git a/pipelines.go b/pipelines.go
index df77edf..d49261f 100644
--- a/pipelines.go
+++ b/pipelines.go
@@ -87,44 +87,38 @@ func (p Pipeline) String() string {
 
 // PipelineTestReport contains a detailed report of a test run.
 type PipelineTestReport struct {
-	TotalTime    float64               `json:"total_time"`
-	TotalCount   int                   `json:"total_count"`
-	SuccessCount int                   `json:"success_count"`
-	FailedCount  int                   `json:"failed_count"`
-	SkippedCount int                   `json:"skipped_count"`
-	ErrorCount   int                   `json:"error_count"`
-	TestSuites   []*PipelineTestSuites `json:"test_suites"`
-}
-
-// PipelineTestSuites contains test suites results.
-type PipelineTestSuites struct {
-	Name         string               `json:"name"`
 	TotalTime    float64              `json:"total_time"`
 	TotalCount   int                  `json:"total_count"`
 	SuccessCount int                  `json:"success_count"`
 	FailedCount  int                  `json:"failed_count"`
 	SkippedCount int                  `json:"skipped_count"`
 	ErrorCount   int                  `json:"error_count"`
-	TestCases    []*PipelineTestCases `json:"test_cases"`
+	TestSuites   []PipelineTestSuites `json:"test_suites"`
 }
 
-// PipelineTestCases contains test cases details.
-type PipelineTestCases struct {
-	Status         string          `json:"status"`
-	Name           string          `json:"name"`
-	Classname      string          `json:"classname"`
-	File           string          `json:"file"`
-	ExecutionTime  float64         `json:"execution_time"`
-	SystemOutput   *SystemOutput   `json:"system_output"`
-	StackTrace     string          `json:"stack_trace"`
-	AttachmentURL  string          `json:"attachment_url"`
-	RecentFailures *RecentFailures `json:"recent_failures"`
+// PipelineTestSuites contains test suites results.
+type PipelineTestSuites struct {
+	Name         string              `json:"name"`
+	TotalTime    float64             `json:"total_time"`
+	TotalCount   int                 `json:"total_count"`
+	SuccessCount int                 `json:"success_count"`
+	FailedCount  int                 `json:"failed_count"`
+	SkippedCount int                 `json:"skipped_count"`
+	ErrorCount   int                 `json:"error_count"`
+	TestCases    []PipelineTestCases `json:"test_cases"`
 }
 
-// SystemOutput contains information about test cases when it fails.
-type SystemOutput struct {
-	Type    string `json:"type"`
-	Message string `json:"message"`
+// PipelineTestCases contains test cases details.
+type PipelineTestCases struct {
+	Status         string         `json:"status"`
+	Name           string         `json:"name"`
+	Classname      string         `json:"classname"`
+	File           string         `json:"file"`
+	ExecutionTime  float64        `json:"execution_time"`
+	SystemOutput   string         `json:"system_output"`
+	StackTrace     string         `json:"stack_trace"`
+	AttachmentURL  string         `json:"attachment_url"`
+	RecentFailures RecentFailures `json:"recent_failures"`
 }
 
 // RecentFailures contains failures count for the project's default branch.


Test patch:
diff --git a/.github/workflows/lint_and_test.yml b/.github/workflows/lint_and_test.yml
index 51a9892..6e63834 100644
--- a/.github/workflows/lint_and_test.yml
+++ b/.github/workflows/lint_and_test.yml
@@ -13,12 +13,12 @@ jobs:
     name: Lint and Test - ${{ matrix.go-version }}
     strategy:
       matrix:
-        go-version: [1.19.x, 1.20.x, 1.x]
+        go-version: [1.18.x, 1.19.x, 1.x]
         platform: [ubuntu-latest]
     runs-on: ${{ matrix.platform }}
     steps:
       - name: Install Go
-        uses: actions/setup-go@v4
+        uses: actions/setup-go@v3
         with:
           go-version: ${{ matrix.go-version }}
 
@@ -28,7 +28,6 @@ jobs:
       - name: Lint package
         uses: golangci/golangci-lint-action@v3
         with:
-          args: --exclude ".*, make it a constant (goconst)"
           version: latest
 
       - name: Test package
diff --git a/event_parsing_webhook_test.go b/event_parsing_webhook_test.go
index c9d6b9d..f63db48 100644
--- a/event_parsing_webhook_test.go
+++ b/event_parsing_webhook_test.go
@@ -101,52 +101,6 @@ func TestParseCommitCommentHook(t *testing.T) {
 	}
 }
 
-func TestParseFeatureFLagHook(t *testing.T) {
-	raw := loadFixture("testdata/webhooks/feature_flag.json")
-
-	parsedEvent, err := ParseWebhook("Feature Flag Hook", raw)
-	if err != nil {
-		t.Errorf("Error parsing feature flag hook: %s", err)
-	}
-
-	event, ok := parsedEvent.(*FeatureFlagEvent)
-	if !ok {
-		t.Errorf("Expected FeatureFlagEvent, but parsing produced %T", parsedEvent)
-	}
-
-	if event.ObjectKind != "feature_flag" {
-		t.Errorf("ObjectKind is %s, want %s", event.ObjectKind, "feature_flag")
-	}
-
-	if event.Project.ID != 1 {
-		t.Errorf("Project.ID is %v, want %v", event.Project.ID, 1)
-	}
-
-	if event.User.ID != 1 {
-		t.Errorf("User ID is %d, want %d", event.User.ID, 1)
-	}
-
-	if event.User.Name != "Administrator" {
-		t.Errorf("Username is %s, want %s", event.User.Name, "Administrator")
-	}
-
-	if event.ObjectAttributes.ID != 6 {
-		t.Errorf("ObjectAttributes.ID is %d, want %d", event.ObjectAttributes.ID, 6)
-	}
-
-	if event.ObjectAttributes.Name != "test-feature-flag" {
-		t.Errorf("ObjectAttributes.Name is %s, want %s", event.ObjectAttributes.Name, "test-feature-flag")
-	}
-
-	if event.ObjectAttributes.Description != "test-feature-flag-description" {
-		t.Errorf("ObjectAttributes.Description is %s, want %s", event.ObjectAttributes.Description, "test-feature-flag-description")
-	}
-
-	if event.ObjectAttributes.Active != true {
-		t.Errorf("ObjectAttributes.Active is %t, want %t", event.ObjectAttributes.Active, true)
-	}
-}
-
 func TestParseHookWebHook(t *testing.T) {
 	parsedEvent1, err := ParseHook("Merge Request Hook", loadFixture("testdata/webhooks/merge_request.json"))
 	if err != nil {
diff --git a/event_webhook_types_test.go b/event_webhook_types_test.go
index c696865..d432d99 100644
--- a/event_webhook_types_test.go
+++ b/event_webhook_types_test.go
@@ -64,48 +64,6 @@ func TestBuildEventUnmarshal(t *testing.T) {
 	}
 }
 
-func TestCommitCommentEventUnmarshal(t *testing.T) {
-	jsonObject := loadFixture("testdata/webhooks/note_commit.json")
-
-	var event *CommitCommentEvent
-	err := json.Unmarshal(jsonObject, &event)
-	if err != nil {
-		t.Errorf("Commit Comment Event can not unmarshaled: %v\n ", err.Error())
-	}
-
-	if event == nil {
-		t.Errorf("Commit Comment Event is null")
-	}
-
-	if event.ObjectKind != string(NoteEventTargetType) {
-		t.Errorf("ObjectKind is %v, want %v", event.ObjectKind, NoteEventTargetType)
-	}
-
-	if event.EventType != "note" {
-		t.Errorf("EventType is %v, want %v", event.EventType, "note")
-	}
-
-	if event.ProjectID != 5 {
-		t.Errorf("ProjectID is %v, want %v", event.ProjectID, 5)
-	}
-
-	if event.User.ID != 42 {
-		t.Errorf("User ID is %d, want %d", event.User.ID, 42)
-	}
-
-	if event.Repository.Name != "Gitlab Test" {
-		t.Errorf("Repository name is %v, want %v", event.Repository.Name, "Gitlab Test")
-	}
-
-	if event.ObjectAttributes.NoteableType != "Commit" {
-		t.Errorf("NoteableType is %v, want %v", event.ObjectAttributes.NoteableType, "Commit")
-	}
-
-	if event.Commit.Title != "Add submodule" {
-		t.Errorf("Issue title is %v, want %v", event.Commit.Title, "Add submodule")
-	}
-}
-
 func TestJobEventUnmarshal(t *testing.T) {
 	jsonObject := loadFixture("testdata/webhooks/job.json")
 
@@ -133,9 +91,9 @@ func TestJobEventUnmarshal(t *testing.T) {
 		BuildStartedAt:      "2023-01-10 13:50:05 UTC",
 		BuildFinishedAt:     "2023-01-10 13:50:54 UTC",
 		BuildDuration:       49.503592,
-		BuildQueuedDuration: 0.193009,
 		BuildAllowFailure:   false,
 		BuildFailureReason:  "unknown_failure",
+		BuildQueuedDuration: 0.193009,
 		RetriesCount:        1,
 		PipelineID:          743121198,
 		ProjectID:           31537070,
@@ -177,13 +135,9 @@ func TestJobEventUnmarshal(t *testing.T) {
 	expectedEvent.Commit.FinishedAt = "2022-10-12 08:09:29 UTC"
 
 	expectedEvent.Runner.ID = 12270837
-	expectedEvent.Runner.Description = "4-blue.shared.runners-manager.gitlab.com/default"
-	expectedEvent.Runner.RunnerType = "instance_type"
 	expectedEvent.Runner.Active = true
-	expectedEvent.Runner.IsShared = true
-	expectedEvent.Runner.Tags = []string{"linux", "docker"}
-
-	expectedEvent.Environment = "staging"
+	expectedEvent.Runner.Shared = true
+	expectedEvent.Runner.Description = "4-blue.shared.runners-manager.gitlab.com/default"
 
 	assert.Equal(t, expectedEvent, *event, "event should be equal to the expected one")
 }
@@ -238,52 +192,6 @@ func TestDeploymentEventUnmarshal(t *testing.T) {
 	}
 }
 
-func TestFeatureFlagEventUnmarshal(t *testing.T) {
-	jsonObject := loadFixture("testdata/webhooks/feature_flag.json")
-
-	var event *FeatureFlagEvent
-	err := json.Unmarshal(jsonObject, &event)
-	if err != nil {
-		t.Errorf("FeatureFlag Event can not unmarshaled: %v\n ", err.Error())
-	}
-
-	if event == nil {
-		t.Errorf("FeatureFlag Event is null")
-	}
-
-	if event.ObjectKind != "feature_flag" {
-		t.Errorf("ObjectKind is %s, want %s", event.ObjectKind, "feature_flag")
-	}
-
-	if event.Project.ID != 1 {
-		t.Errorf("Project.ID is %v, want %v", event.Project.ID, 1)
-	}
-
-	if event.User.ID != 1 {
-		t.Errorf("User ID is %d, want %d", event.User.ID, 1)
-	}
-
-	if event.User.Name != "Administrator" {
-		t.Errorf("Username is %s, want %s", event.User.Name, "Administrator")
-	}
-
-	if event.ObjectAttributes.ID != 6 {
-		t.Errorf("ObjectAttributes.ID is %d, want %d", event.ObjectAttributes.ID, 6)
-	}
-
-	if event.ObjectAttributes.Name != "test-feature-flag" {
-		t.Errorf("ObjectAttributes.Name is %s, want %s", event.ObjectAttributes.Name, "test-feature-flag")
-	}
-
-	if event.ObjectAttributes.Description != "test-feature-flag-description" {
-		t.Errorf("ObjectAttributes.Description is %s, want %s", event.ObjectAttributes.Description, "test-feature-flag-description")
-	}
-
-	if event.ObjectAttributes.Active != true {
-		t.Errorf("ObjectAttributes.Active is %t, want %t", event.ObjectAttributes.Active, true)
-	}
-}
-
 func TestIssueCommentEventUnmarshal(t *testing.T) {
 	jsonObject := loadFixture("testdata/webhooks/note_issue.json")
 
@@ -354,61 +262,18 @@ func TestIssueEventUnmarshal(t *testing.T) {
 		t.Errorf("Issue Event can not unmarshaled: %v\n ", err.Error())
 	}
 
-	if event.ObjectKind != string(IssueEventTargetType) {
-		t.Errorf("ObjectKind is %v, want %v", event.ObjectKind, IssueEventTargetType)
-	}
-
-	if event.EventType != "issue" {
-		t.Errorf("EventType is %v, want %v", event.EventType, "issue")
-	}
-
 	if event.Project.ID != 1 {
 		t.Errorf("Project.ID is %v, want %v", event.Project.ID, 1)
 	}
 
-	if event.User.ID != 1 {
-		t.Errorf("User ID is %d, want %d", event.User.ID, 1)
+	if event.User.ID != 42 {
+		t.Errorf("User ID is %d, want %d", event.User.ID, 42)
 	}
 
 	if event.Assignee.Username != "user1" {
 		t.Errorf("Assignee username is %s, want %s", event.Assignee.Username, "user1")
 	}
 
-	if event.ObjectAttributes.ID != 301 {
-		t.Errorf("ObjectAttributes.ID is %v, want %v", event.ObjectAttributes.ID, 301)
-	}
-
-	if event.ObjectAttributes.Title != "New API: create/update/delete file" {
-		t.Errorf("ObjectAttributes.Title is %v, want %v", event.ObjectAttributes.Title, "New API: create/update/delete file")
-	}
-
-	if event.ObjectAttributes.StateID != StateIDOpen {
-		t.Errorf("ObjectAttributes.StateID is %v, want %v", event.ObjectAttributes.StateID, StateIDOpen)
-	}
-
-	if event.ObjectAttributes.State != "opened" {
-		t.Errorf("ObjectAttributes.State is %v, want %v", event.ObjectAttributes.State, "opened")
-	}
-	if event.ObjectAttributes.Confidential != false {
-		t.Errorf("ObjectAttributes.Confidential is %v, want %v", event.ObjectAttributes.Confidential, false)
-	}
-
-	if event.ObjectAttributes.TotalTimeSpent != 0 {
-		t.Errorf("ObjectAttributes.TotalTimeSpent is %v, want %v", event.ObjectAttributes.TotalTimeSpent, 0)
-	}
-
-	if event.ObjectAttributes.Action != "open" {
-		t.Errorf("ObjectAttributes.Action is %v, want %v", event.ObjectAttributes.Action, "open")
-	}
-
-	if event.ObjectAttributes.EscalationStatus != "triggered" {
-		t.Errorf("ObjectAttributes.EscalationStatus is %v, want %v", event.ObjectAttributes.EscalationStatus, "triggered")
-	}
-
-	if event.ObjectAttributes.EscalationPolicy.ID != 18 {
-		t.Errorf("ObjectAttributes.EscalationPolicy.ID is %v, want %v", event.ObjectAttributes.EscalationPolicy.ID, 18)
-	}
-
 	if event.Changes.TotalTimeSpent.Previous != 8100 {
 		t.Errorf("Changes.TotalTimeSpent.Previous is %v , want %v", event.Changes.TotalTimeSpent.Previous, 8100)
 	}
@@ -465,156 +330,66 @@ func TestIssueEventUnmarshal(t *testing.T) {
 	assert.Equal(t, "2017-09-15 16:54:55 UTC", event.Changes.ClosedAt.Previous)
 	assert.Equal(t, "2017-09-15 16:56:00 UTC", event.Changes.ClosedAt.Current)
 
-	assert.Equal(t, StateIDNone, event.Changes.StateID.Previous)
-	assert.Equal(t, StateIDOpen, event.Changes.StateID.Current)
+	assert.Equal(t, StateIDOpen, event.Changes.StateID.Previous)
+	assert.Equal(t, StateIDClosed, event.Changes.StateID.Current)
 
 	assert.Equal(t, "2017-09-15 16:50:55 UTC", event.Changes.UpdatedAt.Previous)
 	assert.Equal(t, "2017-09-15 16:52:00 UTC", event.Changes.UpdatedAt.Current)
 }
 
-// Generate unit test for MergeCommentEvent
-func TestMergeCommentEventUnmarshal(t *testing.T) {
-	jsonObject := loadFixture("testdata/webhooks/note_merge_request.json")
+func TestMergeEventUnmarshal(t *testing.T) {
+	jsonObject := loadFixture("testdata/webhooks/merge_request.json")
 
-	var event *MergeCommentEvent
+	var event *MergeEvent
 	err := json.Unmarshal(jsonObject, &event)
 	if err != nil {
-		t.Errorf("Merge Comment Event can not unmarshaled: %v\n ", err.Error())
+		t.Errorf("Merge Event can not unmarshaled: %v\n ", err.Error())
 	}
 
 	if event == nil {
-		t.Errorf("Merge Comment Event is null")
-	}
-
-	if event.ObjectAttributes.ID != 1244 {
-		t.Errorf("ObjectAttributes.ID is %v, want %v", event.ObjectAttributes.ID, 1244)
-	}
-
-	if event.ObjectAttributes.Note != "This MR needs work." {
-		t.Errorf("ObjectAttributes.Note is %v, want %v", event.ObjectAttributes.Note, "This MR needs work.")
-	}
-
-	if event.ObjectAttributes.NoteableType != "MergeRequest" {
-		t.Errorf("ObjectAttributes.NoteableType is %v, want %v", event.ObjectAttributes.NoteableType, "MergeRequest")
-	}
-
-	if event.ObjectAttributes.AuthorID != 1 {
-		t.Errorf("ObjectAttributes.AuthorID is %v, want %v", event.ObjectAttributes.AuthorID, 1)
-	}
-
-	if event.ObjectAttributes.CreatedAt != "2015-05-17 18:21:36 UTC" {
-		t.Errorf("ObjectAttributes.CreatedAt is %v, want %v", event.ObjectAttributes.CreatedAt, "2015-05-17 18:21:36 UTC")
-	}
-
-	if event.ObjectAttributes.UpdatedAt != "2015-05-17 18:21:36 UTC" {
-		t.Errorf("ObjectAttributes.UpdatedAt is %v, want %v", event.ObjectAttributes.UpdatedAt, "2015-05-17 18:21:36 UTC")
-	}
-
-	if event.ObjectAttributes.ProjectID != 5 {
-		t.Errorf("ObjectAttributes.ProjectID is %v, want %v", event.ObjectAttributes.ProjectID, 5)
-	}
-
-	if event.MergeRequest.ID != 7 {
-		t.Errorf("MergeRequest.ID is %v, want %v", event.MergeRequest.ID, 7)
-	}
-
-	if event.MergeRequest.TargetBranch != "markdown" {
-		t.Errorf("MergeRequest.TargetBranch is %v, want %v", event.MergeRequest.TargetBranch, "markdown")
-	}
-
-	// generate test code for rest of the event.MergeRequest fields
-	if event.MergeRequest.SourceBranch != "master" {
-		t.Errorf("MergeRequest.SourceBranch is %v, want %v", event.MergeRequest.SourceBranch, "ms-viewport")
-	}
-
-	if event.MergeRequest.SourceProjectID != 5 {
-		t.Errorf("MergeRequest.SourceProjectID is %v, want %v", event.MergeRequest.SourceProjectID, 5)
+		t.Errorf("Merge Event is null")
 	}
 
-	if event.MergeRequest.AuthorID != 8 {
-		t.Errorf("MergeRequest.AuthorID is %v, want %v", event.MergeRequest.AuthorID, 8)
+	if event.EventType != "merge_request" {
+		t.Errorf("EventType is %v, want %v", event.EventType, "merge_request")
 	}
 
-	if event.MergeRequest.AssigneeID != 28 {
-		t.Errorf("MergeRequest.AssigneeID is %v, want %v", event.MergeRequest.AssigneeID, 28)
+	if event.Project.CIConfigPath != "" {
+		t.Errorf("Project.CIConfigPath is %v, want %v", event.Project.CIConfigPath, "")
 	}
 
-	if event.MergeRequest.State != "opened" {
-		t.Errorf("MergeRequest.state is %v, want %v", event.MergeRequest.State, "opened")
+	if event.ObjectAttributes.ID != 99 {
+		t.Errorf("ObjectAttributes.ID is %v, want %v", event.ObjectAttributes.ID, 99)
 	}
 
-	if event.MergeRequest.MergeStatus != "cannot_be_merged" {
-		t.Errorf("MergeRequest.merge_status is %v, want %v", event.MergeRequest.MergeStatus, "cannot_be_merged")
+	if event.ObjectAttributes.Source.Homepage != "http://example.com/awesome_space/awesome_project" {
+		t.Errorf("ObjectAttributes.Source.Homepage is %v, want %v", event.ObjectAttributes.Source.Homepage, "http://example.com/awesome_space/awesome_project")
 	}
 
-	if event.MergeRequest.TargetProjectID != 5 {
-		t.Errorf("MergeRequest.target_project_id is %v, want %v", event.MergeRequest.TargetProjectID, 5)
+	if event.ObjectAttributes.LastCommit.ID != "da1560886d4f094c3e6c9ef40349f7d38b5d27d7" {
+		t.Errorf("ObjectAttributes.LastCommit.ID is %v, want %s", event.ObjectAttributes.LastCommit.ID, "da1560886d4f094c3e6c9ef40349f7d38b5d27d7")
 	}
 
-	assert.Equal(t, []*EventLabel{
-		{
-			ID:          206,
-			Title:       "Afterpod",
-			Color:       "#3e8068",
-			ProjectID:   0,
-			CreatedAt:   "2019-06-05T14:32:20.211Z",
-			UpdatedAt:   "2019-06-05T14:32:20.211Z",
-			Template:    false,
-			Description: "",
-			Type:        "GroupLabel",
-			GroupID:     4,
-		},
-		{
-			ID:          86,
-			Title:       "Element",
-			Color:       "#231afe",
-			ProjectID:   4,
-			CreatedAt:   "2019-06-05T14:32:20.637Z",
-			UpdatedAt:   "2019-06-05T14:32:20.637Z",
-			Template:    false,
-			Description: "",
-			Type:        "ProjectLabel",
-			GroupID:     0,
-		},
-	}, event.MergeRequest.Labels)
-
-	assert.Equal(t, &EventUser{
-		ID:        0,
-		Name:      "User1",
-		Username:  "user1",
-		AvatarURL: "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
-		Email:     "",
-	}, event.MergeRequest.Assignee)
-
-	if event.MergeRequest.DetailedMergeStatus != "checking" {
-		t.Errorf("MergeRequest.DetailedMergeStatus is %v, want %v", event.MergeRequest.DetailedMergeStatus, "checking")
+	if event.ObjectAttributes.TotalTimeSpent != 0 {
+		t.Errorf("ObjectAttributes.TotalTimeSpent is %v, want %v", event.ObjectAttributes.TotalTimeSpent, 0)
 	}
-}
-
-func TestMergeEventUnmarshal(t *testing.T) {
-	jsonObject := loadFixture("testdata/webhooks/merge_request.json")
 
-	var event *MergeEvent
-	err := json.Unmarshal(jsonObject, &event)
-	if err != nil {
-		t.Errorf("Merge Event can not unmarshaled: %v\n ", err.Error())
+	if event.ObjectAttributes.TimeChange != 0 {
+		t.Errorf("ObjectAttributes.TimeChange is %v, want %v", event.ObjectAttributes.TimeChange, 0)
 	}
 
-	if event == nil {
-		t.Errorf("Merge Event is null")
+	if event.ObjectAttributes.HumanTotalTimeSpent != "30m" {
+		t.Errorf("ObjectAttributes.HumanTotalTimeSpent is %v, want %v", event.ObjectAttributes.HumanTotalTimeSpent, "30m")
 	}
 
-	if event.ObjectAttributes.ID != 99 {
-		t.Errorf("ObjectAttributes.ID is %v, want %v", event.ObjectAttributes.ID, 99)
+	if event.ObjectAttributes.HumanTimeChange != "30m" {
+		t.Errorf("ObjectAttributes.HumanTimeChange is %v, want %v", event.ObjectAttributes.HumanTimeChange, "30m")
 	}
 
-	if event.ObjectAttributes.Source.Homepage != "http://example.com/awesome_space/awesome_project" {
-		t.Errorf("ObjectAttributes.Source.Homepage is %v, want %v", event.ObjectAttributes.Source.Homepage, "http://example.com/awesome_space/awesome_project")
+	if event.ObjectAttributes.HumanTimeEstimate != "1h" {
+		t.Errorf("ObjectAttributes.HumanTimeEstimate is %v, want %v", event.ObjectAttributes.HumanTimeEstimate, "1h")
 	}
 
-	if event.ObjectAttributes.LastCommit.ID != "da1560886d4f094c3e6c9ef40349f7d38b5d27d7" {
-		t.Errorf("ObjectAttributes.LastCommit.ID is %v, want %s", event.ObjectAttributes.LastCommit.ID, "da1560886d4f094c3e6c9ef40349f7d38b5d27d7")
-	}
 	if event.Assignees[0].Name != expectedName {
 		t.Errorf("Assignee.Name is %v, want %v", event.Assignees[0].Name, expectedName)
 	}
@@ -864,10 +639,6 @@ func TestMergeEventUnmarshalFromGroup(t *testing.T) {
 		t.Errorf("Repository.Name is %v, want %v", event.Repository.Name, exampleProjectName)
 	}
 
-	if event.Assignee.Username != expectedUsername {
-		t.Errorf("Assignee.Username is %v, want %v", event.Assignee, expectedUsername)
-	}
-
 	if event.User.Name != expectedName {
 		t.Errorf("Username is %s, want %s", event.User.Name, expectedName)
 	}
@@ -965,10 +736,6 @@ func TestPipelineEventUnmarshal(t *testing.T) {
 	if event.SourcePipline.Project.ID != 41 {
 		t.Errorf("Source Pipline Project ID is %v, want %v", event.SourcePipline.Project.ID, 41)
 	}
-
-	if event.MergeRequest.DetailedMergeStatus != "mergeable" {
-		t.Errorf("MergeRequest.DetailedMergeStatus is %v, want %v", event.MergeRequest.DetailedMergeStatus, "mergeable")
-	}
 }
 
 func TestPushEventUnmarshal(t *testing.T) {
@@ -983,10 +750,6 @@ func TestPushEventUnmarshal(t *testing.T) {
 		t.Errorf("Push Event is null")
 	}
 
-	if event.EventName != "push" {
-		t.Errorf("EventName is %v, want %v", event.EventName, "push")
-	}
-
 	if event.ProjectID != 15 {
 		t.Errorf("ProjectID is %v, want %v", event.ProjectID, 15)
 	}
@@ -995,10 +758,6 @@ func TestPushEventUnmarshal(t *testing.T) {
 		t.Errorf("Username is %s, want %s", event.UserName, exampleEventUserName)
 	}
 
-	if event.Project.ID != 15 {
-		t.Errorf("Project.ID is %v, want %v", event.Project.ID, 15)
-	}
-
 	if event.Commits[0] == nil || event.Commits[0].Timestamp == nil {
 		t.Errorf("Commit Timestamp isn't nil")
 	}
@@ -1100,18 +859,10 @@ func TestTagEventUnmarshal(t *testing.T) {
 		t.Errorf("Tag Event is null")
 	}
 
-	if event.EventName != "tag_push" {
-		t.Errorf("EventName is %v, want %v", event.EventName, "tag_push")
-	}
-
 	if event.ProjectID != 1 {
 		t.Errorf("ProjectID is %v, want %v", event.ProjectID, 1)
 	}
 
-	if event.Project.ID != 1 {
-		t.Errorf("Project.ID is %v, want %v", event.Project.ID, 1)
-	}
-
 	if event.UserName != exampleEventUserName {
 		t.Errorf("Username is %s, want %s", event.UserName, exampleEventUserName)
 	}
diff --git a/pipelines_test.go b/pipelines_test.go
index 264e66f..40d7dc0 100644
--- a/pipelines_test.go
+++ b/pipelines_test.go
@@ -100,52 +100,63 @@ func TestGetPipelineTestReport(t *testing.T) {
 		TotalTime:    61.502,
 		TotalCount:   9,
 		SuccessCount: 5,
+		FailedCount:  0,
+		SkippedCount: 0,
 		ErrorCount:   4,
-		TestSuites: []*PipelineTestSuites{
+		TestSuites: []PipelineTestSuites{
 			{
 				Name:         "Failing",
 				TotalTime:    60.494,
 				TotalCount:   8,
 				SuccessCount: 4,
+				FailedCount:  0,
+				SkippedCount: 0,
 				ErrorCount:   4,
-				TestCases: []*PipelineTestCases{
+				TestCases: []PipelineTestCases{
 					{
 						Status:        "error",
 						Name:          "Error testcase 1",
 						Classname:     "MyClassOne",
 						File:          "/path/file.ext",
 						ExecutionTime: 19.987,
-						SystemOutput: &SystemOutput{
-							Type:    "failure",
-							Message: "Failed test",
-						},
+						SystemOutput:  "output message\n\noutput message 2",
 						StackTrace:    "java.lang.Exception: Stack trace\nat java.base/java.lang.Thread.dumpStack(Thread.java:1383)",
 						AttachmentURL: "http://foo.bar",
-						RecentFailures: &RecentFailures{
+						RecentFailures: RecentFailures{
 							Count:      10,
 							BaseBranch: "master",
 						},
 					},
 					{
-						Status:        "error",
-						Name:          "Error testcase 2",
-						Classname:     "MyClass",
-						ExecutionTime: 19.984,
+						Status:         "error",
+						Name:           "Error testcase 2",
+						Classname:      "MyClass",
+						File:           "",
+						ExecutionTime:  19.984,
+						SystemOutput:   "",
+						StackTrace:     "",
+						AttachmentURL:  "",
+						RecentFailures: RecentFailures{},
 					},
 					{
-						Status:    "error",
-						Name:      "Error testcase 3",
-						Classname: "MyClass",
-						SystemOutput: &SystemOutput{
-							Type:    "failure",
-							Message: "Failed test",
-						},
+						Status:        "error",
+						Name:          "Error testcase 3",
+						Classname:     "MyClass",
+						File:          "",
+						ExecutionTime: 0.0,
+						SystemOutput:  "Undefined message",
+						StackTrace:    "",
+						AttachmentURL: "",
 					},
 					{
 						Status:        "success",
 						Name:          "Succes full testcase",
 						Classname:     "MyClass",
+						File:          "",
 						ExecutionTime: 19.7799999999999985,
+						SystemOutput:  "",
+						StackTrace:    "",
+						AttachmentURL: "",
 					},
 				},
 			},
@@ -154,11 +165,18 @@ func TestGetPipelineTestReport(t *testing.T) {
 				TotalTime:    1.008,
 				TotalCount:   1,
 				SuccessCount: 1,
-				TestCases: []*PipelineTestCases{{
+				FailedCount:  0,
+				SkippedCount: 0,
+				ErrorCount:   0,
+				TestCases: []PipelineTestCases{{
 					Status:        "success",
 					Name:          "Succesfull testcase",
 					Classname:     "MyClass",
+					File:          "",
 					ExecutionTime: 1.008,
+					SystemOutput:  "",
+					StackTrace:    "",
+					AttachmentURL: "",
 				}},
 			},
 		},
diff --git a/testdata/get_pipeline_testreport.json b/testdata/get_pipeline_testreport.json
index ee70359..8409b1a 100644
--- a/testdata/get_pipeline_testreport.json
+++ b/testdata/get_pipeline_testreport.json
@@ -22,10 +22,7 @@
           "classname": "MyClassOne",
           "file": "/path/file.ext",
           "execution_time": 19.987,
-          "system_output": {
-            "type": "failure",
-            "message": "Failed test"
-          },
+          "system_output": "output message\n\noutput message 2",
           "stack_trace": "java.lang.Exception: Stack trace\nat java.base/java.lang.Thread.dumpStack(Thread.java:1383)",
           "attachment_url": "http://foo.bar",
           "recent_failures": {
@@ -50,10 +47,7 @@
           "classname": "MyClass",
           "file": null,
           "execution_time": 0.0,
-          "system_output": {
-            "type": "failure",
-            "message": "Failed test"
-          }
+          "system_output": "Undefined message"
         },
         {
           "status": "success",
diff --git a/testdata/webhooks/feature_flag.json b/testdata/webhooks/feature_flag.json
deleted file mode 100644
index 4606784..0000000
--- a/testdata/webhooks/feature_flag.json
+++ /dev/null
@@ -1,35 +0,0 @@
-{
-    "object_kind": "feature_flag",
-    "project": {
-      "id": 1,
-      "name":"Gitlab Test",
-      "description":"Aut reprehenderit ut est.",
-      "web_url":"http://example.com/gitlabhq/gitlab-test",
-      "avatar_url":null,
-      "git_ssh_url":"git@example.com:gitlabhq/gitlab-test.git",
-      "git_http_url":"http://example.com/gitlabhq/gitlab-test.git",
-      "namespace":"GitlabHQ",
-      "visibility_level":20,
-      "path_with_namespace":"gitlabhq/gitlab-test",
-      "default_branch":"master",
-      "ci_config_path": null,
-      "homepage":"http://example.com/gitlabhq/gitlab-test",
-      "url":"http://example.com/gitlabhq/gitlab-test.git",
-      "ssh_url":"git@example.com:gitlabhq/gitlab-test.git",
-      "http_url":"http://example.com/gitlabhq/gitlab-test.git"
-    },
-    "user": {
-      "id": 1,
-      "name": "Administrator",
-      "username": "root",
-      "avatar_url": "https://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=80&d=identicon",
-      "email": "admin@example.com"
-    },
-    "user_url": "http://example.com/root",
-    "object_attributes": {
-      "id": 6,
-      "name": "test-feature-flag",
-      "description": "test-feature-flag-description",
-      "active": true
-    }
-  }
diff --git a/testdata/webhooks/issue.json b/testdata/webhooks/issue.json
index 2f10e1e..02d8255 100644
--- a/testdata/webhooks/issue.json
+++ b/testdata/webhooks/issue.json
@@ -1,30 +1,34 @@
 {
   "object_kind": "issue",
-  "event_type": "issue",
   "user": {
-    "id": 1,
-    "name": "Administrator",
-    "username": "root",
-    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
-    "email": "admin@example.com"
+    "id": 42,
+    "name": "User1",
+    "username": "user1",
+    "email": "user1@example.com",
+    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
   },
   "project": {
     "id": 1,
-    "name":"Gitlab Test",
-    "description":"Aut reprehenderit ut est.",
-    "web_url":"http://example.com/gitlabhq/gitlab-test",
-    "avatar_url":null,
-    "git_ssh_url":"git@example.com:gitlabhq/gitlab-test.git",
-    "git_http_url":"http://example.com/gitlabhq/gitlab-test.git",
-    "namespace":"GitlabHQ",
-    "visibility_level":20,
-    "path_with_namespace":"gitlabhq/gitlab-test",
-    "default_branch":"master",
-    "ci_config_path": null,
-    "homepage":"http://example.com/gitlabhq/gitlab-test",
-    "url":"http://example.com/gitlabhq/gitlab-test.git",
-    "ssh_url":"git@example.com:gitlabhq/gitlab-test.git",
-    "http_url":"http://example.com/gitlabhq/gitlab-test.git"
+    "name": "Gitlab Test",
+    "description": "Aut reprehenderit ut est.",
+    "web_url": "http://example.com/gitlabhq/gitlab-test",
+    "avatar_url": null,
+    "git_ssh_url": "git@example.com:gitlabhq/gitlab-test.git",
+    "git_http_url": "http://example.com/gitlabhq/gitlab-test.git",
+    "namespace": "GitlabHQ",
+    "visibility_level": 20,
+    "path_with_namespace": "gitlabhq/gitlab-test",
+    "default_branch": "master",
+    "homepage": "http://example.com/gitlabhq/gitlab-test",
+    "url": "http://example.com/gitlabhq/gitlab-test.git",
+    "ssh_url": "git@example.com:gitlabhq/gitlab-test.git",
+    "http_url": "http://example.com/gitlabhq/gitlab-test.git"
+  },
+  "repository": {
+    "name": "Gitlab Test",
+    "url": "http://example.com/gitlabhq/gitlab-test.git",
+    "description": "Aut reprehenderit ut est.",
+    "homepage": "http://example.com/gitlabhq/gitlab-test"
   },
   "object_attributes": {
     "id": 301,
@@ -35,76 +39,45 @@
     "project_id": 14,
     "created_at": "2013-12-03T17:15:43Z",
     "updated_at": "2013-12-03T17:15:43Z",
-    "updated_by_id": 1,
-    "last_edited_at": null,
-    "last_edited_by_id": null,
-    "relative_position": 0,
+    "position": 0,
+    "branch_name": null,
     "description": "Create new API for manipulations with repository",
     "milestone_id": null,
-    "state_id": 1,
-    "confidential": false,
-    "discussion_locked": true,
-    "due_date": null,
-    "moved_to_id": null,
-    "duplicated_to_id": null,
-    "time_estimate": 0,
-    "total_time_spent": 0,
-    "time_change": 0,
-    "human_total_time_spent": null,
-    "human_time_estimate": null,
-    "human_time_change": null,
-    "weight": null,
+    "state": "opened",
     "iid": 23,
     "url": "http://example.com/diaspora/issues/23",
-    "state": "opened",
-    "action": "open",
-    "severity": "high",
-    "escalation_status": "triggered",
-    "escalation_policy": {
-      "id": 18,
-      "name": "Engineering On-call"
-    },
-    "labels": [{
-        "id": 206,
-        "title": "API",
-        "color": "#ffffff",
-        "project_id": 14,
-        "created_at": "2013-12-03T17:15:43Z",
-        "updated_at": "2013-12-03T17:15:43Z",
-        "template": false,
-        "description": "API related issues",
-        "type": "ProjectLabel",
-        "group_id": 41
-      }]
+    "action": "open"
   },
-  "repository": {
-    "name": "Gitlab Test",
-    "url": "http://example.com/gitlabhq/gitlab-test.git",
-    "description": "Aut reprehenderit ut est.",
-    "homepage": "http://example.com/gitlabhq/gitlab-test"
-  },
-  "assignees": [{
-    "name": "User1",
-    "username": "user1",
-    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
-  }],
+  "assignees": [
+    {
+      "id": 3,
+      "name": "User1",
+      "username": "user1",
+      "email": "test.user1@example.com",
+      "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
+    }
+  ],
   "assignee": {
+    "id": 3,
     "name": "User1",
     "username": "user1",
+    "email": "test.user1@example.com",
     "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
   },
-  "labels": [{
-    "id": 206,
-    "title": "API",
-    "color": "#ffffff",
-    "project_id": 14,
-    "created_at": "2013-12-03T17:15:43Z",
-    "updated_at": "2013-12-03T17:15:43Z",
-    "template": false,
-    "description": "API related issues",
-    "type": "ProjectLabel",
-    "group_id": 41
-  }],
+  "labels": [
+    {
+      "id": 206,
+      "title": "API",
+      "color": "#ffffff",
+      "project_id": 14,
+      "created_at": "2013-12-03T17:15:43Z",
+      "updated_at": "2013-12-03T17:15:43Z",
+      "template": false,
+      "description": "API related issues",
+      "type": "ProjectLabel",
+      "group_id": 41
+    }
+  ],
   "changes": {
     "updated_by_id": {
       "previous": null,
@@ -119,34 +92,38 @@
       "current": "2017-09-15 16:56:00 UTC"
     },
     "state_id": {
-      "previous": 0,
-      "current": 1
+      "previous": 1,
+      "current": 2
     },
     "labels": {
-      "previous": [{
-        "id": 206,
-        "title": "API",
-        "color": "#ffffff",
-        "project_id": 14,
-        "created_at": "2013-12-03T17:15:43Z",
-        "updated_at": "2013-12-03T17:15:43Z",
-        "template": false,
-        "description": "API related issues",
-        "type": "ProjectLabel",
-        "group_id": 41
-      }],
-      "current": [{
-        "id": 205,
-        "title": "Platform",
-        "color": "#123123",
-        "project_id": 14,
-        "created_at": "2013-12-03T17:15:43Z",
-        "updated_at": "2013-12-03T17:15:43Z",
-        "template": false,
-        "description": "Platform related issues",
-        "type": "ProjectLabel",
-        "group_id": 41
-      }]
+      "previous": [
+        {
+          "id": 206,
+          "title": "API",
+          "color": "#ffffff",
+          "project_id": 14,
+          "created_at": "2013-12-03T17:15:43Z",
+          "updated_at": "2013-12-03T17:15:43Z",
+          "template": false,
+          "description": "API related issues",
+          "type": "ProjectLabel",
+          "group_id": 41
+        }
+      ],
+      "current": [
+        {
+          "id": 205,
+          "title": "Platform",
+          "color": "#123123",
+          "project_id": 14,
+          "created_at": "2013-12-03T17:15:43Z",
+          "updated_at": "2013-12-03T17:15:43Z",
+          "template": false,
+          "description": "Platform related issues",
+          "type": "ProjectLabel",
+          "group_id": 41
+        }
+      ]
     },
     "description": {
       "previous": null,
diff --git a/testdata/webhooks/job.json b/testdata/webhooks/job.json
index 7533245..f954999 100644
--- a/testdata/webhooks/job.json
+++ b/testdata/webhooks/job.json
@@ -26,8 +26,17 @@
     "active": true,
     "is_shared": true,
     "tags": [
+      "gce",
+      "east-c",
       "linux",
-      "docker"
+      "ruby",
+      "mysql",
+      "postgres",
+      "mongo",
+      "git-annex",
+      "shared",
+      "docker",
+      "saas-linux-small-amd64"
     ]
   },
   "user": {
@@ -59,5 +68,5 @@
     "git_ssh_url": "git@gitlab.com:jsmithy2/release-tools-fake.git",
     "visibility_level": 20
   },
-  "environment": "staging"
+  "environment": null
 }
diff --git a/testdata/webhooks/merge_request.json b/testdata/webhooks/merge_request.json
index cffeac5..aa2f08a 100644
--- a/testdata/webhooks/merge_request.json
+++ b/testdata/webhooks/merge_request.json
@@ -85,9 +85,13 @@
       "ssh_url":"git@example.com:awesome_space/awesome_project.git",
       "http_url":"http://example.com/awesome_space/awesome_project.git"
     },
+    "last_edited_at":"2023-03-27 00:03:05 UTC",
+    "last_edited_by_id": 51,
+    "state_id": 1,    
     "last_commit": {
       "id": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
       "message": "fixed readme",
+      "title": "MR Title",
       "timestamp": "2012-01-03T23:36:29+02:00",
       "url": "http://example.com/awesome_space/awesome_project/commits/da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
       "author": {
@@ -95,6 +99,11 @@
         "email": "gitlabdev@dv6700.(none)"
       }
     },
+    "total_time_spent": 0,
+    "time_change": 0,
+    "human_total_time_spent": "30m",
+    "human_time_change": "30m",
+    "human_time_estimate": "1h",
     "labels": [{
       "id": 206,
       "title": "API",
diff --git a/testdata/webhooks/note_commit.json b/testdata/webhooks/note_commit.json
index a976b78..cc268b3 100644
--- a/testdata/webhooks/note_commit.json
+++ b/testdata/webhooks/note_commit.json
@@ -1,6 +1,5 @@
 {
   "object_kind": "note",
-  "event_type": "note",
   "user": {
     "id": 42,
     "name": "User1",
diff --git a/testdata/webhooks/note_merge_request.json b/testdata/webhooks/note_merge_request.json
index f644c92..ab1df99 100644
--- a/testdata/webhooks/note_merge_request.json
+++ b/testdata/webhooks/note_merge_request.json
@@ -1,12 +1,11 @@
 {
   "object_kind": "note",
-  "event_type": "note",
   "user": {
-    "id": 1,
-    "name": "Administrator",
-    "username": "root",
-    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon",
-    "email": "admin@example.com"
+    "id": 42,
+    "name": "User1",
+    "username": "user1",
+    "email": "user1@example.com",
+    "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
   },
   "project_id": 5,
   "project": {
@@ -46,6 +45,7 @@
     "noteable_id": 7,
     "system": false,
     "st_diff": null,
+    "description": "This MR needs work.",
     "url": "http://example.com/gitlab-org/gitlab-test/merge_requests/1#note_1244"
   },
   "merge_request": {
@@ -65,32 +65,6 @@
     "iid": 1,
     "description": "Et voluptas corrupti assumenda temporibus. Architecto cum animi eveniet amet asperiores. Vitae numquam voluptate est natus sit et ad id.",
     "position": 0,
-    "labels": [
-      {
-        "id": 206,
-        "title": "Afterpod",
-        "color": "#3e8068",
-        "project_id": null,
-        "created_at": "2019-06-05T14:32:20.211Z",
-        "updated_at": "2019-06-05T14:32:20.211Z",
-        "template": false,
-        "description": null,
-        "type": "GroupLabel",
-        "group_id": 4
-      },
-      {
-        "id": 86,
-        "title": "Element",
-        "color": "#231afe",
-        "project_id": 4,
-        "created_at": "2019-06-05T14:32:20.637Z",
-        "updated_at": "2019-06-05T14:32:20.637Z",
-        "template": false,
-        "description": null,
-        "type": "ProjectLabel",
-        "group_id": null
-      }
-    ],
     "source": {
       "name": "Gitlab Test",
       "description": "Aut reprehenderit ut est.",
@@ -136,10 +110,11 @@
     },
     "work_in_progress": false,
     "assignee": {
+      "id": 16,
       "name": "User1",
       "username": "user1",
+      "email": "user1@example.com",
       "avatar_url": "http://www.gravatar.com/avatar/e64c7d89f26bd1972efa854d13d7dd61?s=40\u0026d=identicon"
-    },
-    "detailed_merge_status": "checking"
+    }
   }
 }
diff --git a/testdata/webhooks/pipeline.json b/testdata/webhooks/pipeline.json
index 50df632..55fe118 100644
--- a/testdata/webhooks/pipeline.json
+++ b/testdata/webhooks/pipeline.json
@@ -35,7 +35,6 @@
     "target_project_id": 1,
     "state": "opened",
     "merge_status": "can_be_merged",
-    "detailed_merge_status": "mergeable",
     "url": "http://192.168.64.1:3005/gitlab-org/gitlab-test/merge_requests/1"
   },
   "user": {
diff --git a/testdata/webhooks/push.json b/testdata/webhooks/push.json
index 75fd30a..3470046 100644
--- a/testdata/webhooks/push.json
+++ b/testdata/webhooks/push.json
@@ -1,6 +1,5 @@
 {
   "object_kind": "push",
-  "event_name": "push",
   "before": "95790bf891e76fee5e1747ab589903a6a1f80f22",
   "after": "da1560886d4f094c3e6c9ef40349f7d38b5d27d7",
   "ref": "refs/heads/master",
diff --git a/testdata/webhooks/tag_push.json b/testdata/webhooks/tag_push.json
index 92a6c79..d810817 100644
--- a/testdata/webhooks/tag_push.json
+++ b/testdata/webhooks/tag_push.json
@@ -1,6 +1,5 @@
 {
   "object_kind": "tag_push",
-  "event_name": "tag_push",
   "before": "0000000000000000000000000000000000000000",
   "after": "82b3d5ae55f7080f1e6022629cdb57bfae7cccc7",
   "ref": "refs/tags/v1.0.0",
diff --git a/testdata/webhooks/wiki_page.json b/testdata/webhooks/wiki_page.json
index 739635c..5bade8b 100644
--- a/testdata/webhooks/wiki_page.json
+++ b/testdata/webhooks/wiki_page.json
@@ -36,7 +36,6 @@
     "message": "adding an awesome page to the wiki",
     "slug": "awesome",
     "url": "http://example.com/root/awesome-project/wikis/awesome",
-    "action": "create",
-    "diff_url": "http://example.com/root/awesome-project/wikis/awesome/diff" 
+    "action": "create"
   }
 }