add doxygen

This commit is contained in:
呱呱呱 2025-05-29 17:33:38 +08:00
parent 3c81b924cd
commit 0fa7ce4127
1 changed files with 7 additions and 1 deletions

View File

@ -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: