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
......@@ -54,6 +54,7 @@ type Project struct {
BuildsEnabled bool `json:"builds_enabled"`
WikiEnabled bool `json:"wiki_enabled"`
SnippetsEnabled bool `json:"snippets_enabled"`
ContainerRegistryEnabled bool `json:"container_registry_enabled"`
CreatedAt *time.Time `json:"created_at,omitempty"`
LastActivityAt *time.Time `json:"last_activity_at,omitempty"`
CreatorID int `json:"creator_id"`
......@@ -66,6 +67,9 @@ type Project struct {
StarCount int `json:"star_count"`
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.
......@@ -348,6 +352,7 @@ type CreateProjectOptions struct {
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"`
......@@ -429,10 +434,18 @@ type EditProjectOptions struct {
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"`
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 *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.
......
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