$30 off During Our Annual Pro Sale. View Details »

GASでBacklogの情報をSlack通知 できるようにしてみた

Takayuki
August 05, 2018

GASでBacklogの情報をSlack通知 できるようにしてみた

GASでBacklogの情報をSlack通知 できるようにしてみた

Takayuki

August 05, 2018
Tweet

More Decks by Takayuki

Other Decks in Technology

Transcript

  1. Copyright Re:Build.inc All Rights Reserved. ("4Ɗ#BDLMPHƑ౦ḸƵ 4MBDL๙ᆩƊŰƮƫũƎźƉƢƂ 鈴木孝之 2018/08/03 3F#VJME

  2. Copyright Re:Build.inc All Rights Reserved. "HFOEB ձࣾɾࣗݾ঺հ ΍Γ͍ͨ͜ͱ ಋೖํ๏

  3. Copyright Re:Build.inc All Rights Reserved. ձࣾɾࣗݾ঺հ

  4. Copyright Re:Build.inc All Rights Reserved. 1.ࣗݾ঺հ ◆໊લ ླ໦ ޹೭(Suzuki Takayuki)

    ◆ࣗݾ঺հ ɾ1990೥ɺਆಸ઒ݝੜ·Εɻ ɾࣾձਓʹͳ͔ͬͯΒɺϓϩάϥϛϯάΛ࢝ΊΔɻ ɾ2015೥ʹϑϧεϐʔυʹೖࣾ͠ɺ2017೥ʹ ϑϦʔϥϯεΛ΍ͬͨޙʹ2017೥11݄ʹԭೄͰىۀɻ ◆झຯ ίεϓϨɺԻָϥΠϒɺϚϥιϯେձʹग़Δɺ໺ٿ؍ઓ ◆εΩϧ ɾPHP, Symfony2,CakePHP3,Laravel5, ɾJavaScript, backbone.js,Angular4,Vue.js
  5. Copyright Re:Build.inc All Rights Reserved. 1.ձࣾ঺հ ◆ձ໊ࣾ גࣜձࣾRe:Build ◆ॅॴ ԭೄݝԭೄࢢதԝ̍ஸ໨̍̒−̕

    ◆ࣄۀ಺༰ ɾ೶ۀʹ͓͍ͯͷϑʔυϩεΛແ͘͢ ࣗࣾWEBαʔϏεͷاըɾ։ൃɻ ɾडୗ։ൃ ◆ࣾһ 4໊ ◆ΤϯδχΞͷಇ͖ํ ϦϞʔτϫʔΫՄೳͳࣗ༝ͳಇ͖ํΛਪ঑ͯ͠·͢ʂ
  6. ɾαʔϏε໊ temite ɾγεςϜ֓ཁ ECϓϥοτϑΥʔϜ ΫϨδοτܾࡁ ΞϑΟϦΤΠτ ͳͲ ɾ࢖͍ͬͯΔٕज़ ݴޠ :

    PHP,JavaScript ϑϨʔϜϫʔΫ: laravel5,Vue.js,JQueryͳͲ ։ൃதͷαʔϏε
  7. Copyright Re:Build.inc All Rights Reserved. ΍Γ͍ͨ͜ͱ

  8. ࢓ࣄͰ͸༷ʑͳ֎෦αʔϏε(gitͳͲ)ͷ৘ใΛ SlackͰҰݩ؅ཧ͓ͯ͠Γɺ Backlogͷ৘ใ΋ SlackͰҰݩ؅ཧ͔ͨͬͨ͠ɻ എܠ

  9. ɾ࢒λεΫͷSlack௨஌ ɾΞΫςΟϏςΟͷSlack௨஌ ɾ࢒λεΫΛεϓϨουγʔτʹॻ͖ࠐΈ ΍Γ͍ͨ͜ͱ

  10. શମߏ੒ ՝୊ͳͲΛ௥Ճૢ࡞ WebhookͰ࣮ߦ Slack௨஌ Backlog API Λୟ͘ εϓϨοτγʔτ ॻ͖ࠐΈ

  11. Slack௨஌Πϝʔδ

  12. γʔτॻ͖ࠐΈΠϝʔδ

  13. WWW.SITE2MAX.PRO Free PowerPoint & KeyNote Templates DEMO DEMO

  14. Copyright Re:Build.inc All Rights Reserved. ಋೖํ๏

  15. APIΩʔ͸ͦΕͧΕͷϦϑΝϨϯεΛࢀߟʹऔಘ͠·͢ɻ ɾGASͷιʔε ɾBacklogͷAPIΩʔ ɾSlackͷWebhookURL ɾBacklogͷϓϩδΣΫτͷID ४උ͢Δ΋ͷ

  16. Google Apps Scriptʢ௨শGASʣ͸ɺGoogle͕ఏڙ͢Δ 11ͷαʔϏεΛΫϥ΢υ্ͰεΫϦϓτΛ࣮ߦ͢Δ͜ͱ Ͱૢ࡞Ͱ͖ΔαʔϏεͰ͢ɻεΫϦϓτͷݴޠ͸ɺ JavaScriptΛϕʔεͱ͍ͯ͠·͢ɻ ʮExcelͷϚΫϩͱಉ͡ʯͱݴΘΕΔ͜ͱ΋͋Γ·͢ ͕ɺ͜Ε͸ਖ਼͋͘͠Γ·ͤΜɻεϓϨουγʔτ͚ͩΛ ૢ࡞͢Δ৔߹͸ɺExcelͷϚΫϩͱࣅ͍ͯ·͕͢ɺ Google

    Apps Script͸ΑΓ෯޿͍༻్ʹ࢖༻Ͱ͖·͢ɻ Google Apps Scriptͱ͸
  17. Backlog API Backlog API ͰԿ͕ग़དྷ·͔͢ʁ ՝୊,Wiki,ϑΝΠϧͷ௥Ճ΍औಘΛ࢝Ίɺϓϩ δΣΫτ΍Ϣʔβʔͷ؅ཧͳͲϒϥ΢β্ͷ BacklogͰͰ͖Δૢ࡞ͷେ෦෼ΛAPI͔Βߦ͏͜ ͱ͕Ͱ͖·͢ɻৄ͘͠͸API ϦετΛࢀরͯ͠

    ͍ͩ͘͞ɻ ·ͨɺCross Origin Resource Sharing (CORS) ʹΑΔϒϥ΢β্ͰͷAjaxΛ ࢖༻ͨ͠ΫϩευϝΠϯ௨৴͕ՄೳͰ͢ɻ
  18. Backlog APIΩʔͷൃߦ

  19. Backlog APIΩʔͷൃߦ

  20. Webhook Webhook ͸ɺ՝୊΍ίϝϯτɺWikiɺϑΝΠϧͷ௥Ճ΍ߋ৽ɺSubversion ΍ Git ΁ͷίϛοτ΍ϓογϡͳͲͷΠϕϯτ͕ى͖ͨͱ͖ʹɺࢦఆͨ͠ URLʹͦͷ৘ใΛૹ৴ (HTTPϦΫΤετ)͢Δ͜ͱ͕Ͱ͖ΔػೳͰ͢ɻ ྫ͑͹ɺ՝୊͕ߋ৽͞Εͨͱ͖ʹνϟοταʔϏεʹ௨஌ͨ͠ΓɺGit Ϧϙ

    δτϦʹϓογϡ͞Εͨͱ͖ʹϏϧυγεςϜʹ௨஌͢Δ౳ɺଞͷαʔϏ ε΍γεςϜͱͷ࿈ܞʹར༻͢Δ͜ͱ͕Ͱ͖·͢ɻ
  21. Backlog Webhookͷઃఆ

  22. Backlog Webhookͷઃఆ

  23. Slack Webhook URLऔಘ ҎԼURLʹΞΫηε͢Δɻ https://slack.com/services/new/incoming-webhook

  24. Slack Webhook URLऔಘ

  25. Slack Webhook URLऔಘ URLΛίϐʔ

  26. ҎԼͷ11ͷαʔϏεΛૢ࡞͢Δ͜ͱ͕Ͱ͖·͢ɻ ɾΧϨϯμʔ ɾίϯλΫτ ɾυϥΠϒ ɾυΩϡϝϯτ ɾεϓϨουγʔτ ɾϑΥʔϜ ɾGmail ɾάϧʔϓ ɾϚοϓ

    ɾαΠτ ɾLanguages Google Apps Scriptͷର৅ͱͳΔαʔϏε
  27. εϓϨουγʔτΛ৽ن࡞੒ > πʔϧɹ> εΫϦϓτΤσΟλ ΦϯϥΠϯΤσΟλ͕։͔ΕɺJavaScriptΛॻ͍͍͖ͯ·͢ɻ GASͷ࡞੒ํ๏

  28. GASͷιʔε ɾ࢒λεΫͷSlack௨஌ ɾΞΫςΟϏςΟͷSlack ௨஌ ɾ࢒λεΫΛεϓϨου γʔτʹॻ͖ࠐΈ ͳͲΛߦ͏

  29. GASͷιʔε

  30. Copyright Re:Build.inc All Rights Reserved. ·ͱΊ

  31. Backlog APIͱGASΛ ࢖͑͹΋ͬͱɺ ͍ΖΜͳࣄ͕Ͱ͖ͦ͏ʂʂʂ

  32. ࢀߟ https://qiita.com/murase/items/9175fb908492279ad817 https://qiita.com/kingpanda/items/44667f2ddc39e760ea8b https://qiita.com/vmmhypervisor/items/18c99624a84df8b31008