mirror of
https://git.ferricyanide.solutions/A_D/irc-webhooks.git
synced 2024-12-22 23:17:04 +00:00
made sure to print json for unknown actions
This commit is contained in:
parent
2a54c81da1
commit
ec93fcaff9
@ -62,7 +62,6 @@ func handleUnknown(data []byte, msgChan chan string) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func handlePush(data []byte, msgChan chan string) {
|
func handlePush(data []byte, msgChan chan string) {
|
||||||
printSep()
|
|
||||||
pushData := Push{}
|
pushData := Push{}
|
||||||
json.Unmarshal(data, &pushData)
|
json.Unmarshal(data, &pushData)
|
||||||
outIrcMessage := strings.Builder{}
|
outIrcMessage := strings.Builder{}
|
||||||
@ -90,6 +89,7 @@ func handleIssueAction(data []byte, msgChan chan string) {
|
|||||||
outMsg.WriteString(fmt.Sprintf("%s closed issue %q", action.Sender.Login, action.Issue.Title))
|
outMsg.WriteString(fmt.Sprintf("%s closed issue %q", action.Sender.Login, action.Issue.Title))
|
||||||
default:
|
default:
|
||||||
outMsg.WriteString(fmt.Sprintf("%s performed an unknown action (%s) on issue %f", action.Sender.Login, action.Action, action.Issue.Id))
|
outMsg.WriteString(fmt.Sprintf("%s performed an unknown action (%s) on issue %f", action.Sender.Login, action.Action, action.Issue.Id))
|
||||||
|
fmt.Println(string(data))
|
||||||
}
|
}
|
||||||
msgChan <- outMsg.String()
|
msgChan <- outMsg.String()
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user