Skip to content

Commit

Permalink
Reorder following the ordering in the docs
Browse files Browse the repository at this point in the history
  • Loading branch information
svanharmelen committed Apr 18, 2024
1 parent 01138b9 commit 3c617d4
Show file tree
Hide file tree
Showing 3 changed files with 18 additions and 18 deletions.
6 changes: 3 additions & 3 deletions group_hooks.go
Expand Up @@ -44,11 +44,11 @@ type GroupHook struct {
ReleasesEvents bool `json:"releases_events"`
SubGroupEvents bool `json:"subgroup_events"`
MemberEvents bool `json:"member_events"`
ResourceAccessTokenEvents bool `json:"resource_access_token_events"`
EnableSSLVerification bool `json:"enable_ssl_verification"`
AlertStatus string `json:"alert_status"`
CreatedAt *time.Time `json:"created_at"`
CustomWebhookTemplate string `json:"custom_webhook_template"`
ResourceAccessTokenEvents bool `json:"resource_access_token_events"`
}

// ListGroupHooksOptions represents the available ListGroupHooks() options.
Expand Down Expand Up @@ -124,9 +124,9 @@ type AddGroupHookOptions struct {
ReleasesEvents *bool `url:"releases_events,omitempty" json:"releases_events,omitempty"`
SubGroupEvents *bool `url:"subgroup_events,omitempty" json:"subgroup_events,omitempty"`
MemberEvents *bool `url:"member_events,omitempty" json:"member_events,omitempty"`
ResourceAccessTokenEvents *bool `url:"resource_access_token_events,omitempty" json:"resource_access_token_events,omitempty"`
EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"`
Token *string `url:"token,omitempty" json:"token,omitempty"`
ResourceAccessTokenEvents *bool `url:"resource_access_token_events,omitempty" json:"resource_access_token_events,omitempty"`
CustomWebhookTemplate *string `url:"custom_webhook_template,omitempty" json:"custom_webhook_template,omitempty"`
}

Expand Down Expand Up @@ -175,9 +175,9 @@ type EditGroupHookOptions struct {
ReleasesEvents *bool `url:"releases_events,omitempty" json:"releases_events,omitempty"`
SubGroupEvents *bool `url:"subgroup_events,omitempty" json:"subgroup_events,omitempty"`
MemberEvents *bool `url:"member_events,omitempty" json:"member_events,omitempty"`
ResourceAccessTokenEvents *bool `url:"resource_access_token_events,omitempty" json:"resource_access_token_events,omitempty"`
EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"`
Token *string `url:"token,omitempty" json:"token,omitempty"`
ResourceAccessTokenEvents *bool `url:"resource_access_token_events,omitempty" json:"resource_access_token_events,omitempty"`
CustomWebhookTemplate *string `url:"custom_webhook_template,omitempty" json:"custom_webhook_template,omitempty"`
}

Expand Down
24 changes: 12 additions & 12 deletions group_hooks_test.go
Expand Up @@ -49,10 +49,10 @@ func TestListGroupHooks(t *testing.T) {
"releases_events": true,
"subgroup_events": true,
"member_events": true,
"resource_access_token_events": true,
"enable_ssl_verification": true,
"alert_status": "executable",
"created_at": "2012-10-12T17:04:47Z"
"created_at": "2012-10-12T17:04:47Z",
"resource_access_token_events": true
}
]`)
})
Expand Down Expand Up @@ -81,10 +81,10 @@ func TestListGroupHooks(t *testing.T) {
ReleasesEvents: true,
SubGroupEvents: true,
MemberEvents: true,
ResourceAccessTokenEvents: true,
EnableSSLVerification: true,
AlertStatus: "executable",
CreatedAt: &datePointer,
ResourceAccessTokenEvents: true,
}}

if !reflect.DeepEqual(groupHooks, want) {
Expand Down Expand Up @@ -116,10 +116,10 @@ func TestGetGroupHook(t *testing.T) {
"releases_events": true,
"subgroup_events": true,
"member_events": true,
"resource_access_token_events": true,
"enable_ssl_verification": true,
"alert_status": "executable",
"created_at": "2012-10-12T17:04:47Z"
"created_at": "2012-10-12T17:04:47Z",
"resource_access_token_events": true
}`)
})

Expand Down Expand Up @@ -147,10 +147,10 @@ func TestGetGroupHook(t *testing.T) {
ReleasesEvents: true,
SubGroupEvents: true,
MemberEvents: true,
ResourceAccessTokenEvents: true,
EnableSSLVerification: true,
AlertStatus: "executable",
CreatedAt: &datePointer,
ResourceAccessTokenEvents: true,
}

if !reflect.DeepEqual(groupHook, want) {
Expand Down Expand Up @@ -182,10 +182,10 @@ func TestAddGroupHook(t *testing.T) {
"releases_events": true,
"subgroup_events": true,
"member_events": true,
"resource_access_token_events": true,
"enable_ssl_verification": true,
"created_at": "2012-10-12T17:04:47Z",
"custom_webhook_template": "addTestValue"
"custom_webhook_template": "addTestValue",
"resource_access_token_events": true
}`)
})

Expand Down Expand Up @@ -219,10 +219,10 @@ func TestAddGroupHook(t *testing.T) {
ReleasesEvents: true,
SubGroupEvents: true,
MemberEvents: true,
ResourceAccessTokenEvents: true,
EnableSSLVerification: true,
CreatedAt: &datePointer,
CustomWebhookTemplate: "addTestValue",
ResourceAccessTokenEvents: true,
}

if !reflect.DeepEqual(groupHooks, want) {
Expand Down Expand Up @@ -254,10 +254,10 @@ func TestEditGroupHook(t *testing.T) {
"releases_events": true,
"subgroup_events": true,
"member_events": true,
"resource_access_token_events": true,
"enable_ssl_verification": true,
"created_at": "2012-10-12T17:04:47Z",
"custom_webhook_template": "testValue"
"custom_webhook_template": "testValue",
"resource_access_token_events": true
}`)
})

Expand Down Expand Up @@ -291,10 +291,10 @@ func TestEditGroupHook(t *testing.T) {
ReleasesEvents: true,
SubGroupEvents: true,
MemberEvents: true,
ResourceAccessTokenEvents: true,
EnableSSLVerification: true,
CreatedAt: &datePointer,
CustomWebhookTemplate: "testValue",
ResourceAccessTokenEvents: true,
}

if !reflect.DeepEqual(groupHooks, want) {
Expand Down
6 changes: 3 additions & 3 deletions projects.go
Expand Up @@ -1215,9 +1215,9 @@ type ProjectHook struct {
WikiPageEvents bool `json:"wiki_page_events"`
DeploymentEvents bool `json:"deployment_events"`
ReleasesEvents bool `json:"releases_events"`
ResourceAccessTokenEvents bool `json:"resource_access_token_events"`
EnableSSLVerification bool `json:"enable_ssl_verification"`
CreatedAt *time.Time `json:"created_at"`
ResourceAccessTokenEvents bool `json:"resource_access_token_events"`
CustomWebhookTemplate string `json:"custom_webhook_template"`
}

Expand Down Expand Up @@ -1293,11 +1293,11 @@ type AddProjectHookOptions struct {
PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"`
PushEventsBranchFilter *string `url:"push_events_branch_filter,omitempty" json:"push_events_branch_filter,omitempty"`
ReleasesEvents *bool `url:"releases_events,omitempty" json:"releases_events,omitempty"`
ResourceAccessTokenEvents *bool `url:"resource_access_token_events,omitempty" json:"resource_access_token_events,omitempty"`
TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
Token *string `url:"token,omitempty" json:"token,omitempty"`
URL *string `url:"url,omitempty" json:"url,omitempty"`
WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"`
ResourceAccessTokenEvents *bool `url:"resource_access_token_events,omitempty" json:"resource_access_token_events,omitempty"`
CustomWebhookTemplate *string `url:"custom_webhook_template,omitempty" json:"custom_webhook_template,omitempty"`
}

Expand Down Expand Up @@ -1343,11 +1343,11 @@ type EditProjectHookOptions struct {
PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"`
PushEventsBranchFilter *string `url:"push_events_branch_filter,omitempty" json:"push_events_branch_filter,omitempty"`
ReleasesEvents *bool `url:"releases_events,omitempty" json:"releases_events,omitempty"`
ResourceAccessTokenEvents *bool `url:"resource_access_token_events,omitempty" json:"resource_access_token_events,omitempty"`
TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
Token *string `url:"token,omitempty" json:"token,omitempty"`
URL *string `url:"url,omitempty" json:"url,omitempty"`
WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"`
ResourceAccessTokenEvents *bool `url:"resource_access_token_events,omitempty" json:"resource_access_token_events,omitempty"`
CustomWebhookTemplate *string `url:"custom_webhook_template,omitempty" json:"custom_webhook_template,omitempty"`
}

Expand Down

0 comments on commit 3c617d4

Please sign in to comment.