Skip to content

Instantly share code, notes, and snippets.

@mogeta
Created July 28, 2016 02:00
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mogeta/417e1f9b82bac8068b381f388c6c7577 to your computer and use it in GitHub Desktop.
Save mogeta/417e1f9b82bac8068b381f388c6c7577 to your computer and use it in GitHub Desktop.
gas + trello + slackのイメージ
let trello = new Trello(trello_key, trello_access_token);
//get each cards
let boards = trello.getLists(boardID);
var talk = "現在のプロジェクトステータスです\n";
var storyPoints = [new Date()];
boards.forEach(function (board) {
var cards = trello.getCards(board.id);
var points = trello.mergeStoryPoint(cards);
talk += board.name+"のストーリーポイントは"+points+"です。\n";
storyPoints.push(points);
});
//post to slack
postMessage(slackChannelID,talk);
//write spreadsheets
var lastRow = sheet.getLastRow()+1
storyPoints.push(storyPoints[1]+storyPoints[2]-storyPoints[3]);
sheet.appendRow(storyPoints);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment