diff --git a/event_webhook_types.go b/event_webhook_types.go index 7cce8b520..7266836af 100644 --- a/event_webhook_types.go +++ b/event_webhook_types.go @@ -724,7 +724,7 @@ type MergeEvent struct { MergeStatus struct { Previous string `json:"previous"` Current string `json:"current"` - }`json:"merge_status"` + } `json:"merge_status"` MilestoneID struct { Previous int `json:"previous"` Current int `json:"current"` diff --git a/runners.go b/runners.go index 49663d5bb..8c255f792 100644 --- a/runners.go +++ b/runners.go @@ -52,20 +52,20 @@ type Runner struct { // // GitLab API docs: https://docs.gitlab.com/ee/api/runners.html type RunnerDetails struct { - Paused bool `json:"paused"` - Architecture string `json:"architecture"` - Description string `json:"description"` - ID int `json:"id"` - IPAddress string `json:"ip_address"` - IsShared bool `json:"is_shared"` - RunnerType string `json:"runner_type"` - ContactedAt *time.Time `json:"contacted_at"` - MaintenanceNote string `json:"maintenance_note"` - Name string `json:"name"` - Online bool `json:"online"` - Status string `json:"status"` - Platform string `json:"platform"` - Projects []struct { + Paused bool `json:"paused"` + Architecture string `json:"architecture"` + Description string `json:"description"` + ID int `json:"id"` + IPAddress string `json:"ip_address"` + IsShared bool `json:"is_shared"` + RunnerType string `json:"runner_type"` + ContactedAt *time.Time `json:"contacted_at"` + MaintenanceNote string `json:"maintenance_note"` + Name string `json:"name"` + Online bool `json:"online"` + Status string `json:"status"` + Platform string `json:"platform"` + Projects []struct { ID int `json:"id"` Name string `json:"name"` NameWithNamespace string `json:"name_with_namespace"` @@ -174,14 +174,14 @@ func (s *RunnersService) GetRunnerDetails(rid interface{}, options ...RequestOpt // GitLab API docs: // https://docs.gitlab.com/ee/api/runners.html#update-runners-details type UpdateRunnerDetailsOptions struct { - Description *string `url:"description,omitempty" json:"description,omitempty"` - Paused *bool `url:"paused,omitempty" json:"paused,omitempty"` - TagList *[]string `url:"tag_list[],omitempty" json:"tag_list,omitempty"` - RunUntagged *bool `url:"run_untagged,omitempty" json:"run_untagged,omitempty"` - Locked *bool `url:"locked,omitempty" json:"locked,omitempty"` - AccessLevel *string `url:"access_level,omitempty" json:"access_level,omitempty"` - MaximumTimeout *int `url:"maximum_timeout,omitempty" json:"maximum_timeout,omitempty"` - MaintenanceNote *string `url:"maintenance_note,omitempty" json:"maintenance_note,omitempty"` + Description *string `url:"description,omitempty" json:"description,omitempty"` + Paused *bool `url:"paused,omitempty" json:"paused,omitempty"` + TagList *[]string `url:"tag_list[],omitempty" json:"tag_list,omitempty"` + RunUntagged *bool `url:"run_untagged,omitempty" json:"run_untagged,omitempty"` + Locked *bool `url:"locked,omitempty" json:"locked,omitempty"` + AccessLevel *string `url:"access_level,omitempty" json:"access_level,omitempty"` + MaximumTimeout *int `url:"maximum_timeout,omitempty" json:"maximum_timeout,omitempty"` + MaintenanceNote *string `url:"maintenance_note,omitempty" json:"maintenance_note,omitempty"` // Deprecated: Use Paused instead. (Deprecated in GitLab 14.8) Active *bool `url:"active,omitempty" json:"active,omitempty"` diff --git a/users_test.go b/users_test.go index 280959289..a5e15ba00 100644 --- a/users_test.go +++ b/users_test.go @@ -893,6 +893,7 @@ func TestUploadAvatarUser(t *testing.T) { t.Fatalf("Users.UploadAvatar returns an error: %v", err) } } + func TestListServiceAccounts(t *testing.T) { mux, client := setup(t)