Don't rely on a fixed number of line to hide, expect first command
This commit is contained in:
parent
0965698c90
commit
1348678be1
9
works.go
9
works.go
@ -481,11 +481,16 @@ func declareAPIAuthWorksRoutes(router *gin.RouterGroup) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
keeptLogs := []*drone.Line{}
|
keeptLogs := []*drone.Line{}
|
||||||
for nline, line := range result {
|
firstCmdShown := false
|
||||||
|
for _, line := range result {
|
||||||
// Infos about image, skip
|
// Infos about image, skip
|
||||||
if nline < 3 {
|
if !firstCmdShown {
|
||||||
|
if strings.HasPrefix(line.Message, "+ ") {
|
||||||
|
firstCmdShown = true
|
||||||
|
} else {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
}
|
||||||
if strings.HasPrefix(line.Message, "+ export GRADE") {
|
if strings.HasPrefix(line.Message, "+ export GRADE") {
|
||||||
continue
|
continue
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user