Commit e6c11edf authored by Andrea Funtò's avatar Andrea Funtò Committed by Sander van Harmelen

Added missing parameters to ProjectCreate (#175)

parent bbd2dd70
...@@ -378,24 +378,26 @@ func (s *ProjectsService) GetProjectEvents(pid interface{}, opt *GetProjectEvent ...@@ -378,24 +378,26 @@ func (s *ProjectsService) GetProjectEvents(pid interface{}, opt *GetProjectEvent
// GitLab API docs: // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/projects.md#create-project // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/projects.md#create-project
type CreateProjectOptions struct { type CreateProjectOptions struct {
Name *string `url:"name,omitempty" json:"name,omitempty"` Name *string `url:"name,omitempty" json:"name,omitempty"`
Path *string `url:"path,omitempty" json:"path,omitempty"` Path *string `url:"path,omitempty" json:"path,omitempty"`
NamespaceID *int `url:"namespace_id,omitempty" json:"namespace_id,omitempty"` DefaultBranch *string `url:"default_branch,omitempty" json:"default_branch,omitempty"` // note: this does not work
Description *string `url:"description,omitempty" json:"description,omitempty"` NamespaceID *int `url:"namespace_id,omitempty" json:"namespace_id,omitempty"`
IssuesEnabled *bool `url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
MergeRequestsEnabled *bool `url:"merge_requests_enabled,omitempty" json:"merge_requests_enabled,omitempty"` IssuesEnabled *bool `url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"`
BuildsEnabled *bool `url:"builds_enabled,omitempty" json:"builds_enabled,omitempty"` MergeRequestsEnabled *bool `url:"merge_requests_enabled,omitempty" json:"merge_requests_enabled,omitempty"`
WikiEnabled *bool `url:"wiki_enabled,omitempty" json:"wiki_enabled,omitempty"` BuildsEnabled *bool `url:"builds_enabled,omitempty" json:"builds_enabled,omitempty"`
SnippetsEnabled *bool `url:"snippets_enabled,omitempty" json:"snippets_enabled,omitempty"` WikiEnabled *bool `url:"wiki_enabled,omitempty" json:"wiki_enabled,omitempty"`
ContainerRegistryEnabled *bool `url:"container_registry_enabled,omitempty" json:"container_registry_enabled,omitempty"` SnippetsEnabled *bool `url:"snippets_enabled,omitempty" json:"snippets_enabled,omitempty"`
SharedRunnersEnabled *bool `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"` ContainerRegistryEnabled *bool `url:"container_registry_enabled,omitempty" json:"container_registry_enabled,omitempty"`
Public *bool `url:"public,omitempty" json:"public,omitempty"` SharedRunnersEnabled *bool `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"`
VisibilityLevel *VisibilityLevelValue `url:"visibility_level,omitempty" json:"visibility_level,omitempty"` Public *bool `url:"public,omitempty" json:"public,omitempty"`
ImportURL *string `url:"import_url,omitempty" json:"import_url,omitempty"` VisibilityLevel *VisibilityLevelValue `url:"visibility_level,omitempty" json:"visibility_level,omitempty"`
PublicBuilds *bool `url:"public_builds,omitempty" json:"public_builds,omitempty"` ImportURL *string `url:"import_url,omitempty" json:"import_url,omitempty"`
OnlyAllowMergeIfBuildSucceeds *bool `url:"only_allow_merge_if_build_succeeds,omitempty" json:"only_allow_merge_if_build_succeeds,omitempty"` PublicBuilds *bool `url:"public_builds,omitempty" json:"public_builds,omitempty"`
LFSEnabled *bool `url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"` OnlyAllowMergeIfBuildSucceeds *bool `url:"only_allow_merge_if_build_succeeds,omitempty" json:"only_allow_merge_if_build_succeeds,omitempty"`
RequestAccessEnabled *bool `url:"request_access_enabled,omitempty" json:"request_access_enabled,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. // CreateProject creates a new project owned by the authenticated user.
...@@ -418,22 +420,12 @@ func (s *ProjectsService) CreateProject(opt *CreateProjectOptions, options ...Op ...@@ -418,22 +420,12 @@ func (s *ProjectsService) CreateProject(opt *CreateProjectOptions, options ...Op
} }
// CreateProjectForUserOptions represents the available CreateProjectForUser() // 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: // GitLab API docs:
// https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/projects.md#create-project-for-user // https://gitlab.com/gitlab-org/gitlab-ce/blob/8-16-stable/doc/api/projects.md#create-project-for-user
type CreateProjectForUserOptions struct { type CreateProjectForUserOptions CreateProjectOptions
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"`
}
// CreateProjectForUser creates a new project owned by the specified user. // CreateProjectForUser creates a new project owned by the specified user.
// Available only for admins. // Available only for admins.
......
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