Skip to content

Commit 150fd76

Browse files
minor updates - version patch
1 parent 224e8e4 commit 150fd76

File tree

1 file changed

+7
-5
lines changed

1 file changed

+7
-5
lines changed

plugin.go

Lines changed: 7 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -750,7 +750,7 @@ func getStatus(task *TaskResponse, report *SonarReport) string {
750750

751751
fmt.Printf("%+v", projectReport)
752752
fmt.Printf("\n")
753-
result := ParseJunit(projectReport, "BankingApp")
753+
result := ParseJunit(projectReport, qg_projectKey)
754754
file, _ := xml.MarshalIndent(result, "", " ")
755755
_ = ioutil.WriteFile("sonarResults.xml", file, 0644)
756756

@@ -810,12 +810,13 @@ func getStatusID(taskIDOld string, sonarHost string, projectSlug string) (string
810810
if err != nil {
811811
panic(err)
812812
}
813+
qg_projectKey := os.Getenv("PLUGIN_SONAR_KEY")
813814

814815
fmt.Printf("%+v", projectReport)
815816
fmt.Printf("\n")
816-
result := ParseJunit(projectReport, "BankingApp")
817+
result := ParseJunit(projectReport, qg_projectKey)
817818
file, _ := xml.MarshalIndent(result, "", " ")
818-
_ = ioutil.WriteFile("sonarResults.xml", file, 0644)
819+
_ = os.WriteFile("sonarResults.xml", file, 0644)
819820

820821
fmt.Printf("\n")
821822
fmt.Printf("\n======> JUNIT Exporter <======\n")
@@ -884,12 +885,13 @@ func getStatusV2(scanType string, scanValue string, sonarHost string, projectSlu
884885
if err != nil {
885886
panic(err)
886887
}
888+
qg_projectKey := os.Getenv("PLUGIN_SONAR_KEY")
887889

888890
fmt.Printf("%+v", projectReport)
889891
fmt.Printf("\n")
890-
result := ParseJunit(projectReport, "BankingApp")
892+
result := ParseJunit(projectReport, qg_projectKey)
891893
file, _ := xml.MarshalIndent(result, "", " ")
892-
_ = ioutil.WriteFile("sonarResults.xml", file, 0644)
894+
_ = os.WriteFile("sonarResults.xml", file, 0644)
893895

894896
fmt.Printf("\n")
895897
fmt.Printf("\n======> JUNIT Exporter <======\n")

0 commit comments

Comments
 (0)