Skip to content
This repository has been archived by the owner on Dec 10, 2024. It is now read-only.

Add missing project properties #1661

Merged
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
29 changes: 29 additions & 0 deletions projects.go
Original file line number Diff line number Diff line change
Expand Up @@ -78,6 +78,8 @@ type Project struct {
LicenseURL string `json:"license_url"`
License *ProjectLicense `json:"license"`
SharedRunnersEnabled bool `json:"shared_runners_enabled"`
GroupRunnersEnabled bool `json:"group_runners_enabled"`
RunnerTokenExpirationInterval int `json:"runner_token_expiration_interval"`
ForksCount int `json:"forks_count"`
StarCount int `json:"star_count"`
RunnersToken string `json:"runners_token"`
Expand All @@ -90,6 +92,7 @@ type Project struct {
RepositoryStorage string `json:"repository_storage"`
RequestAccessEnabled bool `json:"request_access_enabled"`
MergeMethod MergeMethodValue `json:"merge_method"`
CanCreateMergeRequestIn bool `json:"can_create_merge_request_in"`
ForkedFromProject *ForkParent `json:"forked_from_project"`
Mirror bool `json:"mirror"`
MirrorUserID int `json:"mirror_user_id"`
Expand All @@ -110,6 +113,10 @@ type Project struct {
PagesAccessLevel AccessControlValue `json:"pages_access_level"`
OperationsAccessLevel AccessControlValue `json:"operations_access_level"`
AnalyticsAccessLevel AccessControlValue `json:"analytics_access_level"`
EnvironmentsAccessLevel AccessControlValue `json:"environments_access_level"`
FeatureFlagsAccessLevel AccessControlValue `json:"feature_flags_access_level"`
InfrastructureAccessLevel AccessControlValue `json:"infrastructure_access_level"`
MonitorAccessLevel AccessControlValue `json:"monitor_access_level"`
AutocloseReferencedIssues bool `json:"autoclose_referenced_issues"`
SuggestionCommitMessage string `json:"suggestion_commit_message"`
SquashOption SquashOptionValue `json:"squash_option"`
Expand All @@ -129,6 +136,9 @@ type Project struct {
CIDefaultGitDepth int `json:"ci_default_git_depth"`
CIForwardDeploymentEnabled bool `json:"ci_forward_deployment_enabled"`
CISeperateCache bool `json:"ci_separated_caches"`
CIJobTokenScopeEnabled bool `json:"ci_job_token_scope_enabled"`
CIOptInJWT bool `json:"ci_opt_in_jwt"`
CIAllowForkPipelinesToRunInParentProject bool `json:"ci_allow_fork_pipelines_to_run_in_parent_project"`
PublicJobs bool `json:"public_jobs"`
BuildTimeout int `json:"build_timeout"`
AutoCancelPendingPipelines string `json:"auto_cancel_pending_pipelines"`
Expand All @@ -138,6 +148,7 @@ type Project struct {
BuildCoverageRegex string `json:"build_coverage_regex"`
IssuesTemplate string `json:"issues_template"`
MergeRequestsTemplate string `json:"merge_requests_template"`
IssueBranchTemplate string `json:"issue_branch_template"`
KeepLatestArtifact bool `json:"keep_latest_artifact"`
MergePipelinesEnabled bool `json:"merge_pipelines_enabled"`
MergeTrainsEnabled bool `json:"merge_trains_enabled"`
Expand All @@ -149,7 +160,9 @@ type Project struct {
BuildGitStrategy string `json:"build_git_strategy"`
EmailsDisabled bool `json:"emails_disabled"`
ExternalAuthorizationClassificationLabel string `json:"external_authorization_classification_label"`
RequirementsEnabled bool `json:"requirements_enabled"`
RequirementsAccessLevel AccessControlValue `json:"requirements_access_level"`
SecurityAndComplianceEnabled bool `json:"security_and_compliance_enabled"`
SecurityAndComplianceAccessLevel AccessControlValue `json:"security_and_compliance_access_level"`
MergeRequestDefaultTargetSelf bool `json:"mr_default_target_self"`

Expand Down Expand Up @@ -207,6 +220,7 @@ type Links struct {
Labels string `json:"labels"`
Events string `json:"events"`
Members string `json:"members"`
ClusterAgents string `json:"cluster_agents"`
}

// Permissions represents permissions.
Expand Down Expand Up @@ -307,6 +321,7 @@ type ListProjectsOptions struct {
Archived *bool `url:"archived,omitempty" json:"archived,omitempty"`
IDAfter *int `url:"id_after,omitempty" json:"id_after,omitempty"`
IDBefore *int `url:"id_before,omitempty" json:"id_before,omitempty"`
Imported *bool `url:"imported,omitempty" json:"imported,omitempty"`
LastActivityAfter *time.Time `url:"last_activity_after,omitempty" json:"last_activity_after,omitempty"`
LastActivityBefore *time.Time `url:"last_activity_before,omitempty" json:"last_activity_before,omitempty"`
Membership *bool `url:"membership,omitempty" json:"membership,omitempty"`
Expand Down Expand Up @@ -618,6 +633,7 @@ func (s *ProjectsService) GetProjectEvents(pid interface{}, opt *GetProjectEvent
// GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#create-project
type CreateProjectOptions struct {
AllowMergeOnSkippedPipeline *bool `url:"allow_merge_on_skipped_pipeline,omitempty" json:"allow_merge_on_skipped_pipeline,omitempty"`
OnlyAllowMergeIfAllStatusChecksPassed *bool `url:"only_allow_merge_if_all_status_checks_passed" json:"only_allow_merge_if_all_status_checks_passed"`
AnalyticsAccessLevel *AccessControlValue `url:"analytics_access_level,omitempty" json:"analytics_access_level,omitempty"`
ApprovalsBeforeMerge *int `url:"approvals_before_merge,omitempty" json:"approvals_before_merge,omitempty"`
AutoCancelPendingPipelines *string `url:"auto_cancel_pending_pipelines,omitempty" json:"auto_cancel_pending_pipelines,omitempty"`
Expand All @@ -642,6 +658,7 @@ type CreateProjectOptions struct {
ImportURL *string `url:"import_url,omitempty" json:"import_url,omitempty"`
InitializeWithReadme *bool `url:"initialize_with_readme,omitempty" json:"initialize_with_readme,omitempty"`
IssuesAccessLevel *AccessControlValue `url:"issues_access_level,omitempty" json:"issues_access_level,omitempty"`
IssueBranchTemplate *string `url:"issue_branch_template,omitempty" json:"issue_branch_template,omitempty"`
LFSEnabled *bool `url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"`
MergeCommitTemplate *string `url:"merge_commit_template,omitempty" json:"merge_commit_template,omitempty"`
MergeMethod *MergeMethodValue `url:"merge_method,omitempty" json:"merge_method,omitempty"`
Expand All @@ -660,6 +677,10 @@ type CreateProjectOptions struct {
Path *string `url:"path,omitempty" json:"path,omitempty"`
PublicBuilds *bool `url:"public_builds,omitempty" json:"public_builds,omitempty"`
ReleasesAccessLevel *AccessControlValue `url:"releases_access_level,omitempty" json:"releases_access_level,omitempty"`
EnvironmentsAccessLevel *AccessControlValue `url:"environments_access_level,omitempty" json:"environments_access_level,omitempty"`
FeatureFlagsAccessLevel *AccessControlValue `url:"feature_flags_access_level,omitempty" json:"feature_flags_access_level,omitempty"`
InfrastructureAccessLevel *AccessControlValue `url:"infrastructure_access_level,omitempty" json:"infrastructure_access_level,omitempty"`
MonitorAccessLevel *AccessControlValue `url:"monitor_access_level,omitempty" json:"monitor_access_level,omitempty"`
RemoveSourceBranchAfterMerge *bool `url:"remove_source_branch_after_merge,omitempty" json:"remove_source_branch_after_merge,omitempty"`
PrintingMergeRequestLinkEnabled *bool `url:"printing_merge_request_link_enabled,omitempty" json:"printing_merge_request_link_enabled,omitempty"`
RepositoryAccessLevel *AccessControlValue `url:"repository_access_level,omitempty" json:"repository_access_level,omitempty"`
Expand All @@ -669,6 +690,7 @@ type CreateProjectOptions struct {
ResolveOutdatedDiffDiscussions *bool `url:"resolve_outdated_diff_discussions,omitempty" json:"resolve_outdated_diff_discussions,omitempty"`
SecurityAndComplianceAccessLevel *AccessControlValue `url:"security_and_compliance_access_level,omitempty" json:"security_and_compliance_access_level,omitempty"`
SharedRunnersEnabled *bool `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"`
GroupRunnersEnabled *bool `url:"group_runners_enabled,omitempty" json:"group_runners_enabled,omitempty"`
ShowDefaultAwardEmojis *bool `url:"show_default_award_emojis,omitempty" json:"show_default_award_emojis,omitempty"`
SnippetsAccessLevel *AccessControlValue `url:"snippets_access_level,omitempty" json:"snippets_access_level,omitempty"`
SquashCommitTemplate *string `url:"squash_commit_template,omitempty" json:"squash_commit_template,omitempty"`
Expand Down Expand Up @@ -831,6 +853,7 @@ func (s *ProjectsService) CreateProjectForUser(user int, opt *CreateProjectForUs
// GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#edit-project
type EditProjectOptions struct {
AllowMergeOnSkippedPipeline *bool `url:"allow_merge_on_skipped_pipeline,omitempty" json:"allow_merge_on_skipped_pipeline,omitempty"`
OnlyAllowMergeIfAllStatusChecksPassed *bool `url:"only_allow_merge_if_all_status_checks_passed" json:"only_allow_merge_if_all_status_checks_passed"`
AnalyticsAccessLevel *AccessControlValue `url:"analytics_access_level,omitempty" json:"analytics_access_level,omitempty"`
ApprovalsBeforeMerge *int `url:"approvals_before_merge,omitempty" json:"approvals_before_merge,omitempty"`
AutoCancelPendingPipelines *string `url:"auto_cancel_pending_pipelines,omitempty" json:"auto_cancel_pending_pipelines,omitempty"`
Expand All @@ -856,6 +879,7 @@ type EditProjectOptions struct {
ForkingAccessLevel *AccessControlValue `url:"forking_access_level,omitempty" json:"forking_access_level,omitempty"`
ImportURL *string `url:"import_url,omitempty" json:"import_url,omitempty"`
IssuesAccessLevel *AccessControlValue `url:"issues_access_level,omitempty" json:"issues_access_level,omitempty"`
IssueBranchTemplate *string `url:"issue_branch_template,omitempty" json:"issue_branch_template,omitempty"`
IssuesTemplate *string `url:"issues_template,omitempty" json:"issues_template,omitempty"`
KeepLatestArtifact *bool `url:"keep_latest_artifact,omitempty" json:"keep_latest_artifact,omitempty"`
LFSEnabled *bool `url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"`
Expand All @@ -880,6 +904,10 @@ type EditProjectOptions struct {
Path *string `url:"path,omitempty" json:"path,omitempty"`
PublicBuilds *bool `url:"public_builds,omitempty" json:"public_builds,omitempty"`
ReleasesAccessLevel *AccessControlValue `url:"releases_access_level,omitempty" json:"releases_access_level,omitempty"`
EnvironmentsAccessLevel *AccessControlValue `url:"environments_access_level,omitempty" json:"environments_access_level,omitempty"`
FeatureFlagsAccessLevel *AccessControlValue `url:"feature_flags_access_level,omitempty" json:"feature_flags_access_level,omitempty"`
InfrastructureAccessLevel *AccessControlValue `url:"infrastructure_access_level,omitempty" json:"infrastructure_access_level,omitempty"`
MonitorAccessLevel *AccessControlValue `url:"monitor_access_level,omitempty" json:"monitor_access_level,omitempty"`
RemoveSourceBranchAfterMerge *bool `url:"remove_source_branch_after_merge,omitempty" json:"remove_source_branch_after_merge,omitempty"`
PrintingMergeRequestLinkEnabled *bool `url:"printing_merge_request_link_enabled,omitempty" json:"printing_merge_request_link_enabled,omitempty"`
RepositoryAccessLevel *AccessControlValue `url:"repository_access_level,omitempty" json:"repository_access_level,omitempty"`
Expand All @@ -891,6 +919,7 @@ type EditProjectOptions struct {
SecurityAndComplianceAccessLevel *AccessControlValue `url:"security_and_compliance_access_level,omitempty" json:"security_and_compliance_access_level,omitempty"`
ServiceDeskEnabled *bool `url:"service_desk_enabled,omitempty" json:"service_desk_enabled,omitempty"`
SharedRunnersEnabled *bool `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"`
GroupRunnersEnabled *bool `url:"group_runners_enabled,omitempty" json:"group_runners_enabled,omitempty"`
ShowDefaultAwardEmojis *bool `url:"show_default_award_emojis,omitempty" json:"show_default_award_emojis,omitempty"`
SnippetsAccessLevel *AccessControlValue `url:"snippets_access_level,omitempty" json:"snippets_access_level,omitempty"`
SquashCommitTemplate *string `url:"squash_commit_template,omitempty" json:"squash_commit_template,omitempty"`
Expand Down