Upgrade to Pro — share decks privately, control downloads, hide ads and more …

CircleCIからPull requestできるといろいろ捗る

CircleCIからPull requestできるといろいろ捗る

622960e35f2e92c378088d572ed710ee?s=128

rvillage

July 29, 2018
Tweet

Transcript

  1. CircleCI͔Β Pull requestͰ͖Δͱ ͍Ζ͍ΖḿΔ TokyuRubyձٞ12 2018-07-29 (೔) Masayuki Kawamura |

    @rvillage
  2. None
  3. CI͔Β؆୯ʹPull requestͰ͖Δ

  4. None
  5. CircleCI͔Β Pull requestͰ͖Δͱ ͍Ζ͍ΖḿΔ TokyuRubyձٞ12 2018-07-29 (೔) Masayuki Kawamura |

    @rvillage
  6. ͳͥpr-daikouͳͷ͔ʁ • RuboCop͕޷͖͚ͩͲࢦఠ௚ ͢ͷ͍ͨ΁Μ • RuboCopʹ͸AutocorrectΦ ϓγϣϯͰࣗಈमਖ਼ͯ͘͠Ε Δਆػೳ͕͋Δ

  7. ͳͥpr-daikouͳͷ͔ʁ • RuboCop͕޷͖͚ͩͲࢦఠ௚ ͢ͷ͍ͨ΁Μ • RuboCopʹ͸AutocorrectΦ ϓγϣϯͰࣗಈमਖ਼ͯ͘͠Ε Δਆػೳ͕͋Δ ਆΛࣗಈԽ͍ͨ͠ʂʂ

  8. ͳͥpr-daikouͳͷ͔ʁ • Sider (౰࣌SideCI)͋Δ͚Ͳɺ privateϦϙδτϦͷΈ • Ͱ͖Δ͚ͩ҆͘(λμͰ)࣮ݱ͍ͨ͠ • circleci-bundle-update-prͰCI͔Β PRͰ͖Δ஌ݟΛಘͨ

  9. None
  10. ͳΜͰ΋ࣗಈԽ͍ͨ͠ Commit๨Ε • db/schema.rb • annotate_models Lint • rubocop —auto-correct

    • eslint —fix Library update • bundle update • yarn upgrade
  11. None
  12. ຊ౰ʹ΄͔ͬͨ͠ͷ͸ PRΛ࡞ͬͯ͘ΕΔػೳ

  13. ͳʹ͕ͦΜͳʹḿΔͷ͔ʁ rubocop —auto-correct͔ͯ͠Β commit͢ΔΑ͏ʹ͠·͠ΐ͏ ๨Ε͍ͯͨͷͰɺ௥ՃͰ commit͓͖ͯ͠·͢ schema.rb΋๨Εͣ commit͍ͯͩ͘͠͞ ๨Ε͍ͯͨͷͰɺ௥ՃͰ commit͓͖ͯ͠·͢

  14. None
  15. ͳʹ͕ͦΜͳʹḿΔͷ͔ʁ rubocop —auto-correct͔ͯ͠Β commit͢ΔΑ͏ʹ͠·͠ΐ͏ ๨Ε͍ͯͨͷͰɺ௥ՃͰ commit͓͖ͯ͠·͢ schema.rb΋๨Εͣ commit͍ͯͩ͘͠͞ ๨Ε͍ͯͨͷͰɺ௥ՃͰ commit͓͖ͯ͠·͢

    ৼΓฦΓͰؾΛ͚ͭΑ͏ͱ࿩ ͯ͠΋खಈ͡Ό๨ΕΔ
  16. ͳʹ͕ͦΜͳʹḿΔͷ͔ʁ git push origin branch git commit -m “rubocop —auto-correct”

    git push origin ci/branch bin/rails db:create db:migrate git commit -m “Update schema.rb” git push origin ci/branch
  17. None
  18. ͳʹ͕ͦΜͳʹḿΔͷ͔ʁ git push origin branch git commit -m “rubocop —auto-correct”

    git push origin ci/branch bin/rails db:create db:migrate git commit -m “Update schema.rb” git push origin ci/branch CI͸๨Εͣඞͣ΍ͬͯ͘Εͯ PRΛϚʔδ͢Δ͚ͩʹͳΔ
  19. ·ͱΊ • LinterͷAutocorrectΦϓγϣϯ͸ਆػೳ • ਓ͸๨ΕΔੜ͖෺ͳͷͰcommit͢Δલʹ ࣮ߦ͍ͯͩ͘͠͞͸φϯηϯε • PRΛϚʔδ͢Δ͚ͩͱ͍͏ମݧʹམͱ ͠ࠐΉͷ͕େ੾

  20. ͍͞͝ʹ

  21. Enjoy pr-daikou!