mirror of
https://github.com/Luzifer/repo-template.git
synced 2024-11-10 00:20:03 +00:00
Fix: Jenkins targets might have dependencies
Signed-off-by: Knut Ahlers <knut@ahlers.me>
This commit is contained in:
parent
3da9b1e27a
commit
038eefb8fc
1 changed files with 6 additions and 3 deletions
|
@ -1,10 +1,10 @@
|
||||||
package main
|
package main
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"bufio"
|
||||||
"context"
|
"context"
|
||||||
"strings"
|
"strings"
|
||||||
|
|
||||||
"github.com/Luzifer/go_helpers/str"
|
|
||||||
"github.com/google/go-github/github"
|
"github.com/google/go-github/github"
|
||||||
log "github.com/sirupsen/logrus"
|
log "github.com/sirupsen/logrus"
|
||||||
)
|
)
|
||||||
|
@ -55,8 +55,11 @@ func filterMakeJenkins(repo *github.Repository) bool {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
|
|
||||||
if str.StringInSlice("jenkins:", strings.Split(*fc.Content, "\n")) {
|
scanner := bufio.NewScanner(strings.NewReader(*fc.Content))
|
||||||
return true
|
for scanner.Scan() {
|
||||||
|
if strings.HasPrefix(scanner.Text(), "jenkins:") {
|
||||||
|
return true
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
return false
|
return false
|
||||||
|
|
Loading…
Reference in a new issue