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