diff --git a/sonarqube/alm_integrations/alm_integrations_gen.go b/sonarqube/alm_integrations/alm_integrations_gen.go index 72aa73a..3488575 100644 --- a/sonarqube/alm_integrations/alm_integrations_gen.go +++ b/sonarqube/alm_integrations/alm_integrations_gen.go @@ -66,7 +66,9 @@ type ListAzureProjectsResponse struct { // ListBitbucketserverProjectsRequest List the Bitbucket Server projects
Requires the 'Create Projects' permission type ListBitbucketserverProjectsRequest struct { - AlmSetting string `url:"almSetting"` // DevOps Platform setting key + AlmSetting string `url:"almSetting"` // DevOps Platform setting key + PageSize string `url:"pageSize,omitempty"` // Number of items to return. + Start string `url:"start,omitempty"` // Start number for the page (inclusive). If not passed, the first page is assumed. } // ListBitbucketserverProjectsResponse is the response for ListBitbucketserverProjectsRequest @@ -133,8 +135,10 @@ type SearchBitbucketcloudReposResponseAll struct { // SearchBitbucketserverReposRequest Search the Bitbucket Server repositories with REPO_ADMIN access
Requires the 'Create Projects' permission type SearchBitbucketserverReposRequest struct { AlmSetting string `url:"almSetting"` // DevOps Platform setting key + PageSize string `url:"pageSize,omitempty"` // Number of items to return. ProjectName string `url:"projectName,omitempty"` // Project name filter RepositoryName string `url:"repositoryName,omitempty"` // Repository name filter + Start string `url:"start,omitempty"` // Start number for the page (inclusive). If not passed, the first page is assumed. } // SearchBitbucketserverReposResponse is the response for SearchBitbucketserverReposRequest diff --git a/sonarqube/measures/measures_gen.go b/sonarqube/measures/measures_gen.go index 214d1c7..e38843f 100644 --- a/sonarqube/measures/measures_gen.go +++ b/sonarqube/measures/measures_gen.go @@ -53,7 +53,7 @@ type ComponentTreeRequest struct { Asc string `url:"asc,omitempty"` // Ascending sort Branch string `url:"branch,omitempty"` // Since 6.6;Branch key. Not available in the community edition. Component string `url:"component"` // Component key. The search is based on this component. - MetricKeys string `url:"metricKeys"` // Comma-separated list of metric keys. Types DISTRIB are not allowed. For type DATA only new_reliability_issues, new_security_issues, new_maintainability_issues, reliability_issues, maintainability_issues, security_issues metrics are supported + MetricKeys string `url:"metricKeys"` // Comma-separated list of metric keys. Types DISTRIB are not allowed. For type DATA only security_issues, maintainability_issues, reliability_issues, new_maintainability_issues, new_security_issues, new_reliability_issues metrics are supported MetricPeriodSort string `url:"metricPeriodSort,omitempty"` // Since 5.5;Sort measures by leak period or not ?. The 's' parameter must contain the 'metricPeriod' value. MetricSort string `url:"metricSort,omitempty"` // Metric key to sort by. The 's' parameter must contain the 'metric' or 'metricPeriod' value. It must be part of the 'metricKeys' parameter MetricSortFilter string `url:"metricSortFilter,omitempty"` // Filter components. Sort must be on a metric. Possible values are: diff --git a/sonarqube/projects/projects_gen.go b/sonarqube/projects/projects_gen.go index d02a455..a71ad58 100644 --- a/sonarqube/projects/projects_gen.go +++ b/sonarqube/projects/projects_gen.go @@ -140,6 +140,12 @@ type SearchResponseAll struct { } `json:"components,omitempty"` } +// SetContainsAiCodeRequest Sets if the project passed as parameter contains or not AI code according to the value of the contains_ai_code parameter.
Requires 'Administer' rights on the specified project. +type SetContainsAiCodeRequest struct { + ContainsAiCode string `form:"contains_ai_code"` // Flag to set whether the project contains AI code or not. + Project string `form:"project"` // Project key +} + // UpdateKeyRequest Update a project all its sub-components keys.
Requires 'Administer' permission on the project. type UpdateKeyRequest struct { From string `form:"from"` // Project key diff --git a/sonarqube/projects_gen.go b/sonarqube/projects_gen.go index 8fa5bb7..4d2488c 100644 --- a/sonarqube/projects_gen.go +++ b/sonarqube/projects_gen.go @@ -156,6 +156,23 @@ func (s *Projects) SearchAll(ctx context.Context, r projects.SearchRequest) (*pr return response, nil } +// SetContainsAiCode - Sets if the project passed as parameter contains or not AI code according to the value of the contains_ai_code parameter. +// Requires 'Administer' rights on the specified project. +// Since 10.8 +// Changelog: +// +// 2025.1: Make endpoint public +func (s *Projects) SetContainsAiCode(ctx context.Context, r projects.SetContainsAiCodeRequest) (*http.Response, error) { + u := fmt.Sprintf("%s/set_contains_ai_code", s.path) + + resp, err := s.client.Call(ctx, "POST", u, nil, r) + if err != nil { + return resp, err + } + + return resp, nil +} + // UpdateKey - Update a project all its sub-components keys. // Requires 'Administer' permission on the project. // Since 6.1 diff --git a/sonarqube/qualitygates/qualitygates_gen.go b/sonarqube/qualitygates/qualitygates_gen.go index d802ff9..e9c53f3 100644 --- a/sonarqube/qualitygates/qualitygates_gen.go +++ b/sonarqube/qualitygates/qualitygates_gen.go @@ -37,7 +37,7 @@ type CreateResponse struct { type CreateConditionRequest struct { Error string `form:"error"` // Condition error threshold GateName string `form:"gateName"` // Name of the quality gate - Metric string `form:"metric"` // Condition metric.
Only metric of the following types are allowed:Following metrics are forbidden: + Metric string `form:"metric"` // Condition metric.
Only metric of the following types are allowed:Following metrics are forbidden: Op string `form:"op,omitempty"` // Condition operator:
} @@ -288,6 +288,6 @@ type ShowResponse struct { type UpdateConditionRequest struct { Error string `form:"error"` // Condition error threshold Id string `form:"id"` // Condition ID - Metric string `form:"metric"` // Condition metric.
Only metric of the following types are allowed:Following metrics are forbidden: + Metric string `form:"metric"` // Condition metric.
Only metric of the following types are allowed:Following metrics are forbidden: Op string `form:"op,omitempty"` // Condition operator:
}