Commit dfc0d4f7 authored by jbguerraz's avatar jbguerraz Committed by Sander van Harmelen

Added Confidential Issue Hook (#352)

parent 59398cab
...@@ -665,19 +665,20 @@ type ProjectMember struct { ...@@ -665,19 +665,20 @@ type ProjectMember struct {
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#list-project-hooks // https://docs.gitlab.com/ce/api/projects.html#list-project-hooks
type ProjectHook struct { type ProjectHook struct {
ID int `json:"id"` ID int `json:"id"`
URL string `json:"url"` URL string `json:"url"`
ProjectID int `json:"project_id"` ProjectID int `json:"project_id"`
PushEvents bool `json:"push_events"` PushEvents bool `json:"push_events"`
IssuesEvents bool `json:"issues_events"` IssuesEvents bool `json:"issues_events"`
MergeRequestsEvents bool `json:"merge_requests_events"` ConfidentialIssuesEvents bool `json:"confidential_issues_events"`
TagPushEvents bool `json:"tag_push_events"` MergeRequestsEvents bool `json:"merge_requests_events"`
NoteEvents bool `json:"note_events"` TagPushEvents bool `json:"tag_push_events"`
JobEvents bool `json:"job_events"` NoteEvents bool `json:"note_events"`
PipelineEvents bool `json:"pipeline_events"` JobEvents bool `json:"job_events"`
WikiPageEvents bool `json:"wiki_page_events"` PipelineEvents bool `json:"pipeline_events"`
EnableSSLVerification bool `json:"enable_ssl_verification"` WikiPageEvents bool `json:"wiki_page_events"`
CreatedAt *time.Time `json:"created_at"` EnableSSLVerification bool `json:"enable_ssl_verification"`
CreatedAt *time.Time `json:"created_at"`
} }
// ListProjectHooksOptions represents the available ListProjectHooks() options. // ListProjectHooksOptions represents the available ListProjectHooks() options.
...@@ -740,17 +741,18 @@ func (s *ProjectsService) GetProjectHook(pid interface{}, hook int, options ...O ...@@ -740,17 +741,18 @@ func (s *ProjectsService) GetProjectHook(pid interface{}, hook int, options ...O
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#add-project-hook // https://docs.gitlab.com/ce/api/projects.html#add-project-hook
type AddProjectHookOptions struct { type AddProjectHookOptions struct {
URL *string `url:"url,omitempty" json:"url,omitempty"` URL *string `url:"url,omitempty" json:"url,omitempty"`
PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"`
IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"`
MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"`
TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"`
NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"` NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"`
PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"`
WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"` PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"`
EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"` WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"`
Token *string `url:"token,omitempty" json:"token,omitempty"` EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"`
Token *string `url:"token,omitempty" json:"token,omitempty"`
} }
// AddProjectHook adds a hook to a specified project. // AddProjectHook adds a hook to a specified project.
...@@ -783,17 +785,18 @@ func (s *ProjectsService) AddProjectHook(pid interface{}, opt *AddProjectHookOpt ...@@ -783,17 +785,18 @@ func (s *ProjectsService) AddProjectHook(pid interface{}, opt *AddProjectHookOpt
// GitLab API docs: // GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#edit-project-hook // https://docs.gitlab.com/ce/api/projects.html#edit-project-hook
type EditProjectHookOptions struct { type EditProjectHookOptions struct {
URL *string `url:"url,omitempty" json:"url,omitempty"` URL *string `url:"url,omitempty" json:"url,omitempty"`
PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"` PushEvents *bool `url:"push_events,omitempty" json:"push_events,omitempty"`
IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"` IssuesEvents *bool `url:"issues_events,omitempty" json:"issues_events,omitempty"`
MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"` ConfidentialIssuesEvents *bool `url:"confidential_issues_events,omitempty" json:"confidential_issues_events,omitempty"`
TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"` MergeRequestsEvents *bool `url:"merge_requests_events,omitempty" json:"merge_requests_events,omitempty"`
NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"` TagPushEvents *bool `url:"tag_push_events,omitempty" json:"tag_push_events,omitempty"`
JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"` NoteEvents *bool `url:"note_events,omitempty" json:"note_events,omitempty"`
PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"` JobEvents *bool `url:"job_events,omitempty" json:"job_events,omitempty"`
WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"` PipelineEvents *bool `url:"pipeline_events,omitempty" json:"pipeline_events,omitempty"`
EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"` WikiPageEvents *bool `url:"wiki_page_events,omitempty" json:"wiki_page_events,omitempty"`
Token *string `url:"token,omitempty" json:"token,omitempty"` EnableSSLVerification *bool `url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"`
Token *string `url:"token,omitempty" json:"token,omitempty"`
} }
// EditProjectHook edits a hook for a specified project. // EditProjectHook edits a hook for a specified project.
......
...@@ -34,18 +34,19 @@ type ServicesService struct { ...@@ -34,18 +34,19 @@ type ServicesService struct {
// //
// GitLab API docs: https://docs.gitlab.com/ce/api/services.html // GitLab API docs: https://docs.gitlab.com/ce/api/services.html
type Service struct { type Service struct {
ID int `json:"id"` ID int `json:"id"`
Title string `json:"title"` Title string `json:"title"`
CreatedAt *time.Time `json:"created_at"` CreatedAt *time.Time `json:"created_at"`
UpdatedAt *time.Time `json:"updated_at"` UpdatedAt *time.Time `json:"updated_at"`
Active bool `json:"active"` Active bool `json:"active"`
PushEvents bool `json:"push_events"` PushEvents bool `json:"push_events"`
IssuesEvents bool `json:"issues_events"` IssuesEvents bool `json:"issues_events"`
MergeRequestsEvents bool `json:"merge_requests_events"` ConfidentialIssuesEvents bool `json:"confidential_issues_events"`
TagPushEvents bool `json:"tag_push_events"` MergeRequestsEvents bool `json:"merge_requests_events"`
NoteEvents bool `json:"note_events"` TagPushEvents bool `json:"tag_push_events"`
PipelineEvents bool `json:"pipeline_events"` NoteEvents bool `json:"note_events"`
JobEvents bool `json:"job_events"` PipelineEvents bool `json:"pipeline_events"`
JobEvents bool `json:"job_events"`
} }
// SetGitLabCIServiceOptions represents the available SetGitLabCIService() // SetGitLabCIServiceOptions represents the available SetGitLabCIService()
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment