Repository: xanzy/go-gitlab
Pull request #1636 (2023-01-24 11:00:52)

Add field import_url to Project
Field is available in the API, but missing from the api docs.

https://gitlab.com/gitlab-org/gitlab/-/blob/b93c0cf331413309e44695dac7a3bc63f5bf1b5d/lib/api/entities/project.rb#L98-100


Patch:
diff --git a/branches.go b/branches.go
index 57ccdc0..c993003 100644
--- a/branches.go
+++ b/branches.go
@@ -122,9 +122,6 @@ type ProtectBranchOptions struct {
 // idempotent function, protecting an already protected repository branch
 // still returns a 200 OK status code.
 //
-// Deprecated: This endpoint has been replaced by
-// ProtectedBranchesService.ProtectRepositoryBranches()
-//
 // GitLab API docs:
 // https://docs.gitlab.com/ee/api/branches.html#protect-repository-branch
 func (s *BranchesService) ProtectBranch(pid interface{}, branch string, opts *ProtectBranchOptions, options ...RequestOptionFunc) (*Branch, *Response, error) {
@@ -152,9 +149,6 @@ func (s *BranchesService) ProtectBranch(pid interface{}, branch string, opts *Pr
 // idempotent function, unprotecting an already unprotected repository branch
 // still returns a 200 OK status code.
 //
-// Deprecated: This endpoint has been replaced by
-// ProtectedBranchesService.UnprotectRepositoryBranches()
-//
 // GitLab API docs:
 // https://docs.gitlab.com/ee/api/branches.html#unprotect-repository-branch
 func (s *BranchesService) UnprotectBranch(pid interface{}, branch string, options ...RequestOptionFunc) (*Branch, *Response, error) {
diff --git a/deployments_merge_requests.go b/deployments_merge_requests.go
index 1958f0e..4293478 100644
--- a/deployments_merge_requests.go
+++ b/deployments_merge_requests.go
@@ -1,10 +1,11 @@
+//
 // Copyright 2022, Daniela Filipe Bento
 //
 // Licensed under the Apache License, Version 2.0 (the "License");
 // you may not use this file except in compliance with the License.
 // You may obtain a copy of the License at
 //
-//	http://www.apache.org/licenses/LICENSE-2.0
+//     http://www.apache.org/licenses/LICENSE-2.0
 //
 // Unless required by applicable law or agreed to in writing, software
 // distributed under the License is distributed on an "AS IS" BASIS,
diff --git a/event_parsing.go b/event_parsing.go
index 3a6868a..4a83330 100644
--- a/event_parsing.go
+++ b/event_parsing.go
@@ -148,7 +148,9 @@ func ParseSystemhook(payload []byte) (event interface{}, err error) {
 		"group_destroy",
 		"group_rename":
 		event = &GroupSystemEvent{}
-	case "key_create", "key_destroy":
+	case
+		"key_create",
+		"key_destroy":
 		event = &KeySystemEvent{}
 	case
 		"user_create",
diff --git a/examples/impersonation.go b/examples/impersonation.go
index 8e6ca4b..c93f0b6 100644
--- a/examples/impersonation.go
+++ b/examples/impersonation.go
@@ -30,7 +30,7 @@ func impersonationExample() {
 
 	uid := 1
 
-	// list impersonation token from an user
+	//list impersonation token from an user
 	tokens, _, err := git.Users.GetAllImpersonationTokens(
 		uid,
 		&gitlab.GetAllImpersonationTokensOptions{State: gitlab.String("active")},
@@ -43,7 +43,7 @@ func impersonationExample() {
 		log.Printf("Found token: %s", token.Token)
 	}
 
-	// create an impersonation token of an user
+	//create an impersonation token of an user
 	token, _, err := git.Users.CreateImpersonationToken(
 		uid,
 		&gitlab.CreateImpersonationTokenOptions{Scopes: &[]string{"api"}},
diff --git a/merge_requests.go b/merge_requests.go
index 0aaed1c..15faf56 100644
--- a/merge_requests.go
+++ b/merge_requests.go
@@ -809,7 +809,7 @@ func (s *MergeRequestsService) GetSingleMergeRequestDiffVersion(pid interface{},
 		return nil, nil, err
 	}
 
-	v := new(MergeRequestDiffVersion)
+	var v = new(MergeRequestDiffVersion)
 	resp, err := s.client.Do(req, v)
 	if err != nil {
 		return nil, resp, err
diff --git a/project_snippets.go b/project_snippets.go
index 1c9ecdc..82cb58d 100644
--- a/project_snippets.go
+++ b/project_snippets.go
@@ -133,7 +133,6 @@ type UpdateProjectSnippetOptions struct {
 	Description *string          `url:"description,omitempty" json:"description,omitempty"`
 	Content     *string          `url:"content,omitempty" json:"content,omitempty"`
 	Visibility  *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"`
-	Files       *[]*SnippetFile  `url:"files,omitempty" json:"files,omitempty"`
 }
 
 // UpdateSnippet updates an existing project snippet. The user must have
diff --git a/projects.go b/projects.go
index 9f267d1..0879373 100644
--- a/projects.go
+++ b/projects.go
@@ -23,7 +23,7 @@ import (
 	"net/http"
 	"time"
 
-	"github.com/hashicorp/go-retryablehttp"
+	retryablehttp "github.com/hashicorp/go-retryablehttp"
 )
 
 // ProjectsService handles communication with the repositories related methods
@@ -99,6 +99,7 @@ type Project struct {
 	MirrorTriggerBuilds                       bool                       `json:"mirror_trigger_builds"`
 	OnlyMirrorProtectedBranches               bool                       `json:"only_mirror_protected_branches"`
 	MirrorOverwritesDivergedBranches          bool                       `json:"mirror_overwrites_diverged_branches"`
+	ImportURL                                 string                     `json:"import_url"`
 	PackagesEnabled                           bool                       `json:"packages_enabled"`
 	ServiceDeskEnabled                        bool                       `json:"service_desk_enabled"`
 	ServiceDeskAddress                        string                     `json:"service_desk_address"`
@@ -171,7 +172,6 @@ type ContainerExpirationPolicy struct {
 	Cadence         string     `json:"cadence"`
 	KeepN           int        `json:"keep_n"`
 	OlderThan       string     `json:"older_than"`
-	NameRegex       string     `json:"name_regex"`
 	NameRegexDelete string     `json:"name_regex_delete"`
 	NameRegexKeep   string     `json:"name_regex_keep"`
 	Enabled         bool       `json:"enabled"`
@@ -743,7 +743,8 @@ func (s *ProjectsService) CreateProject(opt *CreateProjectOptions, options ...Re
 	if opt.ContainerExpirationPolicyAttributes != nil {
 		// This is needed to satisfy the API. Should be deleted
 		// when NameRegex is removed (it's now deprecated).
-		opt.ContainerExpirationPolicyAttributes.NameRegex = opt.ContainerExpirationPolicyAttributes.NameRegexDelete
+		opt.ContainerExpirationPolicyAttributes.NameRegex =
+			opt.ContainerExpirationPolicyAttributes.NameRegexDelete
 	}
 
 	var err error
@@ -791,7 +792,8 @@ func (s *ProjectsService) CreateProjectForUser(user int, opt *CreateProjectForUs
 	if opt.ContainerExpirationPolicyAttributes != nil {
 		// This is needed to satisfy the API. Should be deleted
 		// when NameRegex is removed (it's now deprecated).
-		opt.ContainerExpirationPolicyAttributes.NameRegex = opt.ContainerExpirationPolicyAttributes.NameRegexDelete
+		opt.ContainerExpirationPolicyAttributes.NameRegex =
+			opt.ContainerExpirationPolicyAttributes.NameRegexDelete
 	}
 
 	var err error
@@ -921,7 +923,8 @@ func (s *ProjectsService) EditProject(pid interface{}, opt *EditProjectOptions,
 	if opt.ContainerExpirationPolicyAttributes != nil {
 		// This is needed to satisfy the API. Should be deleted
 		// when NameRegex is removed (it's now deprecated).
-		opt.ContainerExpirationPolicyAttributes.NameRegex = opt.ContainerExpirationPolicyAttributes.NameRegexDelete
+		opt.ContainerExpirationPolicyAttributes.NameRegex =
+			opt.ContainerExpirationPolicyAttributes.NameRegexDelete
 	}
 
 	project, err := parseID(pid)
@@ -1176,7 +1179,7 @@ type ProjectMember struct {
 	Name        string           `json:"name"`
 	State       string           `json:"state"`
 	CreatedAt   *time.Time       `json:"created_at"`
-	ExpiresAt   *ISOTime         `json:"expires_at"`
+	ExpiresAt   *time.Time       `json:"expires_at"`
 	AccessLevel AccessLevelValue `json:"access_level"`
 	WebURL      string           `json:"web_url"`
 	AvatarURL   string           `json:"avatar_url"`
@@ -1770,16 +1773,11 @@ func (s *ProjectsService) ChangeApprovalConfiguration(pid interface{}, opt *Chan
 	return pa, resp, err
 }
 
-// GetProjectApprovalRulesListsOptions represents the available GetProjectApprovalRules() options.
-//
-// GitLab API docs: https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-project-level-rules
-type GetProjectApprovalRulesListsOptions ListOptions
-
-// GetProjectApprovalRules looks up the list of project level approver rules.
+// GetProjectApprovalRules looks up the list of project level approvers.
 //
 // GitLab API docs:
 // https://docs.gitlab.com/ee/api/merge_request_approvals.html#get-project-level-rules
-func (s *ProjectsService) GetProjectApprovalRules(pid interface{}, opt *GetProjectApprovalRulesListsOptions, options ...RequestOptionFunc) ([]*ProjectApprovalRule, *Response, error) {
+func (s *ProjectsService) GetProjectApprovalRules(pid interface{}, options ...RequestOptionFunc) ([]*ProjectApprovalRule, *Response, error) {
 	project, err := parseID(pid)
 	if err != nil {
 		return nil, nil, err
@@ -1958,46 +1956,6 @@ func (s *ProjectsService) ChangeAllowedApprovers(pid interface{}, opt *ChangeAll
 	return pa, resp, err
 }
 
-// ProjectPullMirrorDetails represent the details of the configuration pull
-// mirror and its update status.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/projects.html#get-a-projects-pull-mirror-details
-type ProjectPullMirrorDetails struct {
-	ID                     int        `json:"id"`
-	LastError              string     `json:"last_error"`
-	LastSuccessfulUpdateAt *time.Time `json:"last_successful_update_at"`
-	LastUpdateAt           *time.Time `json:"last_update_at"`
-	LastUpdateStartedAt    *time.Time `json:"last_update_started_at"`
-	UpdateStatus           string     `json:"update_status"`
-	URL                    string     `json:"url"`
-}
-
-// GetProjectPullMirrorDetails returns the pull mirror details.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/projects.html#get-a-projects-pull-mirror-details
-func (s *ProjectsService) GetProjectPullMirrorDetails(pid interface{}, options ...RequestOptionFunc) (*ProjectPullMirrorDetails, *Response, error) {
-	project, err := parseID(pid)
-	if err != nil {
-		return nil, nil, err
-	}
-	u := fmt.Sprintf("projects/%s/mirror/pull", PathEscape(project))
-
-	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	pmd := new(ProjectPullMirrorDetails)
-	resp, err := s.client.Do(req, pmd)
-	if err != nil {
-		return nil, resp, err
-	}
-
-	return pmd, resp, err
-}
-
 // StartMirroringProject start the pull mirroring process for a project.
 //
 // GitLab API docs:
diff --git a/protected_branches.go b/protected_branches.go
index 9dc919f..a32e537 100644
--- a/protected_branches.go
+++ b/protected_branches.go
@@ -51,7 +51,6 @@ type ProtectedBranch struct {
 // GitLab API docs:
 // https://docs.gitlab.com/ee/api/protected_branches.html#list-protected-branches
 type BranchAccessDescription struct {
-	ID                     int              `json:"id"`
 	AccessLevel            AccessLevelValue `json:"access_level"`
 	AccessLevelDescription string           `json:"access_level_description"`
 	UserID                 int              `json:"user_id"`
@@ -63,10 +62,7 @@ type BranchAccessDescription struct {
 //
 // GitLab API docs:
 // https://docs.gitlab.com/ee/api/protected_branches.html#list-protected-branches
-type ListProtectedBranchesOptions struct {
-	ListOptions
-	Search *string `url:"search,omitempty" json:"search,omitempty"`
-}
+type ListProtectedBranchesOptions ListOptions
 
 // ListProtectedBranches gets a list of protected branches from a project.
 //
@@ -192,64 +188,30 @@ func (s *ProtectedBranchesService) UnprotectRepositoryBranches(pid interface{},
 	return s.client.Do(req, nil)
 }
 
-// UpdateProtectedBranchOptions represents the available
-// UpdateProtectedBranch() options.
+// RequireCodeOwnerApprovalsOptions represents the available
+// RequireCodeOwnerApprovals() options.
 //
 // GitLab API docs:
 // https://docs.gitlab.com/ee/api/protected_branches.html#update-a-protected-branch
-type UpdateProtectedBranchOptions struct {
-	Name                      *string                     `url:"name,omitempty" json:"name,omitempty"`
-	AllowForcePush            *bool                       `url:"allow_force_push,omitempty" json:"allow_force_push,omitempty"`
-	CodeOwnerApprovalRequired *bool                       `url:"code_owner_approval_required,omitempty" json:"code_owner_approval_required,omitempty"`
-	AllowedToPush             *[]*BranchPermissionOptions `url:"allowed_to_push,omitempty" json:"allowed_to_push,omitempty"`
-	AllowedToMerge            *[]*BranchPermissionOptions `url:"allowed_to_merge,omitempty" json:"allowed_to_merge,omitempty"`
-	AllowedToUnprotect        *[]*BranchPermissionOptions `url:"allowed_to_unprotect,omitempty" json:"allowed_to_unprotect,omitempty"`
+type RequireCodeOwnerApprovalsOptions struct {
+	CodeOwnerApprovalRequired *bool `url:"code_owner_approval_required,omitempty" json:"code_owner_approval_required,omitempty"`
 }
 
-// UpdateProtectedBranch updates a protected branch.
+// RequireCodeOwnerApprovals updates the code owner approval option.
 //
 // Gitlab API docs:
 // https://docs.gitlab.com/ee/api/protected_branches.html#update-a-protected-branch
-func (s *ProtectedBranchesService) UpdateProtectedBranch(pid interface{}, branch string, opt *UpdateProtectedBranchOptions, options ...RequestOptionFunc) (*ProtectedBranch, *Response, error) {
+func (s *ProtectedBranchesService) RequireCodeOwnerApprovals(pid interface{}, branch string, opt *RequireCodeOwnerApprovalsOptions, options ...RequestOptionFunc) (*Response, error) {
 	project, err := parseID(pid)
 	if err != nil {
-		return nil, nil, err
+		return nil, err
 	}
 	u := fmt.Sprintf("projects/%s/protected_branches/%s", PathEscape(project), url.PathEscape(branch))
 
 	req, err := s.client.NewRequest(http.MethodPatch, u, opt, options)
 	if err != nil {
-		return nil, nil, err
-	}
-
-	p := new(ProtectedBranch)
-	resp, err := s.client.Do(req, p)
-	if err != nil {
-		return nil, resp, err
+		return nil, err
 	}
 
-	return p, resp, err
-}
-
-// RequireCodeOwnerApprovalsOptions represents the available
-// RequireCodeOwnerApprovals() options.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/protected_branches.html#update-a-protected-branch
-type RequireCodeOwnerApprovalsOptions struct {
-	CodeOwnerApprovalRequired *bool `url:"code_owner_approval_required,omitempty" json:"code_owner_approval_required,omitempty"`
-}
-
-// RequireCodeOwnerApprovals updates the code owner approval option.
-//
-// Deprecated: Use UpdateProtectedBranch() instead.
-//
-// Gitlab API docs:
-// https://docs.gitlab.com/ee/api/protected_branches.html#update-a-protected-branch
-func (s *ProtectedBranchesService) RequireCodeOwnerApprovals(pid interface{}, branch string, opt *RequireCodeOwnerApprovalsOptions, options ...RequestOptionFunc) (*Response, error) {
-	updateOptions := &UpdateProtectedBranchOptions{
-		CodeOwnerApprovalRequired: opt.CodeOwnerApprovalRequired,
-	}
-	_, req, err := s.UpdateProtectedBranch(pid, branch, updateOptions, options...)
-	return req, err
+	return s.client.Do(req, nil)
 }
diff --git a/repositories.go b/repositories.go
index 2dc5d9e..7350c92 100644
--- a/repositories.go
+++ b/repositories.go
@@ -330,90 +330,3 @@ func (s *RepositoriesService) MergeBase(pid interface{}, opt *MergeBaseOptions,
 
 	return c, resp, err
 }
-
-// AddChangelogOptions represents the available AddChangelog() options.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/repositories.html#add-changelog-data-to-a-changelog-file
-type AddChangelogOptions struct {
-	Version    *string  `url:"version,omitempty" json:"version,omitempty"`
-	Branch     *string  `url:"branch,omitempty" json:"branch,omitempty"`
-	ConfigFile *string  `url:"config_file,omitempty" json:"config_file,omitempty"`
-	Date       *ISOTime `url:"date,omitempty" json:"date,omitempty"`
-	File       *string  `url:"file,omitempty" json:"file,omitempty"`
-	From       *string  `url:"from,omitempty" json:"from,omitempty"`
-	Message    *string  `url:"message,omitempty" json:"message,omitempty"`
-	To         *string  `url:"to,omitempty" json:"to,omitempty"`
-	Trailer    *string  `url:"trailer,omitempty" json:"trailer,omitempty"`
-}
-
-// AddChangelog generates changelog data based on commits in a repository.
-//
-// Gitlab API docs:
-// https://docs.gitlab.com/ee/api/repositories.html#add-changelog-data-to-a-changelog-file
-func (s *RepositoriesService) AddChangelog(pid interface{}, opt *AddChangelogOptions, options ...RequestOptionFunc) (*Response, error) {
-	project, err := parseID(pid)
-	if err != nil {
-		return nil, err
-	}
-	u := fmt.Sprintf("projects/%s/repository/changelog", PathEscape(project))
-
-	req, err := s.client.NewRequest(http.MethodPost, u, opt, options)
-	if err != nil {
-		return nil, err
-	}
-
-	return s.client.Do(req, nil)
-}
-
-// ChangelogData represents the generated changelog data.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/repositories.html#generate-changelog-data
-type ChangelogData struct {
-	Notes string `json:"notes"`
-}
-
-func (c ChangelogData) String() string {
-	return Stringify(c)
-}
-
-// GenerateChangelogDataOptions represents the available GenerateChangelogData()
-// options.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/repositories.html#generate-changelog-data
-type GenerateChangelogDataOptions struct {
-	Version    *string  `url:"version,omitempty" json:"version,omitempty"`
-	ConfigFile *string  `url:"config_file,omitempty" json:"config_file,omitempty"`
-	Date       *ISOTime `url:"date,omitempty" json:"date,omitempty"`
-	From       *string  `url:"from,omitempty" json:"from,omitempty"`
-	To         *string  `url:"to,omitempty" json:"to,omitempty"`
-	Trailer    *string  `url:"trailer,omitempty" json:"trailer,omitempty"`
-}
-
-// GenerateChangelogData generates changelog data based on commits in a
-// repository, without committing them to a changelog file.
-//
-// Gitlab API docs:
-// https://docs.gitlab.com/ee/api/repositories.html#generate-changelog-data
-func (s *RepositoriesService) GenerateChangelogData(pid interface{}, opt GenerateChangelogDataOptions, options ...RequestOptionFunc) (*ChangelogData, *Response, error) {
-	project, err := parseID(pid)
-	if err != nil {
-		return nil, nil, err
-	}
-	u := fmt.Sprintf("projects/%s/repository/changelog", project)
-
-	req, err := s.client.NewRequest(http.MethodGet, u, opt, options)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	cd := new(ChangelogData)
-	resp, err := s.client.Do(req, cd)
-	if err != nil {
-		return nil, resp, err
-	}
-
-	return cd, resp, err
-}
diff --git a/request_options.go b/request_options.go
index bc01b91..75ae044 100644
--- a/request_options.go
+++ b/request_options.go
@@ -33,25 +33,6 @@ func WithContext(ctx context.Context) RequestOptionFunc {
 	}
 }
 
-// WithHeader takes a header name and value and appends it to the request headers.
-func WithHeader(name, value string) RequestOptionFunc {
-	return func(req *retryablehttp.Request) error {
-		req.Header.Set(name, value)
-		return nil
-	}
-}
-
-// WithHeaders takes a map of header name/value pairs and appends them to the
-// request headers.
-func WithHeaders(headers map[string]string) RequestOptionFunc {
-	return func(req *retryablehttp.Request) error {
-		for k, v := range headers {
-			req.Header.Set(k, v)
-		}
-		return nil
-	}
-}
-
 // WithSudo takes either a username or user ID and sets the SUDO request header.
 func WithSudo(uid interface{}) RequestOptionFunc {
 	return func(req *retryablehttp.Request) error {
diff --git a/services.go b/services.go
index 9b25201..bc9b8ea 100644
--- a/services.go
+++ b/services.go
@@ -1373,7 +1373,7 @@ type SetSlackServiceOptions struct {
 	// TODO: Currently, GitLab ignores this option (not implemented yet?), so
 	// there is no way to set it. Uncomment when this is fixed.
 	// See: https://gitlab.com/gitlab-org/gitlab-ce/issues/49730
-	// ConfidentialNoteChannel   *string `json:"confidential_note_channel,omitempty"`
+	//ConfidentialNoteChannel   *string `json:"confidential_note_channel,omitempty"`
 	ConfidentialNoteEvents *bool   `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"`
 	DeploymentChannel      *string `url:"deployment_channel,omitempty" json:"deployment_channel,omitempty"`
 	DeploymentEvents       *bool   `url:"deployment_events,omitempty" json:"deployment_events,omitempty"`
diff --git a/snippets.go b/snippets.go
index c4ac47b..7a53bf7 100644
--- a/snippets.go
+++ b/snippets.go
@@ -20,7 +20,6 @@ import (
 	"bytes"
 	"fmt"
 	"net/http"
-	"net/url"
 	"time"
 )
 
@@ -40,7 +39,6 @@ type Snippet struct {
 	Title       string `json:"title"`
 	FileName    string `json:"file_name"`
 	Description string `json:"description"`
-	Visibility  string `json:"visibility"`
 	Author      struct {
 		ID        int        `json:"id"`
 		Username  string     `json:"username"`
@@ -65,14 +63,12 @@ func (s Snippet) String() string {
 
 // ListSnippetsOptions represents the available ListSnippets() options.
 //
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/snippets.html#list-all-snippets-for-a-user
+// GitLab API docs: https://docs.gitlab.com/ee/api/snippets.html#list-all-snippets-for-a-user
 type ListSnippetsOptions ListOptions
 
 // ListSnippets gets a list of snippets.
 //
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/snippets.html#list-all-snippets-for-a-user
+// GitLab API docs: https://docs.gitlab.com/ee/api/snippets.html#list-all-snippets-for-a-user
 func (s *SnippetsService) ListSnippets(opt *ListSnippetsOptions, options ...RequestOptionFunc) ([]*Snippet, *Response, error) {
 	req, err := s.client.NewRequest(http.MethodGet, "snippets", opt, options)
 	if err != nil {
@@ -109,49 +105,6 @@ func (s *SnippetsService) GetSnippet(snippet int, options ...RequestOptionFunc)
 	return ps, resp, err
 }
 
-// SnippetContent gets a single snippet’s raw contents.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/snippets.html#single-snippet-contents
-func (s *SnippetsService) SnippetContent(snippet int, options ...RequestOptionFunc) ([]byte, *Response, error) {
-	u := fmt.Sprintf("snippets/%d/raw", snippet)
-
-	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	var b bytes.Buffer
-	resp, err := s.client.Do(req, &b)
-	if err != nil {
-		return nil, resp, err
-	}
-
-	return b.Bytes(), resp, err
-}
-
-// SnippetFileContent returns the raw file content as plain text.
-//
-// GitLab API docs:
-// https://docs.gitlab.com/ee/api/snippets.html#snippet-repository-file-content
-func (s *SnippetsService) SnippetFileContent(snippet int, ref, filename string, options ...RequestOptionFunc) ([]byte, *Response, error) {
-	filepath := url.QueryEscape(filename)
-	u := fmt.Sprintf("snippets/%d/files/%s/%s/raw", snippet, ref, filepath)
-
-	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
-	if err != nil {
-		return nil, nil, err
-	}
-
-	var b bytes.Buffer
-	resp, err := s.client.Do(req, &b)
-	if err != nil {
-		return nil, resp, err
-	}
-
-	return b.Bytes(), resp, err
-}
-
 // SnippetFile represents the object that is used to create snippets
 //
 // GitLab API docs:
@@ -204,7 +157,6 @@ type UpdateSnippetOptions struct {
 	Description *string          `url:"description,omitempty" json:"description,omitempty"`
 	Content     *string          `url:"content,omitempty" json:"content,omitempty"`
 	Visibility  *VisibilityValue `url:"visibility,omitempty" json:"visibility,omitempty"`
-	Files       *[]*SnippetFile  `url:"files,omitempty" json:"files,omitempty"`
 }
 
 // UpdateSnippet updates an existing snippet. The user must have
@@ -246,6 +198,27 @@ func (s *SnippetsService) DeleteSnippet(snippet int, options ...RequestOptionFun
 	return s.client.Do(req, nil)
 }
 
+// SnippetContent returns the raw snippet as plain text.
+//
+// GitLab API docs:
+// https://docs.gitlab.com/ee/api/snippets.html#single-snippet-contents
+func (s *SnippetsService) SnippetContent(snippet int, options ...RequestOptionFunc) ([]byte, *Response, error) {
+	u := fmt.Sprintf("snippets/%d/raw", snippet)
+
+	req, err := s.client.NewRequest(http.MethodGet, u, nil, options)
+	if err != nil {
+		return nil, nil, err
+	}
+
+	var b bytes.Buffer
+	resp, err := s.client.Do(req, &b)
+	if err != nil {
+		return nil, resp, err
+	}
+
+	return b.Bytes(), resp, err
+}
+
 // ExploreSnippetsOptions represents the available ExploreSnippets() options.
 //
 // GitLab API docs:
diff --git a/strings.go b/strings.go
index efbd10f..2a58ae5 100644
--- a/strings.go
+++ b/strings.go
@@ -19,6 +19,7 @@ package gitlab
 import (
 	"bytes"
 	"fmt"
+
 	"reflect"
 )
 


Test patch:
diff --git a/broadcast_messages_test.go b/broadcast_messages_test.go
index 1e059a0..0412251 100644
--- a/broadcast_messages_test.go
+++ b/broadcast_messages_test.go
@@ -61,11 +61,11 @@ func TestListBroadcastMessages(t *testing.T) {
 		t.Errorf("ListBroadcastMessages returned error: %v", err)
 	}
 
-	wantedFirstStartsAt := time.Date(2017, 0o6, 26, 6, 0, 0, 0, time.UTC)
-	wantedFirstEndsAt := time.Date(2017, 0o6, 27, 12, 59, 0, 0, time.UTC)
+	wantedFirstStartsAt := time.Date(2017, 06, 26, 6, 0, 0, 0, time.UTC)
+	wantedFirstEndsAt := time.Date(2017, 06, 27, 12, 59, 0, 0, time.UTC)
 
-	wantedSecondStartsAt := time.Date(2015, 0o4, 27, 6, 43, 0, 0, time.UTC)
-	wantedSecondEndsAt := time.Date(2015, 0o4, 28, 20, 43, 0, 0, time.UTC)
+	wantedSecondStartsAt := time.Date(2015, 04, 27, 6, 43, 0, 0, time.UTC)
+	wantedSecondEndsAt := time.Date(2015, 04, 28, 20, 43, 0, 0, time.UTC)
 
 	want := []*BroadcastMessage{{
 		Message:            "Some Message",
diff --git a/commits_test.go b/commits_test.go
index 38c43e0..35eb71d 100644
--- a/commits_test.go
+++ b/commits_test.go
@@ -45,7 +45,7 @@ func TestGetCommit(t *testing.T) {
 		t.Fatalf("Commits.GetCommit returned error: %v, response: %v", err, resp)
 	}
 
-	updatedAt := time.Date(2019, 11, 4, 15, 39, 0o3, 935000000, time.UTC)
+	updatedAt := time.Date(2019, 11, 4, 15, 39, 03, 935000000, time.UTC)
 	createdAt := time.Date(2019, 11, 4, 15, 38, 53, 154000000, time.UTC)
 	want := &Commit{
 		ID:             "6104942438c14ec7bd21c6cd5bd995272b3faff6",
@@ -89,6 +89,7 @@ func TestGetCommitStatuses(t *testing.T) {
 		All:   Bool(true),
 	}
 	statuses, _, err := client.Commits.GetCommitStatuses("1", "b0b3a907f41409829b307a28b82fdbd552ee5a27", opt)
+
 	if err != nil {
 		t.Errorf("Commits.GetCommitStatuses returned error: %v", err)
 	}
@@ -127,6 +128,7 @@ func TestSetCommitStatus(t *testing.T) {
 		Coverage:    &cov,
 	}
 	status, _, err := client.Commits.SetCommitStatus("1", "b0b3a907f41409829b307a28b82fdbd552ee5a27", opt)
+
 	if err != nil {
 		t.Errorf("Commits.SetCommitStatus returned error: %v", err)
 	}
@@ -150,7 +152,7 @@ func TestRevertCommit_NoOptions(t *testing.T) {
 		t.Fatalf("Commits.RevertCommit returned error: %v, response: %v", err, resp)
 	}
 
-	updatedAt := time.Date(2019, 11, 4, 15, 39, 0o3, 935000000, time.UTC)
+	updatedAt := time.Date(2019, 11, 4, 15, 39, 03, 935000000, time.UTC)
 	createdAt := time.Date(2019, 11, 4, 15, 38, 53, 154000000, time.UTC)
 	want := &Commit{
 		ID:             "6104942438c14ec7bd21c6cd5bd995272b3faff6",
@@ -195,7 +197,7 @@ func TestRevertCommit_WithOptions(t *testing.T) {
 		t.Fatalf("Commits.RevertCommit returned error: %v, response: %v", err, resp)
 	}
 
-	updatedAt := time.Date(2019, 11, 4, 15, 39, 0o3, 935000000, time.UTC)
+	updatedAt := time.Date(2019, 11, 4, 15, 39, 03, 935000000, time.UTC)
 	createdAt := time.Date(2019, 11, 4, 15, 38, 53, 154000000, time.UTC)
 	want := &Commit{
 		ID:             "6104942438c14ec7bd21c6cd5bd995272b3faff6",
@@ -289,7 +291,7 @@ func TestCommitsService_ListCommits(t *testing.T) {
 		`)
 	})
 
-	updatedAt := time.Date(2019, 11, 4, 15, 39, 0o3, 935000000, time.UTC)
+	updatedAt := time.Date(2019, 11, 4, 15, 39, 03, 935000000, time.UTC)
 	createdAt := time.Date(2019, 11, 4, 15, 38, 53, 154000000, time.UTC)
 	want := []*Commit{{
 		ID:             "6104942438c14ec7bd21c6cd5bd995272b3faff6",
@@ -429,7 +431,7 @@ func TestCommitsService_CreateCommit(t *testing.T) {
 		`)
 	})
 
-	updatedAt := time.Date(2019, 11, 4, 15, 39, 0o3, 935000000, time.UTC)
+	updatedAt := time.Date(2019, 11, 4, 15, 39, 03, 935000000, time.UTC)
 	createdAt := time.Date(2019, 11, 4, 15, 38, 53, 154000000, time.UTC)
 	want := &Commit{
 		ID:             "6104942438c14ec7bd21c6cd5bd995272b3faff6",
@@ -780,8 +782,7 @@ func TestCommitsService_ListMergeRequestsByCommit(t *testing.T) {
 			Title:       "v2.0",
 			Description: "Assumenda aut placeat expedita exercitationem labore sunt enim earum.",
 			State:       "closed",
-			WebURL:      "https://gitlab.example.com/my-group/my-project/milestones/1",
-		},
+			WebURL:      "https://gitlab.example.com/my-group/my-project/milestones/1"},
 		MergeWhenPipelineSucceeds: true,
 		DetailedMergeStatus:       "mergeable",
 		MergeError:                "",
@@ -791,8 +792,7 @@ func TestCommitsService_ListMergeRequestsByCommit(t *testing.T) {
 			Name:      "Douwe Maan",
 			State:     "active",
 			AvatarURL: "https://gitlab.example.com/uploads/-/system/user/avatar/87854/avatar.png",
-			WebURL:    "https://gitlab.com/DouweM",
-		},
+			WebURL:    "https://gitlab.com/DouweM"},
 		Subscribed:               false,
 		SHA:                      "8888888888888888888888888888888888888888",
 		MergeCommitSHA:           "",
@@ -883,7 +883,7 @@ func TestCommitsService_CherryPickCommit(t *testing.T) {
 		`)
 	})
 
-	updatedAt := time.Date(2019, 11, 4, 15, 39, 0o3, 935000000, time.UTC)
+	updatedAt := time.Date(2019, 11, 4, 15, 39, 03, 935000000, time.UTC)
 	createdAt := time.Date(2019, 11, 4, 15, 38, 53, 154000000, time.UTC)
 	want := &Commit{
 		ID:             "6104942438c14ec7bd21c6cd5bd995272b3faff6",
diff --git a/container_registry_test.go b/container_registry_test.go
index 911a533..5ef94c0 100644
--- a/container_registry_test.go
+++ b/container_registry_test.go
@@ -339,7 +339,7 @@ func TestDeleteRegistryRepositoryTags(t *testing.T) {
 		testMethod(t, r, http.MethodDelete)
 	})
 
-	tests := []struct {
+	var tests = []struct {
 		event           string
 		nameRegexDelete string
 		keepN           int
diff --git a/custom_attributes_test.go b/custom_attributes_test.go
index 92752be..bb6c99b 100644
--- a/custom_attributes_test.go
+++ b/custom_attributes_test.go
@@ -32,6 +32,7 @@ func TestListCustomUserAttributes(t *testing.T) {
 	})
 
 	customAttributes, _, err := client.CustomAttribute.ListCustomUserAttributes(2)
+
 	if err != nil {
 		t.Errorf("CustomAttribute.ListCustomUserAttributes returned error: %v", err)
 	}
@@ -51,6 +52,7 @@ func TestListCustomGroupAttributes(t *testing.T) {
 	})
 
 	customAttributes, _, err := client.CustomAttribute.ListCustomGroupAttributes(2)
+
 	if err != nil {
 		t.Errorf("CustomAttribute.ListCustomGroupAttributes returned error: %v", err)
 	}
@@ -70,6 +72,7 @@ func TestListCustomProjectAttributes(t *testing.T) {
 	})
 
 	customAttributes, _, err := client.CustomAttribute.ListCustomProjectAttributes(2)
+
 	if err != nil {
 		t.Errorf("CustomAttribute.ListCustomProjectAttributes returned error: %v", err)
 	}
@@ -89,6 +92,7 @@ func TestGetCustomUserAttribute(t *testing.T) {
 	})
 
 	customAttribute, _, err := client.CustomAttribute.GetCustomUserAttribute(2, "testkey1")
+
 	if err != nil {
 		t.Errorf("CustomAttribute.GetCustomUserAttribute returned error: %v", err)
 	}
@@ -108,6 +112,7 @@ func TestGetCustomGropupAttribute(t *testing.T) {
 	})
 
 	customAttribute, _, err := client.CustomAttribute.GetCustomGroupAttribute(2, "testkey1")
+
 	if err != nil {
 		t.Errorf("CustomAttribute.GetCustomGroupAttribute returned error: %v", err)
 	}
@@ -127,6 +132,7 @@ func TestGetCustomProjectAttribute(t *testing.T) {
 	})
 
 	customAttribute, _, err := client.CustomAttribute.GetCustomProjectAttribute(2, "testkey1")
+
 	if err != nil {
 		t.Errorf("CustomAttribute.GetCustomProjectAttribute returned error: %v", err)
 	}
@@ -149,6 +155,7 @@ func TestSetCustomUserAttribute(t *testing.T) {
 		Key:   "testkey1",
 		Value: "testvalue1",
 	})
+
 	if err != nil {
 		t.Errorf("CustomAttribute.SetCustomUserAttributes returned error: %v", err)
 	}
@@ -171,6 +178,7 @@ func TestSetCustomGroupAttribute(t *testing.T) {
 		Key:   "testkey1",
 		Value: "testvalue1",
 	})
+
 	if err != nil {
 		t.Errorf("CustomAttribute.SetCustomGroupAttributes returned error: %v", err)
 	}
diff --git a/deploy_tokens_test.go b/deploy_tokens_test.go
index f67bc36..87f19cf 100644
--- a/deploy_tokens_test.go
+++ b/deploy_tokens_test.go
@@ -50,7 +50,7 @@ func TestListAllDeployTokens(t *testing.T) {
 		t.Errorf("DeployTokens.ListAllDeployTokens returned an error: %v", err)
 	}
 
-	wantExpiresAt := time.Date(2020, 0o2, 14, 0, 0, 0, 0, time.UTC)
+	wantExpiresAt := time.Date(2020, 02, 14, 0, 0, 0, 0, time.UTC)
 
 	want := []*DeployToken{
 		{
@@ -96,7 +96,7 @@ func TestListProjectDeployTokens(t *testing.T) {
 		t.Errorf("DeployTokens.ListProjectDeployTokens returned an error: %v", err)
 	}
 
-	wantExpiresAt := time.Date(2020, 0o2, 14, 0, 0, 0, 0, time.UTC)
+	wantExpiresAt := time.Date(2020, 02, 14, 0, 0, 0, 0, time.UTC)
 
 	want := []*DeployToken{
 		{
@@ -140,7 +140,7 @@ func TestGetProjectDeployTokens(t *testing.T) {
 		t.Errorf("DeployTokens.GetProjectDeployToken returned an error: %v", err)
 	}
 
-	wantExpiresAt := time.Date(2020, 0o2, 14, 0, 0, 0, 0, time.UTC)
+	wantExpiresAt := time.Date(2020, 02, 14, 0, 0, 0, 0, time.UTC)
 
 	want := &DeployToken{
 		ID:        1,
@@ -177,7 +177,7 @@ func TestCreateProjectDeployToken(t *testing.T) {
 `)
 	})
 
-	expiresAt := time.Date(2021, 0o1, 0o1, 0, 0, 0, 0, time.UTC)
+	expiresAt := time.Date(2021, 01, 01, 0, 0, 0, 0, time.UTC)
 
 	deployToken, _, err := client.DeployTokens.CreateProjectDeployToken(5, &CreateProjectDeployTokenOptions{
 		Name:      String("My deploy token"),
@@ -254,7 +254,7 @@ func TestListGroupDeployTokens(t *testing.T) {
 		t.Errorf("DeployTokens.ListGroupDeployTokens returned an error: %v", err)
 	}
 
-	wantExpiresAt := time.Date(2020, 0o2, 14, 0, 0, 0, 0, time.UTC)
+	wantExpiresAt := time.Date(2020, 02, 14, 0, 0, 0, 0, time.UTC)
 
 	want := []*DeployToken{
 		{
@@ -298,7 +298,7 @@ func TestGetGroupDeployTokens(t *testing.T) {
 		t.Errorf("DeployTokens.GetGroupDeployToken returned an error: %v", err)
 	}
 
-	wantExpiresAt := time.Date(2020, 0o2, 14, 0, 0, 0, 0, time.UTC)
+	wantExpiresAt := time.Date(2020, 02, 14, 0, 0, 0, 0, time.UTC)
 
 	want := &DeployToken{
 		ID:        1,
@@ -335,7 +335,7 @@ func TestCreateGroupDeployToken(t *testing.T) {
 `)
 	})
 
-	expiresAt := time.Date(2021, 0o1, 0o1, 0, 0, 0, 0, time.UTC)
+	expiresAt := time.Date(2021, 01, 01, 0, 0, 0, 0, time.UTC)
 
 	deployToken, _, err := client.DeployTokens.CreateGroupDeployToken(5, &CreateGroupDeployTokenOptions{
 		Name:      String("My deploy token"),
diff --git a/event_parsing_systemhook_test.go b/event_parsing_systemhook_test.go
index cc258ea..12b5b43 100644
--- a/event_parsing_systemhook_test.go
+++ b/event_parsing_systemhook_test.go
@@ -83,7 +83,7 @@ func TestParseSystemhookRepositoryUpdate(t *testing.T) {
 }
 
 func TestParseSystemhookProject(t *testing.T) {
-	tests := []struct {
+	var tests = []struct {
 		event   string
 		payload []byte
 	}{
@@ -109,7 +109,7 @@ func TestParseSystemhookProject(t *testing.T) {
 }
 
 func TestParseSystemhookGroup(t *testing.T) {
-	tests := []struct {
+	var tests = []struct {
 		event   string
 		payload []byte
 	}{
@@ -133,7 +133,7 @@ func TestParseSystemhookGroup(t *testing.T) {
 }
 
 func TestParseSystemhookUser(t *testing.T) {
-	tests := []struct {
+	var tests = []struct {
 		event   string
 		payload []byte
 	}{
@@ -158,7 +158,7 @@ func TestParseSystemhookUser(t *testing.T) {
 }
 
 func TestParseSystemhookUserGroup(t *testing.T) {
-	tests := []struct {
+	var tests = []struct {
 		event   string
 		payload []byte
 	}{
@@ -182,7 +182,7 @@ func TestParseSystemhookUserGroup(t *testing.T) {
 }
 
 func TestParseSystemhookUserTeam(t *testing.T) {
-	tests := []struct {
+	var tests = []struct {
 		event   string
 		payload []byte
 	}{
diff --git a/fixtures_test.go b/fixtures_test.go
index a246e1a..d487a3c 100644
--- a/fixtures_test.go
+++ b/fixtures_test.go
@@ -17,11 +17,6 @@
 package gitlab
 
 const (
-	// exampleChangelogResponse provides fixture for Changelog tests.
-	exampleChangelogResponse = `{
-    "notes": "## 1.0.0 (2021-11-17)\n\n### feature (2 changes)\n\n- [Title 2](namespace13/project13@ad608eb642124f5b3944ac0ac772fecaf570a6bf) ([merge request](namespace13/project13!2))\n- [Title 1](namespace13/project13@3c6b80ff7034fa0d585314e1571cc780596ce3c8) ([merge request](namespace13/project13!1))\n"
-  }`
-
 	// exampleCommitMessage provides fixture for a commit message.
 	exampleCommitMessage = "Merge branch 'some-feature' into 'master'\n\nRelease v1.0.0\n\nSee merge request jsmith/example!1"
 
diff --git a/gitlab_test.go b/gitlab_test.go
index d12defe..27b63ac 100644
--- a/gitlab_test.go
+++ b/gitlab_test.go
@@ -75,6 +75,7 @@ func testMethod(t *testing.T, r *http.Request, want string) {
 func testBody(t *testing.T, r *http.Request, want string) {
 	buffer := new(bytes.Buffer)
 	_, err := buffer.ReadFrom(r.Body)
+
 	if err != nil {
 		t.Fatalf("Failed to Read Body: %v", err)
 	}
diff --git a/group_boards_test.go b/group_boards_test.go
index 1a3aeb2..10126e9 100644
--- a/group_boards_test.go
+++ b/group_boards_test.go
@@ -103,8 +103,7 @@ func TestGroupIssueBoardsService_ListGroupIssueBoards(t *testing.T) {
 					Description: "",
 				},
 				Position: 3,
-			},
-		},
+			}},
 	}}
 
 	gibs, resp, err := client.GroupIssueBoards.ListGroupIssueBoards(5, nil, nil)
@@ -278,8 +277,7 @@ func TestGroupIssueBoardsService_GetGroupIssueBoard(t *testing.T) {
 					Description: "",
 				},
 				Position: 3,
-			},
-		},
+			}},
 	}
 
 	gib, resp, err := client.GroupIssueBoards.GetGroupIssueBoard(5, 1, nil, nil)
diff --git a/group_labels_test.go b/group_labels_test.go
index d1c91d8..a0d7562 100644
--- a/group_labels_test.go
+++ b/group_labels_test.go
@@ -37,6 +37,7 @@ func TestCreateGroupGroupLabel(t *testing.T) {
 		Color: String("#11FF22"),
 	}
 	label, _, err := client.GroupLabels.CreateGroupLabel("1", l)
+
 	if err != nil {
 		log.Fatal(err)
 	}
diff --git a/group_milestones_test.go b/group_milestones_test.go
index b5fee3a..19990bb 100644
--- a/group_milestones_test.go
+++ b/group_milestones_test.go
@@ -480,8 +480,7 @@ func TestGroupMilestonesService_GetGroupMilestoneMergeRequests(t *testing.T) {
 			Title:       "v2.0",
 			Description: "Assumenda aut placeat expedita exercitationem labore sunt enim earum.",
 			State:       "closed",
-			WebURL:      "https://gitlab.example.com/my-group/my-project/milestones/1",
-		},
+			WebURL:      "https://gitlab.example.com/my-group/my-project/milestones/1"},
 		MergeWhenPipelineSucceeds: true,
 		DetailedMergeStatus:       "mergeable",
 		MergeError:                "",
@@ -491,8 +490,7 @@ func TestGroupMilestonesService_GetGroupMilestoneMergeRequests(t *testing.T) {
 			Name:      "Douwe Maan",
 			State:     "active",
 			AvatarURL: "https://gitlab.example.com/uploads/-/system/user/avatar/87854/avatar.png",
-			WebURL:    "https://gitlab.com/DouweM",
-		},
+			WebURL:    "https://gitlab.com/DouweM"},
 		Subscribed:               false,
 		SHA:                      "8888888888888888888888888888888888888888",
 		MergeCommitSHA:           "",
diff --git a/group_variables_test.go b/group_variables_test.go
index e4fc5cd..4be1170 100644
--- a/group_variables_test.go
+++ b/group_variables_test.go
@@ -61,6 +61,7 @@ func TestGetGroupVariable(t *testing.T) {
 		})
 
 	variable, _, err := client.GroupVariables.GetVariable(1, "TEST_VARIABLE_1")
+
 	if err != nil {
 		t.Errorf("GroupVariables.GetVariable returned error: %v", err)
 	}
diff --git a/issues_test.go b/issues_test.go
index c7d4cbc..0664f63 100644
--- a/issues_test.go
+++ b/issues_test.go
@@ -173,11 +173,12 @@ func TestListIssues(t *testing.T) {
 	})
 
 	listProjectIssue := &ListIssuesOptions{
-		AuthorID:   Int(0o1),
-		AssigneeID: AssigneeID(0o2),
+		AuthorID:   Int(01),
+		AssigneeID: AssigneeID(02),
 	}
 
 	issues, _, err := client.Issues.ListIssues(listProjectIssue)
+
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -239,11 +240,12 @@ func TestListIssuesWithLabelDetails(t *testing.T) {
 	})
 
 	listProjectIssue := &ListIssuesOptions{
-		AuthorID:   Int(0o1),
-		AssigneeID: AssigneeID(0o2),
+		AuthorID:   Int(01),
+		AssigneeID: AssigneeID(02),
 	}
 
 	issues, _, err := client.Issues.ListIssues(listProjectIssue)
+
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -288,6 +290,7 @@ func TestListIssuesSearchInTitle(t *testing.T) {
 	}
 
 	issues, _, err := client.Issues.ListIssues(listProjectIssue)
+
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -302,7 +305,6 @@ func TestListIssuesSearchInTitle(t *testing.T) {
 		t.Errorf("Issues.ListIssues returned %+v, want %+v", issues, want)
 	}
 }
-
 func TestListIssuesSearchInDescription(t *testing.T) {
 	mux, client := setup(t)
 
@@ -326,6 +328,7 @@ func TestListIssuesSearchInDescription(t *testing.T) {
 	}
 
 	issues, _, err := client.Issues.ListIssues(listProjectIssue)
+
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -371,6 +374,7 @@ func TestListIssuesSearchByIterationID(t *testing.T) {
 	}
 
 	issues, _, err := client.Issues.ListIssues(listProjectIssue)
+
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -404,8 +408,8 @@ func TestListProjectIssues(t *testing.T) {
 	})
 
 	listProjectIssue := &ListProjectIssuesOptions{
-		AuthorID:   Int(0o1),
-		AssigneeID: AssigneeID(0o2),
+		AuthorID:   Int(01),
+		AssigneeID: AssigneeID(02),
 	}
 	issues, _, err := client.Issues.ListProjectIssues("1", listProjectIssue)
 	if err != nil {
@@ -454,6 +458,7 @@ func TestListProjectIssuesSearchByIterationID(t *testing.T) {
 	}
 
 	issues, _, err := client.Issues.ListProjectIssues(1, listProjectIssue)
+
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -488,8 +493,8 @@ func TestListGroupIssues(t *testing.T) {
 
 	listGroupIssue := &ListGroupIssuesOptions{
 		State:      String("Open"),
-		AuthorID:   Int(0o1),
-		AssigneeID: AssigneeID(0o2),
+		AuthorID:   Int(01),
+		AssigneeID: AssigneeID(02),
 	}
 
 	issues, _, err := client.Issues.ListGroupIssues("1", listGroupIssue)
@@ -539,6 +544,7 @@ func TestListGroupIssuesSearchByIterationID(t *testing.T) {
 	}
 
 	issues, _, err := client.Issues.ListGroupIssues(1, listProjectIssue)
+
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -576,6 +582,7 @@ func TestCreateIssue(t *testing.T) {
 	}
 
 	issue, _, err := client.Issues.CreateIssue("1", createIssueOptions)
+
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -606,6 +613,7 @@ func TestUpdateIssue(t *testing.T) {
 		Description: String("This is description of an issue"),
 	}
 	issue, _, err := client.Issues.UpdateIssue(1, 5, updateIssueOpt)
+
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -632,6 +640,7 @@ func TestSubscribeToIssue(t *testing.T) {
 	})
 
 	issue, _, err := client.Issues.SubscribeToIssue("1", 5)
+
 	if err != nil {
 		log.Fatal(err)
 	}
@@ -848,10 +857,8 @@ func TestGetIssueParticipants(t *testing.T) {
 		log.Fatal(err)
 	}
 
-	want := []*BasicUser{
-		{ID: 1, Name: "User1", Username: "User1", State: "active", AvatarURL: "", WebURL: "https://localhost/User1"},
-		{ID: 2, Name: "User2", Username: "User2", State: "active", AvatarURL: "https://localhost/uploads/-/system/user/avatar/2/avatar.png", WebURL: "https://localhost/User2"},
-	}
+	want := []*BasicUser{{ID: 1, Name: "User1", Username: "User1", State: "active", AvatarURL: "", WebURL: "https://localhost/User1"},
+		{ID: 2, Name: "User2", Username: "User2", State: "active", AvatarURL: "https://localhost/uploads/-/system/user/avatar/2/avatar.png", WebURL: "https://localhost/User2"}}
 
 	if !reflect.DeepEqual(want, issueParticipants) {
 		t.Errorf("Issues.GetIssueParticipants returned %+v, want %+v", issueParticipants, want)
diff --git a/labels_test.go b/labels_test.go
index 967e32f..e03eb6f 100644
--- a/labels_test.go
+++ b/labels_test.go
@@ -39,6 +39,7 @@ func TestCreateLabel(t *testing.T) {
 		Priority: Int(2),
 	}
 	label, _, err := client.Labels.CreateLabel("1", l)
+
 	if err != nil {
 		log.Fatal(err)
 	}
diff --git a/merge_requests_test.go b/merge_requests_test.go
index ee6452b..86b155d 100644
--- a/merge_requests_test.go
+++ b/merge_requests_test.go
@@ -211,6 +211,7 @@ func TestCreateMergeRequestPipeline(t *testing.T) {
 	})
 
 	pipeline, _, err := client.MergeRequests.CreateMergeRequestPipeline(1, 1)
+
 	if err != nil {
 		t.Errorf("MergeRequests.CreateMergeRequestPipeline returned error: %v", err)
 	}
@@ -235,10 +236,8 @@ func TestGetMergeRequestParticipants(t *testing.T) {
 		log.Fatal(err)
 	}
 
-	want := []*BasicUser{
-		{ID: 1, Name: "User1", Username: "User1", State: "active", AvatarURL: "", WebURL: "https://localhost/User1"},
-		{ID: 2, Name: "User2", Username: "User2", State: "active", AvatarURL: "https://localhost/uploads/-/system/user/avatar/2/avatar.png", WebURL: "https://localhost/User2"},
-	}
+	want := []*BasicUser{{ID: 1, Name: "User1", Username: "User1", State: "active", AvatarURL: "", WebURL: "https://localhost/User1"},
+		{ID: 2, Name: "User2", Username: "User2", State: "active", AvatarURL: "https://localhost/uploads/-/system/user/avatar/2/avatar.png", WebURL: "https://localhost/User2"}}
 
 	if !reflect.DeepEqual(want, mergeRequestParticipants) {
 		t.Errorf("Issues.GetMergeRequestParticipants returned %+v, want %+v", mergeRequestParticipants, want)
diff --git a/milestones_test.go b/milestones_test.go
index 33dbf34..acb8567 100644
--- a/milestones_test.go
+++ b/milestones_test.go
@@ -504,8 +504,7 @@ func TestMilestonesService_GetMilestoneMergeRequests(t *testing.T) {
 			Title:       "v2.0",
 			Description: "Assumenda aut placeat expedita exercitationem labore sunt enim earum.",
 			State:       "closed",
-			WebURL:      "https://gitlab.example.com/my-group/my-project/milestones/1",
-		},
+			WebURL:      "https://gitlab.example.com/my-group/my-project/milestones/1"},
 		MergeWhenPipelineSucceeds: true,
 		DetailedMergeStatus:       "mergeable",
 		MergeError:                "",
@@ -515,8 +514,7 @@ func TestMilestonesService_GetMilestoneMergeRequests(t *testing.T) {
 			Name:      "Douwe Maan",
 			State:     "active",
 			AvatarURL: "https://gitlab.example.com/uploads/-/system/user/avatar/87854/avatar.png",
-			WebURL:    "https://gitlab.com/DouweM",
-		},
+			WebURL:    "https://gitlab.com/DouweM"},
 		Subscribed:               false,
 		SHA:                      "8888888888888888888888888888888888888888",
 		MergeCommitSHA:           "",
diff --git a/packages_test.go b/packages_test.go
index 375d259..f2dcd13 100644
--- a/packages_test.go
+++ b/packages_test.go
@@ -59,8 +59,7 @@ func TestPackagesService_ListProjectPackages(t *testing.T) {
 				Name:      "Some Label",
 				CreatedAt: &timestamp,
 				UpdatedAt: &timestamp,
-			},
-		},
+			}},
 	}}
 
 	ps, resp, err := client.Packages.ListProjectPackages(3, nil)
diff --git a/pipeline_schedules_test.go b/pipeline_schedules_test.go
index 6f3b892..e9d491a 100644
--- a/pipeline_schedules_test.go
+++ b/pipeline_schedules_test.go
@@ -32,6 +32,7 @@ func TestRunPipelineSchedule(t *testing.T) {
 	})
 
 	res, err := client.PipelineSchedules.RunPipelineSchedule(1, 1)
+
 	if err != nil {
 		t.Errorf("PipelineTriggers.RunPipelineTrigger returned error: %v", err)
 	}
diff --git a/pipeline_triggers_test.go b/pipeline_triggers_test.go
index 7ca789a..fe4cf78 100644
--- a/pipeline_triggers_test.go
+++ b/pipeline_triggers_test.go
@@ -33,6 +33,7 @@ func TestRunPipeline(t *testing.T) {
 
 	opt := &RunPipelineTriggerOptions{Ref: String("master")}
 	pipeline, _, err := client.PipelineTriggers.RunPipelineTrigger(1, opt)
+
 	if err != nil {
 		t.Errorf("PipelineTriggers.RunPipelineTrigger returned error: %v", err)
 	}
diff --git a/pipelines_test.go b/pipelines_test.go
index 40d7dc0..4d7ee2e 100644
--- a/pipelines_test.go
+++ b/pipelines_test.go
@@ -157,8 +157,7 @@ func TestGetPipelineTestReport(t *testing.T) {
 						SystemOutput:  "",
 						StackTrace:    "",
 						AttachmentURL: "",
-					},
-				},
+					}},
 			},
 			{
 				Name:         "Succes suite",
@@ -179,8 +178,7 @@ func TestGetPipelineTestReport(t *testing.T) {
 					AttachmentURL: "",
 				}},
 			},
-		},
-	}
+		}}
 	if !reflect.DeepEqual(want, testreport) {
 		t.Errorf("Pipelines.GetPipelineTestReport returned %+v, want %+v", testreport, want)
 	}
@@ -228,6 +226,7 @@ func TestCreatePipeline(t *testing.T) {
 
 	opt := &CreatePipelineOptions{Ref: String("master")}
 	pipeline, _, err := client.Pipelines.CreatePipeline(1, opt)
+
 	if err != nil {
 		t.Errorf("Pipelines.CreatePipeline returned error: %v", err)
 	}
diff --git a/project_clusters_test.go b/project_clusters_test.go
index ae00da3..966a463 100644
--- a/project_clusters_test.go
+++ b/project_clusters_test.go
@@ -60,6 +60,7 @@ func TestListClusters(t *testing.T) {
 	})
 
 	clusters, _, err := client.ProjectCluster.ListClusters(pid)
+
 	if err != nil {
 		t.Errorf("ProjectClusters.ListClusters returned error: %v", err)
 	}
@@ -142,6 +143,7 @@ func TestGetCluster(t *testing.T) {
 	})
 
 	cluster, _, err := client.ProjectCluster.GetCluster(pid, 1)
+
 	if err != nil {
 		t.Errorf("ProjectClusters.ListClusters returned error: %v", err)
 	}
@@ -220,6 +222,7 @@ func TestAddCluster(t *testing.T) {
 	})
 
 	cluster, _, err := client.ProjectCluster.AddCluster(pid, &AddClusterOptions{})
+
 	if err != nil {
 		t.Errorf("ProjectClusters.AddCluster returned error: %v", err)
 	}
@@ -294,6 +297,7 @@ func TestEditCluster(t *testing.T) {
 	})
 
 	cluster, _, err := client.ProjectCluster.EditCluster(pid, 1, &EditClusterOptions{})
+
 	if err != nil {
 		t.Errorf("ProjectClusters.EditCluster returned error: %v", err)
 	}
diff --git a/project_feature_flags_test.go b/project_feature_flags_test.go
index 7db8e92..c8cf082 100644
--- a/project_feature_flags_test.go
+++ b/project_feature_flags_test.go
@@ -97,7 +97,7 @@ func TestGetProjectFeatureFlag(t *testing.T) {
 		t.Fatalf("ProjectFeatureFlags.GetProjectFeatureFlag returned error: %v, response %v", err, resp)
 	}
 
-	date := time.Date(2020, 0o5, 13, 19, 56, 33, 0, time.UTC)
+	date := time.Date(2020, 05, 13, 19, 56, 33, 0, time.UTC)
 	expected := &ProjectFeatureFlag{
 		Name:      "awesome_feature",
 		Active:    true,
diff --git a/project_members_test.go b/project_members_test.go
index c3b4c71..472b3c3 100644
--- a/project_members_test.go
+++ b/project_members_test.go
@@ -4,6 +4,7 @@ import (
 	"fmt"
 	"net/http"
 	"testing"
+	"time"
 
 	"github.com/stretchr/testify/require"
 )
@@ -291,19 +292,21 @@ func TestProjectMembersService_EditProjectMember(t *testing.T) {
 			  "web_url": "http://192.168.1.8:3000/root",
 			  "access_level": 30,
 			  "email": "venkatesh.thalluri@example.com",
-			  "expires_at": null,
+			  "expires_at": "2023-10-22T14:13:35Z",
 			  "group_saml_identity": null
 			}
 		`)
 	})
 
+	ExpectedExpiry := time.Date(2023, time.October, 22, 14, 13, 35, 0, time.UTC)
+
 	want := &ProjectMember{
 		ID:          1,
 		Username:    "venkatesh_thalluri",
 		Email:       "venkatesh.thalluri@example.com",
 		Name:        "Venkatesh Thalluri",
 		State:       "active",
-		ExpiresAt:   nil,
+		ExpiresAt:   &ExpectedExpiry,
 		AccessLevel: 30,
 		WebURL:      "http://192.168.1.8:3000/root",
 		AvatarURL:   "https://www.gravatar.com/avatar/c2525a7f58ae3776070e44c106c48e15?s=80&d=identicon",
diff --git a/projects_test.go b/projects_test.go
index d3a1b97..9128b2e 100644
--- a/projects_test.go
+++ b/projects_test.go
@@ -296,7 +296,7 @@ func TestGetProjectByID(t *testing.T) {
 		  }`)
 	})
 
-	wantTimestamp := time.Date(2020, 0o1, 0o7, 21, 42, 58, 658000000, time.UTC)
+	wantTimestamp := time.Date(2020, 01, 07, 21, 42, 58, 658000000, time.UTC)
 	want := &Project{
 		ID:                       1,
 		ContainerRegistryEnabled: true,
@@ -431,6 +431,7 @@ func TestUploadFile(t *testing.T) {
 
 	file := bytes.NewBufferString("dummy")
 	projectFile, _, err := client.Projects.UploadFile(1, file, "test.txt")
+
 	if err != nil {
 		t.Fatalf("Projects.UploadFile returns an error: %v", err)
 	}
@@ -474,6 +475,7 @@ func TestUploadFile_Retry(t *testing.T) {
 
 	file := bytes.NewBufferString("dummy")
 	projectFile, _, err := client.Projects.UploadFile(1, file, "test.txt")
+
 	if err != nil {
 		t.Fatalf("Projects.UploadFile returns an error: %v", err)
 	}
@@ -499,6 +501,7 @@ func TestUploadAvatar(t *testing.T) {
 
 	avatar := new(bytes.Buffer)
 	_, _, err := client.Projects.UploadAvatar(1, avatar, "avatar.png")
+
 	if err != nil {
 		t.Fatalf("Projects.UploadAvatar returns an error: %v", err)
 	}
@@ -525,6 +528,7 @@ func TestUploadAvatar_Retry(t *testing.T) {
 
 	avatar := new(bytes.Buffer)
 	_, _, err := client.Projects.UploadAvatar(1, avatar, "avatar.png")
+
 	if err != nil {
 		t.Fatalf("Projects.UploadAvatar returns an error: %v", err)
 	}
@@ -842,7 +846,7 @@ func TestGetProjectApprovalRules(t *testing.T) {
 		]`)
 	})
 
-	approvals, _, err := client.Projects.GetProjectApprovalRules(1, nil)
+	approvals, _, err := client.Projects.GetProjectApprovalRules(1)
 	if err != nil {
 		t.Errorf("Projects.GetProjectApprovalRules returned error: %v", err)
 	}
@@ -1279,45 +1283,6 @@ func TestCreateProjectApprovalRule(t *testing.T) {
 	}
 }
 
-func TestGetProjectPullMirrorDetails(t *testing.T) {
-	mux, client := setup(t)
-
-	mux.HandleFunc("/api/v4/projects/1/mirror/pull", func(w http.ResponseWriter, r *http.Request) {
-		testMethod(t, r, http.MethodGet)
-		fmt.Fprint(w, `{
-		  "id": 101486,
-		  "last_error": null,
-		  "last_successful_update_at": "2020-01-06T17:32:02.823Z",
-		  "last_update_at": "2020-01-06T17:32:02.823Z",
-		  "last_update_started_at": "2020-01-06T17:31:55.864Z",
-		  "update_status": "finished",
-		  "url": "https://*****:*****@gitlab.com/gitlab-org/security/gitlab.git"
-		}`)
-	})
-
-	pullMirror, _, err := client.Projects.GetProjectPullMirrorDetails(1)
-	if err != nil {
-		t.Errorf("Projects.GetProjectPullMirrorDetails returned error: %v", err)
-	}
-
-	wantLastSuccessfulUpdateAtTimestamp := time.Date(2020, 0o1, 0o6, 17, 32, 0o2, 823000000, time.UTC)
-	wantLastUpdateAtTimestamp := time.Date(2020, 0o1, 0o6, 17, 32, 0o2, 823000000, time.UTC)
-	wantLastUpdateStartedAtTimestamp := time.Date(2020, 0o1, 0o6, 17, 31, 55, 864000000, time.UTC)
-	want := &ProjectPullMirrorDetails{
-		ID:                     101486,
-		LastError:              "",
-		LastSuccessfulUpdateAt: &wantLastSuccessfulUpdateAtTimestamp,
-		LastUpdateAt:           &wantLastUpdateAtTimestamp,
-		LastUpdateStartedAt:    &wantLastUpdateStartedAtTimestamp,
-		UpdateStatus:           "finished",
-		URL:                    "https://*****:*****@gitlab.com/gitlab-org/security/gitlab.git",
-	}
-
-	if !reflect.DeepEqual(want, pullMirror) {
-		t.Errorf("Projects.GetProjectPullMirrorDetails returned %+v, want %+v", pullMirror, want)
-	}
-}
-
 func TestCreateProjectApprovalRuleEligibleApprovers(t *testing.T) {
 	mux, client := setup(t)
 
diff --git a/protected_branches_test.go b/protected_branches_test.go
index ce0d5a3..25928a4 100644
--- a/protected_branches_test.go
+++ b/protected_branches_test.go
@@ -33,12 +33,10 @@ func TestListProtectedBranches(t *testing.T) {
 		"id":1,
 		"name":"master",
 		"push_access_levels":[{
-			"id":1,
 			"access_level":40,
 			"access_level_description":"Maintainers"
 		}],
 		"merge_access_levels":[{
-			"id":1,
 			"access_level":40,
 			"access_level_description":"Maintainers"
 		}],
@@ -57,14 +55,12 @@ func TestListProtectedBranches(t *testing.T) {
 			Name: "master",
 			PushAccessLevels: []*BranchAccessDescription{
 				{
-					ID:                     1,
 					AccessLevel:            40,
 					AccessLevelDescription: "Maintainers",
 				},
 			},
 			MergeAccessLevels: []*BranchAccessDescription{
 				{
-					ID:                     1,
 					AccessLevel:            40,
 					AccessLevelDescription: "Maintainers",
 				},
@@ -192,25 +188,12 @@ func TestUpdateRepositoryBranches(t *testing.T) {
 		if codeApprovalQueryParam != "true" {
 			t.Errorf("query param code_owner_approval_required should be true but was %s", codeApprovalQueryParam)
 		}
-		fmt.Fprintf(w, `{
-			"name": "master",
-			"code_owner_approval_required": true
-		}`)
 	})
-	opt := &UpdateProtectedBranchOptions{
+	opt := &RequireCodeOwnerApprovalsOptions{
 		CodeOwnerApprovalRequired: Bool(true),
 	}
-	protectedBranch, _, err := client.ProtectedBranches.UpdateProtectedBranch("1", "master", opt)
+	_, err := client.ProtectedBranches.RequireCodeOwnerApprovals("1", "master", opt)
 	if err != nil {
-		t.Errorf("ProtectedBranches.UpdateProtectedBranch returned error: %v", err)
-	}
-
-	want := &ProtectedBranch{
-		Name:                      "master",
-		CodeOwnerApprovalRequired: true,
-	}
-
-	if !reflect.DeepEqual(want, protectedBranch) {
-		t.Errorf("ProtectedBranches.UpdateProtectedBranch returned %+v, want %+v", protectedBranch, want)
+		t.Errorf("ProtectedBranches.UpdateRepositoryBranchesOptions returned error: %v", err)
 	}
 }
diff --git a/releaselinks_test.go b/releaselinks_test.go
index ff6f947..a77d9c6 100644
--- a/releaselinks_test.go
+++ b/releaselinks_test.go
@@ -69,8 +69,7 @@ func TestReleaseLinksService_CreateReleaseLink(t *testing.T) {
 			description: "Mandatory Attributes",
 			options: &CreateReleaseLinkOptions{
 				Name: String("awesome-v0.2.dmg"),
-				URL:  String("http://192.168.10.15:3000"),
-			},
+				URL:  String("http://192.168.10.15:3000")},
 			response: `{
 				"id":1,
 				"name":"awesome-v0.2.dmg",
diff --git a/repositories_test.go b/repositories_test.go
index ae63004..98f05f0 100644
--- a/repositories_test.go
+++ b/repositories_test.go
@@ -5,7 +5,6 @@ import (
 	"net/http"
 	"testing"
 
-	"github.com/stretchr/testify/assert"
 	"github.com/stretchr/testify/require"
 )
 
@@ -27,14 +26,13 @@ func TestRepositoriesService_ListTree(t *testing.T) {
 		`)
 	})
 
-	want := []*TreeNode{
-		{
-			ID:   "a1e8f8d745cc87e3a9248358d9352bb7f9a0aeba",
-			Name: "html",
-			Type: "tree",
-			Path: "files/html",
-			Mode: "040000",
-		},
+	want := []*TreeNode{{
+		ID:   "a1e8f8d745cc87e3a9248358d9352bb7f9a0aeba",
+		Name: "html",
+		Type: "tree",
+		Path: "files/html",
+		Mode: "040000",
+	},
 	}
 
 	tns, resp, err := client.Repositories.ListTree(1, nil)
@@ -389,44 +387,3 @@ func TestRepositoriesService_MergeBase(t *testing.T) {
 	require.Nil(t, c)
 	require.Equal(t, http.StatusNotFound, resp.StatusCode)
 }
-
-func TestAddChangelogData(t *testing.T) {
-	mux, client := setup(t)
-
-	mux.HandleFunc("/api/v4/projects/1/repository/changelog",
-		func(w http.ResponseWriter, r *http.Request) {
-			testMethod(t, r, http.MethodPost)
-			w.WriteHeader(http.StatusOK)
-		})
-
-	resp, err := client.Repositories.AddChangelog(
-		1,
-		&AddChangelogOptions{
-			Version: String("1.0.0"),
-		})
-	require.NoError(t, err)
-	assert.Equal(t, http.StatusOK, resp.StatusCode)
-}
-
-func TestGenerateChangelogData(t *testing.T) {
-	mux, client := setup(t)
-
-	mux.HandleFunc("/api/v4/projects/1/repository/changelog",
-		func(w http.ResponseWriter, r *http.Request) {
-			testMethod(t, r, http.MethodGet)
-			fmt.Fprint(w, exampleChangelogResponse)
-		})
-
-	want := &ChangelogData{
-		Notes: "## 1.0.0 (2021-11-17)\n\n### feature (2 changes)\n\n- [Title 2](namespace13/project13@ad608eb642124f5b3944ac0ac772fecaf570a6bf) ([merge request](namespace13/project13!2))\n- [Title 1](namespace13/project13@3c6b80ff7034fa0d585314e1571cc780596ce3c8) ([merge request](namespace13/project13!1))\n",
-	}
-
-	notes, _, err := client.Repositories.GenerateChangelogData(
-		1,
-		GenerateChangelogDataOptions{
-			Version: String("1.0.0"),
-		},
-	)
-	require.NoError(t, err)
-	assert.Equal(t, want, notes)
-}
diff --git a/repository_files_test.go b/repository_files_test.go
index 6945b6f..2af0a91 100644
--- a/repository_files_test.go
+++ b/repository_files_test.go
@@ -145,29 +145,27 @@ func TestRepositoryFilesService_GetFileBlame(t *testing.T) {
 		`)
 	})
 
-	want := []*FileBlameRange{
-		{
-			Commit: struct {
-				ID             string     `json:"id"`
-				ParentIDs      []string   `json:"parent_ids"`
-				Message        string     `json:"message"`
-				AuthoredDate   *time.Time `json:"authored_date"`
-				AuthorName     string     `json:"author_name"`
-				AuthorEmail    string     `json:"author_email"`
-				CommittedDate  *time.Time `json:"committed_date"`
-				CommitterName  string     `json:"committer_name"`
-				CommitterEmail string     `json:"committer_email"`
-			}{
-				ID:             "d42409d56517157c48bf3bd97d3f75974dde19fb",
-				ParentIDs:      []string{"cc6e14f9328fa6d7b5a0d3c30dc2002a3f2a3822"},
-				Message:        "Add feature also fix bug",
-				AuthorName:     "Venkatesh Thalluri",
-				AuthorEmail:    "venkatesh.thalluri@example.com",
-				CommitterName:  "Venkatesh Thalluri",
-				CommitterEmail: "venkatesh.thalluri@example.com",
-			},
-			Lines: []string{"require 'fileutils'", "require 'open3'"},
+	want := []*FileBlameRange{{
+		Commit: struct {
+			ID             string     `json:"id"`
+			ParentIDs      []string   `json:"parent_ids"`
+			Message        string     `json:"message"`
+			AuthoredDate   *time.Time `json:"authored_date"`
+			AuthorName     string     `json:"author_name"`
+			AuthorEmail    string     `json:"author_email"`
+			CommittedDate  *time.Time `json:"committed_date"`
+			CommitterName  string     `json:"committer_name"`
+			CommitterEmail string     `json:"committer_email"`
+		}{
+			ID:             "d42409d56517157c48bf3bd97d3f75974dde19fb",
+			ParentIDs:      []string{"cc6e14f9328fa6d7b5a0d3c30dc2002a3f2a3822"},
+			Message:        "Add feature also fix bug",
+			AuthorName:     "Venkatesh Thalluri",
+			AuthorEmail:    "venkatesh.thalluri@example.com",
+			CommitterName:  "Venkatesh Thalluri",
+			CommitterEmail: "venkatesh.thalluri@example.com",
 		},
+		Lines: []string{"require 'fileutils'", "require 'open3'"}},
 	}
 
 	fbr, resp, err := client.RepositoryFiles.GetFileBlame(13083, "path%2Fto%2Ffile.rb", nil)
diff --git a/request_options_test.go b/request_options_test.go
deleted file mode 100644
index 9e6a3fd..0000000
--- a/request_options_test.go
+++ /dev/null
@@ -1,163 +0,0 @@
-// Copyright 2021, Sander van Harmelen
-//
-// Licensed under the Apache License, Version 2.0 (the "License");
-// you may not use this file except in compliance with the License.
-// You may obtain a copy of the License at
-//
-//	http://www.apache.org/licenses/LICENSE-2.0
-//
-// Unless required by applicable law or agreed to in writing, software
-// distributed under the License is distributed on an "AS IS" BASIS,
-// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
-// See the License for the specific language governing permissions and
-// limitations under the License.
-package gitlab
-
-import (
-	"fmt"
-	"net/http"
-	"testing"
-	"time"
-
-	"github.com/stretchr/testify/assert"
-)
-
-func TestWithHeader(t *testing.T) {
-	mux, client := setup(t)
-	mux.HandleFunc("/api/v4/without-header", func(w http.ResponseWriter, r *http.Request) {
-		assert.Empty(t, r.Header.Get("X-CUSTOM-HEADER"))
-		w.WriteHeader(http.StatusOK)
-		fmt.Fprintf(w, `{"X-CUSTOM-HEADER": %s`, r.Header.Get("X-CUSTOM-HEADER"))
-	})
-	mux.HandleFunc("/api/v4/with-header", func(w http.ResponseWriter, r *http.Request) {
-		assert.Equal(t, "randomtokenstring", r.Header.Get("X-CUSTOM-HEADER"))
-		w.WriteHeader(http.StatusOK)
-		fmt.Fprintf(w, `{"X-CUSTOM-HEADER": %s`, r.Header.Get("X-CUSTOM-HEADER"))
-	})
-
-	// ensure that X-CUSTOM-HEADER hasn't been set at all
-	req, err := client.NewRequest(http.MethodGet, "/without-header", nil, nil)
-	assert.NoError(t, err)
-
-	_, err = client.Do(req, nil)
-	assert.NoError(t, err)
-
-	// ensure that X-CUSTOM-HEADER is set for only one request
-	req, err = client.NewRequest(
-		http.MethodGet,
-		"/with-header",
-		nil,
-		[]RequestOptionFunc{WithHeader("X-CUSTOM-HEADER", "randomtokenstring")},
-	)
-	assert.NoError(t, err)
-
-	_, err = client.Do(req, nil)
-	assert.NoError(t, err)
-
-	req, err = client.NewRequest(http.MethodGet, "/without-header", nil, nil)
-	assert.NoError(t, err)
-
-	_, err = client.Do(req, nil)
-	assert.NoError(t, err)
-
-	// ensure that X-CUSTOM-HEADER is set for all client requests
-	addr := client.BaseURL().String()
-	client, err = NewClient("",
-		// same base options as setup
-		WithBaseURL(addr),
-		// Disable backoff to speed up tests that expect errors.
-		WithCustomBackoff(func(_, _ time.Duration, _ int, _ *http.Response) time.Duration {
-			return 0
-		}),
-		// add client headers
-		WithRequestOptions(WithHeader("X-CUSTOM-HEADER", "randomtokenstring")))
-	assert.NoError(t, err)
-	assert.NotNil(t, client)
-
-	req, err = client.NewRequest(http.MethodGet, "/with-header", nil, nil)
-	assert.NoError(t, err)
-	assert.Equal(t, "randomtokenstring", req.Header.Get("X-CUSTOM-HEADER"))
-
-	_, err = client.Do(req, nil)
-	assert.NoError(t, err)
-
-	req, err = client.NewRequest(http.MethodGet, "/with-header", nil, nil)
-	assert.NoError(t, err)
-	assert.Equal(t, "randomtokenstring", req.Header.Get("X-CUSTOM-HEADER"))
-
-	_, err = client.Do(req, nil)
-	assert.NoError(t, err)
-}
-
-func TestWithHeaders(t *testing.T) {
-	mux, client := setup(t)
-	mux.HandleFunc("/api/v4/without-headers", func(w http.ResponseWriter, r *http.Request) {
-		assert.Empty(t, r.Header.Get("X-CUSTOM-HEADER-1"))
-		assert.Empty(t, r.Header.Get("X-CUSTOM-HEADER-2"))
-		w.WriteHeader(http.StatusOK)
-	})
-	mux.HandleFunc("/api/v4/with-headers", func(w http.ResponseWriter, r *http.Request) {
-		assert.Equal(t, "randomtokenstring", r.Header.Get("X-CUSTOM-HEADER-1"))
-		assert.Equal(t, "randomtokenstring2", r.Header.Get("X-CUSTOM-HEADER-2"))
-		w.WriteHeader(http.StatusOK)
-	})
-
-	headers := map[string]string{
-		"X-CUSTOM-HEADER-1": "randomtokenstring",
-		"X-CUSTOM-HEADER-2": "randomtokenstring2",
-	}
-
-	// ensure that X-CUSTOM-HEADER hasn't been set at all
-	req, err := client.NewRequest(http.MethodGet, "/without-headers", nil, nil)
-	assert.NoError(t, err)
-
-	_, err = client.Do(req, nil)
-	assert.NoError(t, err)
-
-	// ensure that X-CUSTOM-HEADER is set for only one request
-	req, err = client.NewRequest(
-		http.MethodGet,
-		"/with-headers",
-		nil,
-		[]RequestOptionFunc{WithHeaders(headers)},
-	)
-	assert.NoError(t, err)
-
-	_, err = client.Do(req, nil)
-	assert.NoError(t, err)
-
-	req, err = client.NewRequest(http.MethodGet, "/without-headers", nil, nil)
-	assert.NoError(t, err)
-
-	_, err = client.Do(req, nil)
-	assert.NoError(t, err)
-
-	// ensure that X-CUSTOM-HEADER is set for all client requests
-	addr := client.BaseURL().String()
-	client, err = NewClient("",
-		// same base options as setup
-		WithBaseURL(addr),
-		// Disable backoff to speed up tests that expect errors.
-		WithCustomBackoff(func(_, _ time.Duration, _ int, _ *http.Response) time.Duration {
-			return 0
-		}),
-		// add client headers
-		WithRequestOptions(WithHeaders(headers)),
-	)
-	assert.NoError(t, err)
-	assert.NotNil(t, client)
-
-	req, err = client.NewRequest(http.MethodGet, "/with-headers", nil, nil)
-	assert.NoError(t, err)
-	assert.Equal(t, "randomtokenstring", req.Header.Get("X-CUSTOM-HEADER-1"))
-
-	_, err = client.Do(req, nil)
-	assert.NoError(t, err)
-
-	req, err = client.NewRequest(http.MethodGet, "/with-headers", nil, nil)
-	assert.NoError(t, err)
-	assert.Equal(t, "randomtokenstring", req.Header.Get("X-CUSTOM-HEADER-1"))
-
-	_, err = client.Do(req, nil)
-	assert.NoError(t, err)
-}
diff --git a/users_test.go b/users_test.go
index 0cd9179..7321c50 100644
--- a/users_test.go
+++ b/users_test.go
@@ -48,7 +48,7 @@ func TestGetUser(t *testing.T) {
 		Name:         "John Smith",
 		State:        "active",
 		WebURL:       "http://localhost:3000/john_smith",
-		CreatedAt:    Time(time.Date(2012, time.May, 23, 8, 0o0, 58, 0, time.UTC)),
+		CreatedAt:    Time(time.Date(2012, time.May, 23, 8, 00, 58, 0, time.UTC)),
 		Bio:          "Bio of John Smith",
 		Location:     "USA",
 		PublicEmail:  "john@example.com",
@@ -109,7 +109,7 @@ func TestGetUserAdmin(t *testing.T) {
 		CurrentSignInIP:  &currentSignInIP,
 		LastSignInAt:     Time(time.Date(2012, time.June, 1, 11, 41, 1, 0, time.UTC)),
 		LastSignInIP:     &lastSignInIP,
-		ConfirmedAt:      Time(time.Date(2012, time.May, 23, 9, 0o5, 22, 0, time.UTC)),
+		ConfirmedAt:      Time(time.Date(2012, time.May, 23, 9, 05, 22, 0, time.UTC)),
 		TwoFactorEnabled: true,
 		Note:             "DMCA Request: 2018-11-05 | DMCA Violation | Abuse | https://gitlab.zendesk.com/agent/tickets/123",
 		Identities:       []*UserIdentity{{Provider: "github", ExternUID: "2435223452345"}},