41 lines
1.1 KiB
Ruby
41 lines
1.1 KiB
Ruby
class Api::V1::SonarqubesController < Api::V1::BaseController
|
|
def issues_search
|
|
params_data = {
|
|
components: 'kingchanx-fluid-cloudnative_fluid',
|
|
s: 'FILE_LINE',
|
|
impactSoftwareQualities: 'SECURITY',
|
|
issueStatuses: 'CONFIRMED%2COPEN',
|
|
ps: 100,
|
|
facets: 'cleanCodeAttributeCategories%2CimpactSoftwareQualities%2CcodeVariants&',
|
|
additionalFields: '_all',
|
|
timeZone: 'Asia%2FShanghai'
|
|
}
|
|
data = Sonarqube.client.get('/api/issues/search', params_data)
|
|
render_ok data
|
|
end
|
|
|
|
def ce_component
|
|
params_data = {
|
|
components: 'kingchanx-fluid-cloudnative_fluid',
|
|
}
|
|
data = Sonarqube.client.get('/api/ce/component', params_data)
|
|
render_ok data
|
|
end
|
|
|
|
def sources_issue_snippet
|
|
params_data = {
|
|
issueKey: '93f87856-d71e-44f6-93b6-f9a6d54ff488'
|
|
}
|
|
data = Sonarqube.client.get('/api/sources/issue_snippets', params_data)
|
|
render_ok data
|
|
end
|
|
|
|
def rules_show
|
|
params_data = {
|
|
key: 'kubernetes%3AS6865'
|
|
}
|
|
data = Sonarqube.client.get('/api/rules/show', params_data)
|
|
render_ok data
|
|
end
|
|
end
|