Don't rely on a fixed number of line to hide, expect first command

This commit is contained in:
nemunaire 2023-03-08 11:50:13 +01:00
parent 0965698c90
commit 1348678be1
1 changed files with 8 additions and 3 deletions

View File

@ -481,10 +481,15 @@ func declareAPIAuthWorksRoutes(router *gin.RouterGroup) {
}
keeptLogs := []*drone.Line{}
for nline, line := range result {
firstCmdShown := false
for _, line := range result {
// Infos about image, skip
if nline < 3 {
continue
if !firstCmdShown {
if strings.HasPrefix(line.Message, "+ ") {
firstCmdShown = true
} else {
continue
}
}
if strings.HasPrefix(line.Message, "+ export GRADE") {
continue