Skip to content

Commit b317272

Browse files
Merge pull request #69 from diegopereiraeng/main
fix auth
2 parents 024ee10 + 281ae96 commit b317272

File tree

2 files changed

+7
-1
lines changed

2 files changed

+7
-1
lines changed

.drone.yml

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,19 @@ steps:
1616
dockerfile: Dockerfile
1717
repo: plugins/sonarqube-scanner
1818
dry_run: true
19+
when:
20+
ref:
21+
- "refs/pull/**" # Only run for pull requests
1922
- name: pr test java 17
2023
image: plugins/docker:20
2124
settings:
2225
daemon_off: false
2326
dockerfile: DockerfileJava17
2427
repo: plugins/sonarqube-scanner
2528
dry_run: true
29+
when:
30+
ref:
31+
- "refs/pull/**" # Only run for pull requests
2632
# - name: publish
2733
# image: plugins/docker:18
2834
# settings:

plugin.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -890,7 +890,7 @@ func GetProjectStatus(sonarHost string, analysisId string, projectSlug string) (
890890
fmt.Printf("\n")
891891
// fmt.Printf("Setting Authorization header:" + token)
892892
// Retry with the token encoded in base64
893-
encodedToken := base64.StdEncoding.EncodeToString([]byte(token))
893+
encodedToken := base64.StdEncoding.EncodeToString([]byte(token + ":"))
894894
fmt.Println(basicAuth + encodedToken)
895895
projectRequest.Header.Set("Authorization", basicAuth+encodedToken)
896896
fmt.Printf("\n")

0 commit comments

Comments
 (0)