Automate workflow with Ruby

Automate workflow with Ruby

a talk at Jakarta.rb
lightning talk at 2017


Didik Wicaksono

December 02, 2016


  1. Automate Workflow with Ruby . Didik Wicaksono

  2. •github: @firewalker06 •twitter: @did1k

  3. I work at

  4. None
  5. None
  6. None
  7. We inspire people through Cooking

  8. I’m with ID-Ruby Community •We will have our first Ruby

    Conference in Indonesia on Oct 6th-7th ( •Please support our association: PERKODI (
  9. !" > 50 engineers, serving 66 countries with 17 languages

  10. ⛏ Workflow in a glance •Starts with a Hypothesis •Organize

    Task •Development & Code Review •Deploy & Announce Release
  11. development-6b3c7a4a53fc

  12. I’m sure you already familiar with these services

  13. Workflow breakdown •discuss hypothesis •create a card •assign card •create

    a branch •do magic •push a branch •create a pull request •code review •merge pull request •deploy code •announce release in Slack •mark card / checklist as completed
  14. Looks repetitive •On Slack •discuss hypothesis •On Trello •create a

    card •assign card •On local •create a branch •do magic •push a branch •On Github • create a pull request • code review • merge pull request • Back to local again • deploy code • Back to Slack again • announce release in Slack • Finally on Trello • mark card / checklist as completed
  15. If its repetitive, we can automate!

  16. Looks good? •On Slack •discuss hypothesis •On local •create a

    card •assign card •create a branch •do magic •push a branch •create a pull request •code review •merge pull request •mark card / checklist as completed •On Slack • deploy code •announce release in Slack
  17. Lets begin!

  18. trello-flow

  19. trello-flow We uses a lot of Trello boards

  20. trello-flow • •available commands: ‣ git open 
 # Open

    relevant card/all users card in browser ‣ git start
 git start <card URL> 
 # choose card, assigns self & creates branch ‣ git finish 
 # checks off task, opens PR ‣ git cleanup 
 # cleans up merged card branches
  21. Demo

  22. Some element of code reviews can be automated

  23. • •Ruby static code analyzer •enforce styleguide •run in development

  24. None
  25. • •uses rubocop to review Ruby •supports various languages including

    js, coffeescript and scss •integrated with Github
  26. None
  27. CP-8 Cookpad Bot

  28. CP-8 Cookpad Bot • • This little fella helps

    simplify your frequent labelling in Github • Deployable to Heroku
  29. CP-8 Cookpad Bot Opening a PR with "[WIP]" in the

    title adds WIP label
  30. CP-8 Cookpad Bot Approving changes adds Reviewed label

  31. CP-8 Cookpad Bot Tells you when a PR has no

  32. CP-8 Cookpad Bot Attach and moves Trello cards around

  33. capistrano-fiesta

  34. capistrano-fiesta • fiesta •integrates Github pull requests and Slack •compiles

    list of github PR since last release
  35. capistrano-fiesta reads “Release note” in PR description

  36. capistrano-fiesta Sends slack announcement

  37. capistrano-fiesta compiles list of PR in[repo]/releases

  38. Ruby + Bot = Ruboty

  39. ruboty • •its a bot, built in Ruby •deployable to

    Heroku •supports various chat services and some DBs
  40. ruboty

  41. Everyday on Cookpad •Trello-flow •Rubocop and Hound •CP-8 Bot •Capistrano-fiesta

  42. Everyday on Cookpad •Trello-flow •Rubocop and Hound •CP-8 Bot •Capistrano-fiesta