1
0
Fork 0
mirror of https://github.com/Luzifer/repo-template.git synced 2024-12-22 20:21:19 +00:00

Fix: Data is base64 encoded

Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
Knut Ahlers 2018-04-17 11:48:23 +02:00
parent 89ff76499f
commit 75d6e1799f
Signed by: luzifer
GPG key ID: DC2729FDD34BE99E

View file

@ -3,6 +3,7 @@ package main
import ( import (
"bufio" "bufio"
"context" "context"
"encoding/base64"
"strings" "strings"
"github.com/google/go-github/github" "github.com/google/go-github/github"
@ -55,7 +56,7 @@ func filterMakeJenkins(repo *github.Repository) bool {
return false return false
} }
scanner := bufio.NewScanner(strings.NewReader(*fc.Content)) scanner := bufio.NewScanner(base64.NewDecoder(base64.StdEncoding, strings.NewReader(*fc.Content)))
for scanner.Scan() { for scanner.Scan() {
if strings.HasPrefix(scanner.Text(), "jenkins:") { if strings.HasPrefix(scanner.Text(), "jenkins:") {
return true return true