diff --git a/group_hooks.go b/group_hooks.go index 56f2fae6e..09e812a5f 100644 --- a/group_hooks.go +++ b/group_hooks.go @@ -26,27 +26,29 @@ import ( // // GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#list-group-hooks type GroupHook struct { - ID int `json:"id"` - URL string `json:"url"` - GroupID int `json:"group_id"` - PushEvents bool `json:"push_events"` - PushEventsBranchFilter string `json:"push_events_branch_filter"` - IssuesEvents bool `json:"issues_events"` - ConfidentialIssuesEvents bool `json:"confidential_issues_events"` - ConfidentialNoteEvents bool `json:"confidential_note_events"` - MergeRequestsEvents bool `json:"merge_requests_events"` - TagPushEvents bool `json:"tag_push_events"` - NoteEvents bool `json:"note_events"` - JobEvents bool `json:"job_events"` - PipelineEvents bool `json:"pipeline_events"` - WikiPageEvents bool `json:"wiki_page_events"` - DeploymentEvents bool `json:"deployment_events"` - ReleasesEvents bool `json:"releases_events"` - SubGroupEvents bool `json:"subgroup_events"` - EnableSSLVerification bool `json:"enable_ssl_verification"` - AlertStatus string `json:"alert_status"` - CreatedAt *time.Time `json:"created_at"` - CustomWebhookTemplate string `json:"custom_webhook_template"` + ID int `json:"id"` + URL string `json:"url"` + GroupID int `json:"group_id"` + PushEvents bool `json:"push_events"` + PushEventsBranchFilter string `json:"push_events_branch_filter"` + IssuesEvents bool `json:"issues_events"` + ConfidentialIssuesEvents bool `json:"confidential_issues_events"` + ConfidentialNoteEvents bool `json:"confidential_note_events"` + MergeRequestsEvents bool `json:"merge_requests_events"` + TagPushEvents bool `json:"tag_push_events"` + NoteEvents bool `json:"note_events"` + JobEvents bool `json:"job_events"` + PipelineEvents bool `json:"pipeline_events"` + WikiPageEvents bool `json:"wiki_page_events"` + DeploymentEvents bool `json:"deployment_events"` + ReleasesEvents bool `json:"releases_events"` + SubGroupEvents bool `json:"subgroup_events"` + MemberEvents bool `json:"member_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. @@ -106,24 +108,26 @@ func (s *GroupsService) GetGroupHook(pid interface{}, hook int, options ...Reque // // GitLab API docs: https://docs.gitlab.com/ee/api/groups.html#add-group-hook type AddGroupHookOptions struct { - URL *string `url:"url,omitempty" json:"url,omitempty"` - PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` - PushEventsBranchFilter *string `url:"push_events_branch_filter,omitempty" json:"push_events_branch_filter,omitempty"` - IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` - ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` - ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` - MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` - TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` - NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` - JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"` - PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` - WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"` - DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` - ReleasesEvents *bool `url:"releases_events,omitempty" json:"releases_events,omitempty"` - SubGroupEvents *bool `url:"subgroup_events,omitempty" json:"subgroup_events,omitempty"` - EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"` - Token *string `url:"token,omitempty" json:"token,omitempty"` - CustomWebhookTemplate *string `url:"custom_webhook_template,omitempty" json:"custom_webhook_template,omitempty"` + URL *string `url:"url,omitempty" json:"url,omitempty"` + PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` + PushEventsBranchFilter *string `url:"push_events_branch_filter,omitempty" json:"push_events_branch_filter,omitempty"` + IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` + ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` + ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` + MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` + TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` + NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` + JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"` + PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` + WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"` + DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` + 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"` + 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"` } // AddGroupHook create a new group scoped webhook. @@ -155,24 +159,26 @@ func (s *GroupsService) AddGroupHook(gid interface{}, opt *AddGroupHookOptions, // GitLab API docs: // https://docs.gitlab.com/ee/api/groups.html#edit-group-hook type EditGroupHookOptions struct { - URL *string `url:"url,omitempty" json:"url,omitempty"` - PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` - PushEventsBranchFilter *string `url:"push_events_branch_filter,omitempty" json:"push_events_branch_filter,omitempty"` - IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` - ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` - ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` - MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` - TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` - NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` - JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"` - PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` - WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"` - DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` - ReleasesEvents *bool `url:"releases_events,omitempty" json:"releases_events,omitempty"` - SubGroupEvents *bool `url:"subgroup_events,omitempty" json:"subgroup_events,omitempty"` - EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"` - Token *string `url:"token,omitempty" json:"token,omitempty"` - CustomWebhookTemplate *string `url:"custom_webhook_template,omitempty" json:"custom_webhook_template,omitempty"` + URL *string `url:"url,omitempty" json:"url,omitempty"` + PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` + PushEventsBranchFilter *string `url:"push_events_branch_filter,omitempty" json:"push_events_branch_filter,omitempty"` + IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` + ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` + ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` + MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` + TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` + NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` + JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"` + PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` + WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"` + DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` + 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"` + 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"` } // EditGroupHook edits a hook for a specified group. diff --git a/group_hooks_test.go b/group_hooks_test.go index 20083e5f9..cb434ebb8 100644 --- a/group_hooks_test.go +++ b/group_hooks_test.go @@ -48,9 +48,11 @@ func TestListGroupHooks(t *testing.T) { "deployment_events": true, "releases_events": true, "subgroup_events": true, + "member_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 } ]`) }) @@ -62,25 +64,27 @@ func TestListGroupHooks(t *testing.T) { datePointer := time.Date(2012, 10, 12, 17, 4, 47, 0, time.UTC) want := []*GroupHook{{ - ID: 1, - URL: "http://example.com/hook", - GroupID: 3, - PushEvents: true, - PushEventsBranchFilter: "main", - IssuesEvents: true, - ConfidentialIssuesEvents: true, - MergeRequestsEvents: true, - TagPushEvents: true, - NoteEvents: true, - JobEvents: true, - PipelineEvents: true, - WikiPageEvents: true, - DeploymentEvents: true, - ReleasesEvents: true, - SubGroupEvents: true, - EnableSSLVerification: true, - AlertStatus: "executable", - CreatedAt: &datePointer, + ID: 1, + URL: "http://example.com/hook", + GroupID: 3, + PushEvents: true, + PushEventsBranchFilter: "main", + IssuesEvents: true, + ConfidentialIssuesEvents: true, + MergeRequestsEvents: true, + TagPushEvents: true, + NoteEvents: true, + JobEvents: true, + PipelineEvents: true, + WikiPageEvents: true, + DeploymentEvents: true, + ReleasesEvents: true, + SubGroupEvents: true, + MemberEvents: true, + EnableSSLVerification: true, + AlertStatus: "executable", + CreatedAt: &datePointer, + ResourceAccessTokenEvents: true, }} if !reflect.DeepEqual(groupHooks, want) { @@ -111,9 +115,11 @@ func TestGetGroupHook(t *testing.T) { "deployment_events": true, "releases_events": true, "subgroup_events": true, + "member_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 }`) }) @@ -124,25 +130,27 @@ func TestGetGroupHook(t *testing.T) { datePointer := time.Date(2012, 10, 12, 17, 4, 47, 0, time.UTC) want := &GroupHook{ - ID: 1, - URL: "http://example.com/hook", - GroupID: 3, - PushEvents: true, - PushEventsBranchFilter: "main", - IssuesEvents: true, - ConfidentialIssuesEvents: true, - MergeRequestsEvents: true, - TagPushEvents: true, - NoteEvents: true, - JobEvents: true, - PipelineEvents: true, - WikiPageEvents: true, - DeploymentEvents: true, - ReleasesEvents: true, - SubGroupEvents: true, - EnableSSLVerification: true, - AlertStatus: "executable", - CreatedAt: &datePointer, + ID: 1, + URL: "http://example.com/hook", + GroupID: 3, + PushEvents: true, + PushEventsBranchFilter: "main", + IssuesEvents: true, + ConfidentialIssuesEvents: true, + MergeRequestsEvents: true, + TagPushEvents: true, + NoteEvents: true, + JobEvents: true, + PipelineEvents: true, + WikiPageEvents: true, + DeploymentEvents: true, + ReleasesEvents: true, + SubGroupEvents: true, + MemberEvents: true, + EnableSSLVerification: true, + AlertStatus: "executable", + CreatedAt: &datePointer, + ResourceAccessTokenEvents: true, } if !reflect.DeepEqual(groupHook, want) { @@ -173,9 +181,11 @@ func TestAddGroupHook(t *testing.T) { "deployment_events": true, "releases_events": true, "subgroup_events": true, + "member_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 }`) }) @@ -191,26 +201,28 @@ func TestAddGroupHook(t *testing.T) { datePointer := time.Date(2012, 10, 12, 17, 4, 47, 0, time.UTC) want := &GroupHook{ - ID: 1, - URL: "http://example.com/hook", - GroupID: 3, - PushEvents: true, - PushEventsBranchFilter: "main", - IssuesEvents: true, - ConfidentialIssuesEvents: true, - ConfidentialNoteEvents: false, - MergeRequestsEvents: true, - TagPushEvents: true, - NoteEvents: true, - JobEvents: true, - PipelineEvents: true, - WikiPageEvents: true, - DeploymentEvents: true, - ReleasesEvents: true, - SubGroupEvents: true, - EnableSSLVerification: true, - CreatedAt: &datePointer, - CustomWebhookTemplate: "addTestValue", + ID: 1, + URL: "http://example.com/hook", + GroupID: 3, + PushEvents: true, + PushEventsBranchFilter: "main", + IssuesEvents: true, + ConfidentialIssuesEvents: true, + ConfidentialNoteEvents: false, + MergeRequestsEvents: true, + TagPushEvents: true, + NoteEvents: true, + JobEvents: true, + PipelineEvents: true, + WikiPageEvents: true, + DeploymentEvents: true, + ReleasesEvents: true, + SubGroupEvents: true, + MemberEvents: true, + EnableSSLVerification: true, + CreatedAt: &datePointer, + CustomWebhookTemplate: "addTestValue", + ResourceAccessTokenEvents: true, } if !reflect.DeepEqual(groupHooks, want) { @@ -241,9 +253,11 @@ func TestEditGroupHook(t *testing.T) { "deployment_events": true, "releases_events": true, "subgroup_events": true, + "member_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 }`) }) @@ -259,26 +273,28 @@ func TestEditGroupHook(t *testing.T) { datePointer := time.Date(2012, 10, 12, 17, 4, 47, 0, time.UTC) want := &GroupHook{ - ID: 1, - URL: "http://example.com/hook", - GroupID: 3, - PushEvents: true, - PushEventsBranchFilter: "main", - IssuesEvents: true, - ConfidentialIssuesEvents: true, - ConfidentialNoteEvents: false, - MergeRequestsEvents: true, - TagPushEvents: true, - NoteEvents: true, - JobEvents: true, - PipelineEvents: true, - WikiPageEvents: true, - DeploymentEvents: true, - ReleasesEvents: true, - SubGroupEvents: true, - EnableSSLVerification: true, - CreatedAt: &datePointer, - CustomWebhookTemplate: "testValue", + ID: 1, + URL: "http://example.com/hook", + GroupID: 3, + PushEvents: true, + PushEventsBranchFilter: "main", + IssuesEvents: true, + ConfidentialIssuesEvents: true, + ConfidentialNoteEvents: false, + MergeRequestsEvents: true, + TagPushEvents: true, + NoteEvents: true, + JobEvents: true, + PipelineEvents: true, + WikiPageEvents: true, + DeploymentEvents: true, + ReleasesEvents: true, + SubGroupEvents: true, + MemberEvents: true, + EnableSSLVerification: true, + CreatedAt: &datePointer, + CustomWebhookTemplate: "testValue", + ResourceAccessTokenEvents: true, } if !reflect.DeepEqual(groupHooks, want) { diff --git a/projects.go b/projects.go index 8edd9cc2b..7c9e4334a 100644 --- a/projects.go +++ b/projects.go @@ -1202,25 +1202,26 @@ type ProjectMember struct { // GitLab API docs: // https://docs.gitlab.com/ee/api/projects.html#list-project-hooks type ProjectHook struct { - ID int `json:"id"` - URL string `json:"url"` - ConfidentialNoteEvents bool `json:"confidential_note_events"` - ProjectID int `json:"project_id"` - PushEvents bool `json:"push_events"` - PushEventsBranchFilter string `json:"push_events_branch_filter"` - IssuesEvents bool `json:"issues_events"` - ConfidentialIssuesEvents bool `json:"confidential_issues_events"` - MergeRequestsEvents bool `json:"merge_requests_events"` - TagPushEvents bool `json:"tag_push_events"` - NoteEvents bool `json:"note_events"` - JobEvents bool `json:"job_events"` - PipelineEvents bool `json:"pipeline_events"` - WikiPageEvents bool `json:"wiki_page_events"` - DeploymentEvents bool `json:"deployment_events"` - ReleasesEvents bool `json:"releases_events"` - EnableSSLVerification bool `json:"enable_ssl_verification"` - CreatedAt *time.Time `json:"created_at"` - CustomWebhookTemplate string `json:"custom_webhook_template"` + ID int `json:"id"` + URL string `json:"url"` + ConfidentialNoteEvents bool `json:"confidential_note_events"` + ProjectID int `json:"project_id"` + PushEvents bool `json:"push_events"` + PushEventsBranchFilter string `json:"push_events_branch_filter"` + IssuesEvents bool `json:"issues_events"` + ConfidentialIssuesEvents bool `json:"confidential_issues_events"` + MergeRequestsEvents bool `json:"merge_requests_events"` + TagPushEvents bool `json:"tag_push_events"` + NoteEvents bool `json:"note_events"` + JobEvents bool `json:"job_events"` + PipelineEvents bool `json:"pipeline_events"` + WikiPageEvents bool `json:"wiki_page_events"` + DeploymentEvents bool `json:"deployment_events"` + ReleasesEvents bool `json:"releases_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"` } // ListProjectHooksOptions represents the available ListProjectHooks() options. @@ -1283,23 +1284,24 @@ func (s *ProjectsService) GetProjectHook(pid interface{}, hook int, options ...R // GitLab API docs: // https://docs.gitlab.com/ee/api/projects.html#add-project-hook type AddProjectHookOptions struct { - ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` - ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` - DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` - EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"` - IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` - JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"` - MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` - NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` - PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` - 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"` - 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"` - CustomWebhookTemplate *string `url:"custom_webhook_template,omitempty" json:"custom_webhook_template,omitempty"` + ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` + ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` + DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` + EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"` + IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` + JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"` + MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` + NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` + PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` + 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"` + 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"` } // AddProjectHook adds a hook to a specified project. @@ -1332,23 +1334,24 @@ func (s *ProjectsService) AddProjectHook(pid interface{}, opt *AddProjectHookOpt // GitLab API docs: // https://docs.gitlab.com/ee/api/projects.html#edit-project-hook type EditProjectHookOptions struct { - ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` - ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` - DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` - EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"` - IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` - JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"` - MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` - NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` - PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` - 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"` - 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"` - CustomWebhookTemplate *string `url:"custom_webhook_template,omitempty" json:"custom_webhook_template,omitempty"` + ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"` + ConfidentialNoteEvents *bool `url:"confidential_note_events,omitempty" json:"confidential_note_events,omitempty"` + DeploymentEvents *bool `url:"deployment_events,omitempty" json:"deployment_events,omitempty"` + EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"` + IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` + JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"` + MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` + NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` + PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` + 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"` + 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"` } // EditProjectHook edits a hook for a specified project.