Repository: xanzy/go-gitlab
Pull request #1689 (2023-04-10 21:54:26)

Updated IssueCommentEvent
Added EventType, Issue.Position, and Issue.BranchName.


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..799f1a7 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,46 +178,13 @@ 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:
 // https://docs.gitlab.com/ee/user/project/integrations/webhook_events.html#comment-on-an-issue
 type IssueCommentEvent struct {
 	ObjectKind string `json:"object_kind"`
+	EventType  string `json:"event_type"`
 	User       *User  `json:"user"`
 	ProjectID  int    `json:"project_id"`
 	Project    struct {
@@ -254,6 +228,8 @@ type IssueCommentEvent struct {
 		ProjectID           int           `json:"project_id"`
 		MilestoneID         int           `json:"milestone_id"`
 		AuthorID            int           `json:"author_id"`
+		Position            int           `json:"position"`
+		BranchName          string        `json:"branch_name"`
 		Description         string        `json:"description"`
 		State               string        `json:"state"`
 		Title               string        `json:"title"`
@@ -282,7 +258,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 +278,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 +355,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 +378,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 +411,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 +457,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 +503,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"`
 }
 
@@ -782,17 +725,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 +815,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 +826,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 +924,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 +1002,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 +1014,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 +1085,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..cc5fcc1 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")
 
@@ -297,6 +205,10 @@ func TestIssueCommentEventUnmarshal(t *testing.T) {
 		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)
 	}
@@ -313,6 +225,14 @@ func TestIssueCommentEventUnmarshal(t *testing.T) {
 		t.Errorf("Issue title is %v, want %v", event.Issue.Title, "test_issue")
 	}
 
+	if event.Issue.Position != 0 {
+		t.Errorf("Issue position is %v, want %v", event.Issue.Position, 0)
+	}
+
+	if event.Issue.BranchName != "" {
+		t.Errorf("Issue branch name is %v, want %v", event.Issue.BranchName, "")
+	}
+
 	if len(event.Issue.Labels) == 0 || event.Issue.Labels[0].ID != 25 {
 		t.Errorf("Label id is null")
 	}
@@ -354,61 +274,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,132 +342,13 @@ 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")
-
-	var event *MergeCommentEvent
-	err := json.Unmarshal(jsonObject, &event)
-	if err != nil {
-		t.Errorf("Merge Comment 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)
-	}
-
-	if event.MergeRequest.AuthorID != 8 {
-		t.Errorf("MergeRequest.AuthorID is %v, want %v", event.MergeRequest.AuthorID, 8)
-	}
-
-	if event.MergeRequest.AssigneeID != 28 {
-		t.Errorf("MergeRequest.AssigneeID is %v, want %v", event.MergeRequest.AssigneeID, 28)
-	}
-
-	if event.MergeRequest.State != "opened" {
-		t.Errorf("MergeRequest.state is %v, want %v", event.MergeRequest.State, "opened")
-	}
-
-	if event.MergeRequest.MergeStatus != "cannot_be_merged" {
-		t.Errorf("MergeRequest.merge_status is %v, want %v", event.MergeRequest.MergeStatus, "cannot_be_merged")
-	}
-
-	if event.MergeRequest.TargetProjectID != 5 {
-		t.Errorf("MergeRequest.target_project_id is %v, want %v", event.MergeRequest.TargetProjectID, 5)
-	}
-
-	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")
-	}
-}
-
 func TestMergeEventUnmarshal(t *testing.T) {
 	jsonObject := loadFixture("testdata/webhooks/merge_request.json")
 
@@ -965,10 +723,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 +737,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 +745,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 +846,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/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_issue.json b/testdata/webhooks/note_issue.json
index 2844ae5..4d36b20 100644
--- a/testdata/webhooks/note_issue.json
+++ b/testdata/webhooks/note_issue.json
@@ -1,5 +1,6 @@
 {
   "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"
   }
 }