From 0fa7ce412779f9fdc5736aa47ab80b729d30b5f6 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E5=91=B1=E5=91=B1=E5=91=B1?= Date: Thu, 29 May 2025 17:33:38 +0800 Subject: [PATCH] add doxygen --- app/controllers/api/v1/sonarqubes_controller.rb | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) diff --git a/app/controllers/api/v1/sonarqubes_controller.rb b/app/controllers/api/v1/sonarqubes_controller.rb index 2ad2a3d4a..80dd3ba93 100644 --- a/app/controllers/api/v1/sonarqubes_controller.rb +++ b/app/controllers/api/v1/sonarqubes_controller.rb @@ -17,6 +17,7 @@ class Api::V1::SonarqubesController < Api::V1::BaseController def insert_file checkout_url = 'https://gitlink.org.cn/KingChan/checkout@v4' scanner_url = 'https://gitlink.org.cn/KingChan/sonarqube-scan-action@master' + doxygen_url = "https://gitlink.gitlink.net" begin config = Rails.application.config_for(:configuration) sonarqube_config = config.dig('sonarqube') @@ -27,7 +28,9 @@ class Api::V1::SonarqubesController < Api::V1::BaseController if sonarqube_config.present? && sonarqube_config['scanner'].present? scanner_url = sonarqube_config['scanner'] end - + if sonarqube_config.present? && sonarqube_config['doxygen'].present? + doxygen_url = sonarqube_config['doxygen'] + end raise 'sonar config missing' if sonarqube_config.blank? rescue => ex raise ex if Rails.env.production? @@ -61,6 +64,9 @@ class Api::V1::SonarqubesController < Api::V1::BaseController with: # Disabling shallow clones is recommended for improving the relevancy of reporting fetch-depth: 0 + - name: curl doxygen + run: | + curl -X GET #{doxygen_url}/generate?repo=#{@project.repository.url} - name: SonarQube Scan uses: #{scanner_url} env: