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
e6c11edf
Commit
e6c11edf
authored
May 18, 2017
by
Andrea Funtò
Committed by
Sander van Harmelen
May 18, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Added missing parameters to ProjectCreate (#175)
parent
bbd2dd70
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
23 additions
and
31 deletions
+23
-31
projects.go
projects.go
+23
-31
No files found.
projects.go
View file @
e6c11edf
...
...
@@ -378,24 +378,26 @@ func (s *ProjectsService) GetProjectEvents(pid interface{}, opt *GetProjectEvent
// GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/projects.md#create-project
type
CreateProjectOptions
struct
{
Name
*
string
`url:"name,omitempty" json:"name,omitempty"`
Path
*
string
`url:"path,omitempty" json:"path,omitempty"`
NamespaceID
*
int
`url:"namespace_id,omitempty" json:"namespace_id,omitempty"`
Description
*
string
`url:"description,omitempty" json:"description,omitempty"`
IssuesEnabled
*
bool
`url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"`
MergeRequestsEnabled
*
bool
`url:"merge_requests_enabled,omitempty" json:"merge_requests_enabled,omitempty"`
BuildsEnabled
*
bool
`url:"builds_enabled,omitempty" json:"builds_enabled,omitempty"`
WikiEnabled
*
bool
`url:"wiki_enabled,omitempty" json:"wiki_enabled,omitempty"`
SnippetsEnabled
*
bool
`url:"snippets_enabled,omitempty" json:"snippets_enabled,omitempty"`
ContainerRegistryEnabled
*
bool
`url:"container_registry_enabled,omitempty" json:"container_registry_enabled,omitempty"`
SharedRunnersEnabled
*
bool
`url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"`
Public
*
bool
`url:"public,omitempty" json:"public,omitempty"`
VisibilityLevel
*
VisibilityLevelValue
`url:"visibility_level,omitempty" json:"visibility_level,omitempty"`
ImportURL
*
string
`url:"import_url,omitempty" json:"import_url,omitempty"`
PublicBuilds
*
bool
`url:"public_builds,omitempty" json:"public_builds,omitempty"`
OnlyAllowMergeIfBuildSucceeds
*
bool
`url:"only_allow_merge_if_build_succeeds,omitempty" json:"only_allow_merge_if_build_succeeds,omitempty"`
LFSEnabled
*
bool
`url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"`
RequestAccessEnabled
*
bool
`url:"request_access_enabled,omitempty" json:"request_access_enabled,omitempty"`
Name
*
string
`url:"name,omitempty" json:"name,omitempty"`
Path
*
string
`url:"path,omitempty" json:"path,omitempty"`
DefaultBranch
*
string
`url:"default_branch,omitempty" json:"default_branch,omitempty"`
// note: this does not work
NamespaceID
*
int
`url:"namespace_id,omitempty" json:"namespace_id,omitempty"`
Description
*
string
`url:"description,omitempty" json:"description,omitempty"`
IssuesEnabled
*
bool
`url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"`
MergeRequestsEnabled
*
bool
`url:"merge_requests_enabled,omitempty" json:"merge_requests_enabled,omitempty"`
BuildsEnabled
*
bool
`url:"builds_enabled,omitempty" json:"builds_enabled,omitempty"`
WikiEnabled
*
bool
`url:"wiki_enabled,omitempty" json:"wiki_enabled,omitempty"`
SnippetsEnabled
*
bool
`url:"snippets_enabled,omitempty" json:"snippets_enabled,omitempty"`
ContainerRegistryEnabled
*
bool
`url:"container_registry_enabled,omitempty" json:"container_registry_enabled,omitempty"`
SharedRunnersEnabled
*
bool
`url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"`
Public
*
bool
`url:"public,omitempty" json:"public,omitempty"`
VisibilityLevel
*
VisibilityLevelValue
`url:"visibility_level,omitempty" json:"visibility_level,omitempty"`
ImportURL
*
string
`url:"import_url,omitempty" json:"import_url,omitempty"`
PublicBuilds
*
bool
`url:"public_builds,omitempty" json:"public_builds,omitempty"`
OnlyAllowMergeIfBuildSucceeds
*
bool
`url:"only_allow_merge_if_build_succeeds,omitempty" json:"only_allow_merge_if_build_succeeds,omitempty"`
OnlyAllowMergeIfAllDiscussionsAreResolved
*
bool
`url:"only_allow_merge_if_all_discussions_are_resolved,omitempty" json:"only_allow_merge_if_all_discussions_are_resolved,omitempty"`
LFSEnabled
*
bool
`url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"`
RequestAccessEnabled
*
bool
`url:"request_access_enabled,omitempty" json:"request_access_enabled,omitempty"`
}
// CreateProject creates a new project owned by the authenticated user.
...
...
@@ -418,22 +420,12 @@ func (s *ProjectsService) CreateProject(opt *CreateProjectOptions, options ...Op
}
// CreateProjectForUserOptions represents the available CreateProjectForUser()
// options.
// options; these are identical to those for an ordinary Project, since the
// required "user_id" parameter is provided in the request URL.
//
// GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/projects.md#create-project-for-user
type
CreateProjectForUserOptions
struct
{
Name
*
string
`url:"name,omitempty" json:"name,omitempty"`
Description
*
string
`url:"description,omitempty" json:"description,omitempty"`
DefaultBranch
*
string
`url:"default_branch,omitempty" json:"default_branch,omitempty"`
IssuesEnabled
*
bool
`url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"`
MergeRequestsEnabled
*
bool
`url:"merge_requests_enabled,omitempty" json:"merge_requests_enabled,omitempty"`
WikiEnabled
*
bool
`url:"wiki_enabled,omitempty" json:"wiki_enabled,omitempty"`
SnippetsEnabled
*
bool
`url:"snippets_enabled,omitempty" json:"snippets_enabled,omitempty"`
Public
*
bool
`url:"public,omitempty" json:"public,omitempty"`
VisibilityLevel
*
VisibilityLevelValue
`url:"visibility_level,omitempty" json:"visibility_level,omitempty"`
ImportURL
*
string
`url:"import_url,omitempty" json:"import_url,omitempty"`
}
type
CreateProjectForUserOptions
CreateProjectOptions
// CreateProjectForUser creates a new project owned by the specified user.
// Available only for admins.
...
...
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