Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in
Toggle navigation
G
go-gitlab
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
go
go-gitlab
Commits
dfc0d4f7
Commit
dfc0d4f7
authored
Mar 05, 2018
by
jbguerraz
Committed by
Sander van Harmelen
Mar 05, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added Confidential Issue Hook (#352)
parent
59398cab
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
51 additions
and
47 deletions
+51
-47
projects.go
projects.go
+38
-35
services.go
services.go
+13
-12
No files found.
projects.go
View file @
dfc0d4f7
...
...
@@ -665,19 +665,20 @@ type ProjectMember struct {
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#list-project-hooks
type
ProjectHook
struct
{
ID
int
`json:"id"`
URL
string
`json:"url"`
ProjectID
int
`json:"project_id"`
PushEvents
bool
`json:"push_events"`
IssuesEvents
bool
`json:"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"`
EnableSSLVerification
bool
`json:"enable_ssl_verification"`
CreatedAt
*
time
.
Time
`json:"created_at"`
ID
int
`json:"id"`
URL
string
`json:"url"`
ProjectID
int
`json:"project_id"`
PushEvents
bool
`json:"push_events"`
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"`
EnableSSLVerification
bool
`json:"enable_ssl_verification"`
CreatedAt
*
time
.
Time
`json:"created_at"`
}
// ListProjectHooksOptions represents the available ListProjectHooks() options.
...
...
@@ -740,17 +741,18 @@ func (s *ProjectsService) GetProjectHook(pid interface{}, hook int, options ...O
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#add-project-hook
type
AddProjectHookOptions
struct
{
URL
*
string
`url:"url,omitempty" json:"url,omitempty"`
PushEvents
*
bool
`url:"push_events,omitempty" json:"push_events,omitempty"`
IssuesEvents
*
bool
`url:"issues_events,omitempty" json:"issues_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"`
EnableSSLVerification
*
bool
`url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"`
Token
*
string
`url:"token,omitempty" json:"token,omitempty"`
URL
*
string
`url:"url,omitempty" json:"url,omitempty"`
PushEvents
*
bool
`url:"push_events,omitempty" json:"push_events,omitempty"`
IssuesEvents
*
bool
`url:"issues_events,omitempty" json:"issues_events,omitempty"`
ConfidentialIssuesEvents
*
bool
`url:"confidential_issues_events,omitempty" json:"confidential_issues_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"`
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.
...
...
@@ -783,17 +785,18 @@ func (s *ProjectsService) AddProjectHook(pid interface{}, opt *AddProjectHookOpt
// GitLab API docs:
// https://docs.gitlab.com/ce/api/projects.html#edit-project-hook
type
EditProjectHookOptions
struct
{
URL
*
string
`url:"url,omitempty" json:"url,omitempty"`
PushEvents
*
bool
`url:"push_events,omitempty" json:"push_events,omitempty"`
IssuesEvents
*
bool
`url:"issues_events,omitempty" json:"issues_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"`
EnableSSLVerification
*
bool
`url:"enable_ssl_verification,omitempty" json:"enable_ssl_verification,omitempty"`
Token
*
string
`url:"token,omitempty" json:"token,omitempty"`
URL
*
string
`url:"url,omitempty" json:"url,omitempty"`
PushEvents
*
bool
`url:"push_events,omitempty" json:"push_events,omitempty"`
IssuesEvents
*
bool
`url:"issues_events,omitempty" json:"issues_events,omitempty"`
ConfidentialIssuesEvents
*
bool
`url:"confidential_issues_events,omitempty" json:"confidential_issues_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"`
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.
...
...
services.go
View file @
dfc0d4f7
...
...
@@ -34,18 +34,19 @@ type ServicesService struct {
//
// GitLab API docs: https://docs.gitlab.com/ce/api/services.html
type
Service
struct
{
ID
int
`json:"id"`
Title
string
`json:"title"`
CreatedAt
*
time
.
Time
`json:"created_at"`
UpdatedAt
*
time
.
Time
`json:"updated_at"`
Active
bool
`json:"active"`
PushEvents
bool
`json:"push_events"`
IssuesEvents
bool
`json:"issues_events"`
MergeRequestsEvents
bool
`json:"merge_requests_events"`
TagPushEvents
bool
`json:"tag_push_events"`
NoteEvents
bool
`json:"note_events"`
PipelineEvents
bool
`json:"pipeline_events"`
JobEvents
bool
`json:"job_events"`
ID
int
`json:"id"`
Title
string
`json:"title"`
CreatedAt
*
time
.
Time
`json:"created_at"`
UpdatedAt
*
time
.
Time
`json:"updated_at"`
Active
bool
`json:"active"`
PushEvents
bool
`json:"push_events"`
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"`
PipelineEvents
bool
`json:"pipeline_events"`
JobEvents
bool
`json:"job_events"`
}
// SetGitLabCIServiceOptions represents the available SetGitLabCIService()
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment