This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function doPost(e) { | |
var url = 'https://hooks.slack.com/services/***************'; //slack webhook url | |
var channel = '***************'; //投稿先チャンネル名 | |
var userName = 'github'; //BOTの名前 | |
var json = e.postData.getDataAsString(); | |
var payload = JSON.parse(json); | |
if (isSendAction(payload)) { | |
sendSlack(url, userName, channel, sendText(payload)) | |
} | |
} |