Parse attachments only if they're passed from Gitlab.
This commit is contained in:
parent
729fa71442
commit
008bbdb637
@ -305,8 +305,10 @@ func (gp GitlabParser) ParseMessage(message slackmessage.SlackMessage) map[strin
|
||||
|
||||
var data map[string]string
|
||||
|
||||
if strings.Contains(message.Attachments[0].Text, "Pipeline") && strings.Contains(message.Attachments[0].Text, "of branch") {
|
||||
data = gp.parsePipelineMessage(message)
|
||||
if len(message.Attachments) > 0 {
|
||||
if strings.Contains(message.Attachments[0].Text, "Pipeline") && strings.Contains(message.Attachments[0].Text, "of branch") {
|
||||
data = gp.parsePipelineMessage(message)
|
||||
}
|
||||
}
|
||||
|
||||
if strings.Contains(message.Text, "pushed to") {
|
||||
|
Loading…
Reference in New Issue
Block a user