Skip to content

Commit

Permalink
Merge pull request #35 from shijl0925/create-pull-request/patch
Browse files Browse the repository at this point in the history
Changes by create-pull-request action
  • Loading branch information
shijl0925 authored Dec 20, 2024
2 parents 87e55e0 + d42c878 commit 46a1d4b
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 3 deletions.
2 changes: 1 addition & 1 deletion sonarqube/measures/measures_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -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 new_security_issues, new_reliability_issues, security_issues, maintainability_issues, reliability_issues, new_maintainability_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: <ul><li>all: return all components</li><li>withMeasuresOnly: filter out components that do not have a measure on the sorted metric</li></ul>
Expand Down
10 changes: 10 additions & 0 deletions sonarqube/projects/projects_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -77,6 +77,16 @@ type ExportFindingsResponse struct {
} `json:"export_findings,omitempty"`
}

// GetContainsAiCodeRequest Get whether a project contains AI code or not
type GetContainsAiCodeRequest struct {
Project string `url:"project"` // Project key
}

// GetContainsAiCodeResponse is the response for GetContainsAiCodeRequest
type GetContainsAiCodeResponse struct {
ContainsAiCode bool `json:"containsAiCode,omitempty"`
}

// LicenseUsageRequest Help admins to understand how much each project affects the total number of lines of code. Returns the list of projects together with information about their usage, sorted by lines of code descending.<br/>Requires Administer System permission.
type LicenseUsageRequest struct{}

Expand Down
14 changes: 14 additions & 0 deletions sonarqube/projects_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -92,6 +92,20 @@ func (s *Projects) ExportFindings(ctx context.Context, r projects.ExportFindings
return v, resp, nil
}

// GetContainsAiCode - Get whether a project contains AI code or not
// Since 2025.1
func (s *Projects) GetContainsAiCode(ctx context.Context, r projects.GetContainsAiCodeRequest) (*projects.GetContainsAiCodeResponse, *http.Response, error) {
u := fmt.Sprintf("%s/get_contains_ai_code", s.path)
v := new(projects.GetContainsAiCodeResponse)

resp, err := s.client.Call(ctx, "GET", u, v, r)
if err != nil {
return nil, resp, err
}

return v, resp, nil
}

// LicenseUsage - Help admins to understand how much each project affects the total number of lines of code. Returns the list of projects together with information about their usage, sorted by lines of code descending.
// Requires Administer System permission.
// Since 9.4
Expand Down
4 changes: 2 additions & 2 deletions sonarqube/qualitygates/qualitygates_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -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.<br/> Only metric of the following types are allowed:<ul><li>INT</li><li>MILLISEC</li><li>RATING</li><li>WORK_DUR</li><li>FLOAT</li><li>PERCENT</li><li>LEVEL</li></ul>Following metrics are forbidden:<ul><li>new_security_hotspots</li><li>security_hotspots</li><li>alert_status</li></ul>
Metric string `form:"metric"` // Condition metric.<br/> Only metric of the following types are allowed:<ul><li>INT</li><li>MILLISEC</li><li>RATING</li><li>WORK_DUR</li><li>FLOAT</li><li>PERCENT</li><li>LEVEL</li></ul>Following metrics are forbidden:<ul><li>security_hotspots</li><li>new_security_hotspots</li><li>alert_status</li></ul>
Op string `form:"op,omitempty"` // Condition operator:<br/><ul><li>LT = is lower than</li><li>GT = is greater than</li></ul>
}

Expand Down Expand Up @@ -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.<br/> Only metric of the following types are allowed:<ul><li>INT</li><li>MILLISEC</li><li>RATING</li><li>WORK_DUR</li><li>FLOAT</li><li>PERCENT</li><li>LEVEL</li></ul>Following metrics are forbidden:<ul><li>new_security_hotspots</li><li>security_hotspots</li><li>alert_status</li></ul>
Metric string `form:"metric"` // Condition metric.<br/> Only metric of the following types are allowed:<ul><li>INT</li><li>MILLISEC</li><li>RATING</li><li>WORK_DUR</li><li>FLOAT</li><li>PERCENT</li><li>LEVEL</li></ul>Following metrics are forbidden:<ul><li>security_hotspots</li><li>new_security_hotspots</li><li>alert_status</li></ul>
Op string `form:"op,omitempty"` // Condition operator:<br/><ul><li>LT = is lower than</li><li>GT = is greater than</li></ul>
}
3 changes: 3 additions & 0 deletions sonarqube/qualitygates_gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -307,6 +307,9 @@ func (s *Qualitygates) Rename(ctx context.Context, r qualitygates.RenameRequest)
// Since 4.3
// Changelog:
//
// 2025.1: Field 'containsAiCode' response field has added.
// 2025.1: Field 'isAiCodeAssured' response field has been removed.
// 2025.1: Field 'aiCodeAssurance' response field has been removed.
// 10.8: Field 'isAiCodeAssured' response field has been deprecated. Use 'aiCodeAssurance' instead.
// 10.8: New field 'aiCodeAssurance' in the response.
// 10.0: deprecated 'more' response field has been removed
Expand Down

0 comments on commit 46a1d4b

Please sign in to comment.