Commit b75d90fc authored by seelensonne's avatar seelensonne Committed by Sander van Harmelen

Add missing project options (#91)

- gitlab.CreateProjectOptions.ContainerRegistryEnabled
- gitlab.Project.OnlyAllowMergeIfBuildSucceeds
- gitlab.Project.LFSEnabled
- gitlab.Project.RequestAccessEnabled
- gitlab.Project.ContainerRegistryEnabled
parent 81953bbc
...@@ -34,38 +34,42 @@ type ProjectsService struct { ...@@ -34,38 +34,42 @@ type ProjectsService struct {
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html // GitLab API docs: http://doc.gitlab.com/ce/api/projects.html
type Project struct { type Project struct {
ID int `json:"id"` ID int `json:"id"`
Description string `json:"description"` Description string `json:"description"`
DefaultBranch string `json:"default_branch"` DefaultBranch string `json:"default_branch"`
Public bool `json:"public"` Public bool `json:"public"`
VisibilityLevel VisibilityLevelValue `json:"visibility_level"` VisibilityLevel VisibilityLevelValue `json:"visibility_level"`
SSHURLToRepo string `json:"ssh_url_to_repo"` SSHURLToRepo string `json:"ssh_url_to_repo"`
HTTPURLToRepo string `json:"http_url_to_repo"` HTTPURLToRepo string `json:"http_url_to_repo"`
WebURL string `json:"web_url"` WebURL string `json:"web_url"`
TagList []string `json:"tag_list"` TagList []string `json:"tag_list"`
Owner *User `json:"owner"` Owner *User `json:"owner"`
Name string `json:"name"` Name string `json:"name"`
NameWithNamespace string `json:"name_with_namespace"` NameWithNamespace string `json:"name_with_namespace"`
Path string `json:"path"` Path string `json:"path"`
PathWithNamespace string `json:"path_with_namespace"` PathWithNamespace string `json:"path_with_namespace"`
IssuesEnabled bool `json:"issues_enabled"` IssuesEnabled bool `json:"issues_enabled"`
OpenIssuesCount int `json:"open_issues_count"` OpenIssuesCount int `json:"open_issues_count"`
MergeRequestsEnabled bool `json:"merge_requests_enabled"` MergeRequestsEnabled bool `json:"merge_requests_enabled"`
BuildsEnabled bool `json:"builds_enabled"` BuildsEnabled bool `json:"builds_enabled"`
WikiEnabled bool `json:"wiki_enabled"` WikiEnabled bool `json:"wiki_enabled"`
SnippetsEnabled bool `json:"snippets_enabled"` SnippetsEnabled bool `json:"snippets_enabled"`
CreatedAt *time.Time `json:"created_at,omitempty"` ContainerRegistryEnabled bool `json:"container_registry_enabled"`
LastActivityAt *time.Time `json:"last_activity_at,omitempty"` CreatedAt *time.Time `json:"created_at,omitempty"`
CreatorID int `json:"creator_id"` LastActivityAt *time.Time `json:"last_activity_at,omitempty"`
Namespace *ProjectNamespace `json:"namespace"` CreatorID int `json:"creator_id"`
Permissions *Permissions `json:"permissions"` Namespace *ProjectNamespace `json:"namespace"`
Archived bool `json:"archived"` Permissions *Permissions `json:"permissions"`
AvatarURL string `json:"avatar_url"` Archived bool `json:"archived"`
SharedRunnersEnabled bool `json:"shared_runners_enabled"` AvatarURL string `json:"avatar_url"`
ForksCount int `json:"forks_count"` SharedRunnersEnabled bool `json:"shared_runners_enabled"`
StarCount int `json:"star_count"` ForksCount int `json:"forks_count"`
RunnersToken string `json:"runners_token"` StarCount int `json:"star_count"`
PublicBuilds bool `json:"public_builds"` RunnersToken string `json:"runners_token"`
PublicBuilds bool `json:"public_builds"`
OnlyAllowMergeIfBuildSucceeds bool `json:"only_allow_merge_if_build_succeeds"`
LFSEnabled bool `json:"lfs_enabled"`
RequestAccessEnabled bool `json:"request_access_enabled"`
} }
// Repository represents a repository. // Repository represents a repository.
...@@ -348,6 +352,7 @@ type CreateProjectOptions struct { ...@@ -348,6 +352,7 @@ type CreateProjectOptions struct {
BuildsEnabled *bool `url:"builds_enabled,omitempty" json:"builds_enabled,omitempty"` BuildsEnabled *bool `url:"builds_enabled,omitempty" json:"builds_enabled,omitempty"`
WikiEnabled *bool `url:"wiki_enabled,omitempty" json:"wiki_enabled,omitempty"` WikiEnabled *bool `url:"wiki_enabled,omitempty" json:"wiki_enabled,omitempty"`
SnippetsEnabled *bool `url:"snippets_enabled,omitempty" json:"snippets_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"` SharedRunnersEnabled *bool `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"`
Public *bool `url:"public,omitempty" json:"public,omitempty"` Public *bool `url:"public,omitempty" json:"public,omitempty"`
VisibilityLevel *VisibilityLevelValue `url:"visibility_level,omitempty" json:"visibility_level,omitempty"` VisibilityLevel *VisibilityLevelValue `url:"visibility_level,omitempty" json:"visibility_level,omitempty"`
...@@ -423,16 +428,24 @@ func (s *ProjectsService) CreateProjectForUser( ...@@ -423,16 +428,24 @@ func (s *ProjectsService) CreateProjectForUser(
// //
// GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#edit-project // GitLab API docs: http://doc.gitlab.com/ce/api/projects.html#edit-project
type EditProjectOptions struct { type EditProjectOptions 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"`
Description *string `url:"description,omitempty" json:"description,omitempty"` Description *string `url:"description,omitempty" json:"description,omitempty"`
DefaultBranch *string `url:"default_branch,omitempty" json:"default_branch,omitempty"` DefaultBranch *string `url:"default_branch,omitempty" json:"default_branch,omitempty"`
IssuesEnabled *bool `url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"` IssuesEnabled *bool `url:"issues_enabled,omitempty" json:"issues_enabled,omitempty"`
MergeRequestsEnabled *bool `url:"merge_requests_enabled,omitempty" json:"merge_requests_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"`
Public *bool `url:"public,omitempty" json:"public,omitempty"` SnippetsEnabled *bool `url:"snippets_enabled,omitempty" json:"snippets_enabled,omitempty"`
VisibilityLevel *VisibilityLevelValue `url:"visibility_level,omitempty" json:"visibility_level,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 *bool `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"`
} }
// EditProject updates an existing project. // EditProject updates an existing project.
......
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