@@ -109,6 +109,7 @@ type Project struct {
109
109
SnippetsAccessLevel AccessControlValue `json:"snippets_access_level"`
110
110
PagesAccessLevel AccessControlValue `json:"pages_access_level"`
111
111
OperationsAccessLevel AccessControlValue `json:"operations_access_level"`
112
+ AnalyticsAccessLevel AccessControlValue `json:"analytics_access_level"`
112
113
AutocloseReferencedIssues bool `json:"autoclose_referenced_issues"`
113
114
SuggestionCommitMessage string `json:"suggestion_commit_message"`
114
115
AutoCancelPendingPipelines string `json:"auto_cancel_pending_pipelines"`
@@ -119,15 +120,21 @@ type Project struct {
119
120
GroupName string `json:"group_name"`
120
121
GroupAccessLevel int `json:"group_access_level"`
121
122
} `json:"shared_with_groups"`
122
- Statistics * ProjectStatistics `json:"statistics"`
123
- Links * Links `json:"_links,omitempty"`
124
- CIConfigPath string `json:"ci_config_path"`
125
- CIDefaultGitDepth int `json:"ci_default_git_depth"`
126
- CustomAttributes []* CustomAttribute `json:"custom_attributes"`
127
- ComplianceFrameworks []string `json:"compliance_frameworks"`
128
- BuildCoverageRegex string `json:"build_coverage_regex"`
129
- IssuesTemplate string `json:"issues_template"`
130
- MergeRequestsTemplate string `json:"merge_requests_template"`
123
+ Statistics * ProjectStatistics `json:"statistics"`
124
+ Links * Links `json:"_links,omitempty"`
125
+ CIConfigPath string `json:"ci_config_path"`
126
+ CIDefaultGitDepth int `json:"ci_default_git_depth"`
127
+ CustomAttributes []* CustomAttribute `json:"custom_attributes"`
128
+ ComplianceFrameworks []string `json:"compliance_frameworks"`
129
+ BuildCoverageRegex string `json:"build_coverage_regex"`
130
+ IssuesTemplate string `json:"issues_template"`
131
+ MergeRequestsTemplate string `json:"merge_requests_template"`
132
+ KeepLatestArtifact bool `json:"keep_latest_artifact"`
133
+ MergePipelinesEnabled bool `json:"merge_pipelines_enabled"`
134
+ MergeTrainsEnabled bool `json:"merge_trains_enabled"`
135
+ RestrictUserDefinedVariables bool `json:"restrict_user_defined_variables"`
136
+ MergeCommitTemplate string `json:"merge_commit_template"`
137
+ SquashCommitTemplate string `json:"squash_commit_template"`
131
138
}
132
139
133
140
// BasicProject included in other service responses (such as todos).
@@ -588,6 +595,7 @@ func (s *ProjectsService) GetProjectEvents(pid interface{}, opt *GetProjectEvent
588
595
// GitLab API docs: https://docs.gitlab.com/ee/api/projects.html#create-project
589
596
type CreateProjectOptions struct {
590
597
AllowMergeOnSkippedPipeline * bool `url:"allow_merge_on_skipped_pipeline,omitempty" json:"allow_merge_on_skipped_pipeline,omitempty"`
598
+ AnalyticsAccessLevel * AccessControlValue `url:"analytics_access_level,omitempty" json:"analytics_access_level,omitempty"`
591
599
ApprovalsBeforeMerge * int `url:"approvals_before_merge,omitempty" json:"approvals_before_merge,omitempty"`
592
600
AutoCancelPendingPipelines * string `url:"auto_cancel_pending_pipelines,omitempty" json:"auto_cancel_pending_pipelines,omitempty"`
593
601
AutoDevopsDeployStrategy * string `url:"auto_devops_deploy_strategy,omitempty" json:"auto_devops_deploy_strategy,omitempty"`
@@ -611,8 +619,11 @@ type CreateProjectOptions struct {
611
619
InitializeWithReadme * bool `url:"initialize_with_readme,omitempty" json:"initialize_with_readme,omitempty"`
612
620
IssuesAccessLevel * AccessControlValue `url:"issues_access_level,omitempty" json:"issues_access_level,omitempty"`
613
621
LFSEnabled * bool `url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"`
622
+ MergeCommitTemplate * string `url:"merge_commit_template,omitempty" json:"merge_commit_template,omitempty"`
614
623
MergeMethod * MergeMethodValue `url:"merge_method,omitempty" json:"merge_method,omitempty"`
624
+ MergePipelinesEnabled * bool `url:"merge_pipelines_enabled,omitempty" json:"merge_pipelines_enabled,omitempty"`
615
625
MergeRequestsAccessLevel * AccessControlValue `url:"merge_requests_access_level,omitempty" json:"merge_requests_access_level,omitempty"`
626
+ MergeTrainsEnabled * bool `url:"merge_trains_enabled,omitempty" json:"merge_trains_enabled,omitempty"`
616
627
Mirror * bool `url:"mirror,omitempty" json:"mirror,omitempty"`
617
628
MirrorTriggerBuilds * bool `url:"mirror_trigger_builds,omitempty" json:"mirror_trigger_builds,omitempty"`
618
629
Name * string `url:"name,omitempty" json:"name,omitempty"`
@@ -632,8 +643,9 @@ type CreateProjectOptions struct {
632
643
RequirementsAccessLevel * AccessControlValue `url:"requirements_access_level,omitempty" json:"requirements_access_level,omitempty"`
633
644
ResolveOutdatedDiffDiscussions * bool `url:"resolve_outdated_diff_discussions,omitempty" json:"resolve_outdated_diff_discussions,omitempty"`
634
645
SharedRunnersEnabled * bool `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"`
635
- ShowDefaultAwardEmojis * bool `url:"show_default_aware_emojis ,omitempty" json:"show_default_aware_emojis ,omitempty"`
646
+ ShowDefaultAwardEmojis * bool `url:"show_default_award_emojis ,omitempty" json:"show_default_award_emojis ,omitempty"`
636
647
SnippetsAccessLevel * AccessControlValue `url:"snippets_access_level,omitempty" json:"snippets_access_level,omitempty"`
648
+ SquashCommitTemplate * string `url:"squash_commit_template,omitempty" json:"squash_commit_template,omitempty"`
637
649
SquashOption * SquashOptionValue `url:"squash_option,omitempty" json:"squash_option,omitempty"`
638
650
SuggestionCommitMessage * string `url:"suggestion_commit_message,omitempty" json:"suggestion_commit_message,omitempty"`
639
651
TemplateName * string `url:"template_name,omitempty" json:"template_name,omitempty"`
@@ -773,6 +785,7 @@ func (s *ProjectsService) CreateProjectForUser(user int, opt *CreateProjectForUs
773
785
// GitLab API docs: https://docs.gitlab.com/ce/api/projects.html#edit-project
774
786
type EditProjectOptions struct {
775
787
AllowMergeOnSkippedPipeline * bool `url:"allow_merge_on_skipped_pipeline,omitempty" json:"allow_merge_on_skipped_pipeline,omitempty"`
788
+ AnalyticsAccessLevel * AccessControlValue `url:"analytics_access_level,omitempty" json:"analytics_access_level,omitempty"`
776
789
ApprovalsBeforeMerge * int `url:"approvals_before_merge,omitempty" json:"approvals_before_merge,omitempty"`
777
790
AutoCancelPendingPipelines * string `url:"auto_cancel_pending_pipelines,omitempty" json:"auto_cancel_pending_pipelines,omitempty"`
778
791
AutoDevopsDeployStrategy * string `url:"auto_devops_deploy_strategy,omitempty" json:"auto_devops_deploy_strategy,omitempty"`
@@ -794,9 +807,13 @@ type EditProjectOptions struct {
794
807
ForkingAccessLevel * AccessControlValue `url:"forking_access_level,omitempty" json:"forking_access_level,omitempty"`
795
808
ImportURL * string `url:"import_url,omitempty" json:"import_url,omitempty"`
796
809
IssuesAccessLevel * AccessControlValue `url:"issues_access_level,omitempty" json:"issues_access_level,omitempty"`
810
+ KeepLatestArtifact * bool `url:"keep_latest_artifact,omitempty" json:"keep_latest_artifact,omitempty"`
797
811
LFSEnabled * bool `url:"lfs_enabled,omitempty" json:"lfs_enabled,omitempty"`
812
+ MergeCommitTemplate * string `url:"merge_commit_template,omitempty" json:"merge_commit_template,omitempty"`
798
813
MergeMethod * MergeMethodValue `url:"merge_method,omitempty" json:"merge_method,omitempty"`
814
+ MergePipelinesEnabled * bool `url:"merge_pipelines_enabled,omitempty" json:"merge_pipelines_enabled,omitempty"`
799
815
MergeRequestsAccessLevel * AccessControlValue `url:"merge_requests_access_level,omitempty" json:"merge_requests_access_level,omitempty"`
816
+ MergeTrainsEnabled * bool `url:"merge_trains_enabled,omitempty" json:"merge_trains_enabled,omitempty"`
800
817
Mirror * bool `url:"mirror,omitempty" json:"mirror,omitempty"`
801
818
MirrorOverwritesDivergedBranches * bool `url:"mirror_overwrites_diverged_branches,omitempty" json:"mirror_overwrites_diverged_branches,omitempty"`
802
819
MirrorTriggerBuilds * bool `url:"mirror_trigger_builds,omitempty" json:"mirror_trigger_builds,omitempty"`
@@ -817,9 +834,11 @@ type EditProjectOptions struct {
817
834
RequestAccessEnabled * bool `url:"request_access_enabled,omitempty" json:"request_access_enabled,omitempty"`
818
835
RequirementsAccessLevel * AccessControlValue `url:"requirements_access_level,omitempty" json:"requirements_access_level,omitempty"`
819
836
ResolveOutdatedDiffDiscussions * bool `url:"resolve_outdated_diff_discussions,omitempty" json:"resolve_outdated_diff_discussions,omitempty"`
837
+ RestrictUserDefinedVariables * bool `url:"restrict_user_defined_variables,omitempty" json:"restrict_user_defined_variables,omitempty"`
820
838
SharedRunnersEnabled * bool `url:"shared_runners_enabled,omitempty" json:"shared_runners_enabled,omitempty"`
821
- ShowDefaultAwardEmojis * bool `url:"show_default_aware_emojis ,omitempty" json:"show_default_aware_emojis ,omitempty"`
839
+ ShowDefaultAwardEmojis * bool `url:"show_default_award_emojis ,omitempty" json:"show_default_award_emojis ,omitempty"`
822
840
SnippetsAccessLevel * AccessControlValue `url:"snippets_access_level,omitempty" json:"snippets_access_level,omitempty"`
841
+ SquashCommitTemplate * string `url:"squash_commit_template,omitempty" json:"squash_commit_template,omitempty"`
823
842
SquashOption * SquashOptionValue `url:"squash_option,omitempty" json:"squash_option,omitempty"`
824
843
SuggestionCommitMessage * string `url:"suggestion_commit_message,omitempty" json:"suggestion_commit_message,omitempty"`
825
844
Topics * []string `url:"topics,omitempty" json:"topics,omitempty"`
0 commit comments