新增接口
This commit is contained in:
parent
fc8c31ec66
commit
1449064b64
|
@ -1,6 +1,8 @@
|
||||||
class Api::V1::SonarqubesController < Api::V1::BaseController
|
class Api::V1::SonarqubesController < Api::V1::BaseController
|
||||||
|
before_action :load_repository
|
||||||
def sonar_initialize
|
def sonar_initialize
|
||||||
|
gitea_params = { has_actions: true }
|
||||||
|
Gitea::Repository::UpdateService.call(@owner, @project.identifier, gitea_params)
|
||||||
end
|
end
|
||||||
|
|
||||||
def execute_sonar_sanner
|
def execute_sonar_sanner
|
||||||
|
@ -47,4 +49,15 @@ class Api::V1::SonarqubesController < Api::V1::BaseController
|
||||||
data = Sonarqube.client.get('/api/rules/show', params_data)
|
data = Sonarqube.client.get('/api/rules/show', params_data)
|
||||||
render_ok data
|
render_ok data
|
||||||
end
|
end
|
||||||
|
|
||||||
|
def measures_search_history
|
||||||
|
params_data = {
|
||||||
|
from: params[:form],
|
||||||
|
component: params[:component],
|
||||||
|
metrics: params[:metrics],
|
||||||
|
ps: params[:ps]
|
||||||
|
}
|
||||||
|
data = Sonarqube.client.get('/api/measures/search_history', params_data)
|
||||||
|
render_ok data
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
|
@ -85,6 +85,7 @@ defaults format: :json do
|
||||||
get :ce_component
|
get :ce_component
|
||||||
get :sources_issue_snippet
|
get :sources_issue_snippet
|
||||||
get :rules_show
|
get :rules_show
|
||||||
|
get :measures_search_history
|
||||||
|
|
||||||
post :sonar_initialize
|
post :sonar_initialize
|
||||||
post :execute_sonar_sanner
|
post :execute_sonar_sanner
|
||||||
|
|
Loading…
Reference in New Issue