Browse Source

add doxygen

pull/348/head^2^2
呱呱呱 1 year ago
parent
commit
0fa7ce4127
1 changed files with 7 additions and 1 deletions
  1. +7
    -1
      app/controllers/api/v1/sonarqubes_controller.rb

+ 7
- 1
app/controllers/api/v1/sonarqubes_controller.rb 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:


Loading…
Cancel
Save