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

[社内LT]AndroidプロジェクトにDangerを導入してみた

 [社内LT]AndroidプロジェクトにDangerを導入してみた

社内LT

きりみん

October 16, 2017
Tweet

More Decks by きりみん

Other Decks in Programming

Transcript

  1. AndroidϓϩδΣΫτʹ
    DangerΛಋೖͯ͠Έͨ
    @kirimin

    View full-size slide

  2. Dangerʁ
    • PRͷࣗಈνΣοΫπʔϧ
    • ਓྗͰ΍Δඞཁͷͳ͍ϨϏϡʔΛࣗಈԽ͢Δ
    • ϨϏϡʔ޻਺࡟ݮɺਓؒʹ͔͠ग़དྷͳ͍Ϩ
    Ϗϡʔʹूத͢Δ

    View full-size slide

  3. ࢖͍ํ
    • ϓϩδΣΫτ௚ԼʹgemfileͱDangerfileΛ௥
    Ճ͢Δɻ
    • DangerfileʹεΫϦϓτΛॻ͘ɻ
    • CI͔ΒίϚϯυΛୟ͍࣮ͯߦ͢Δɻ
    bundle install
    bundle exec danger

    View full-size slide

  4. Dangerfile?
    • ͨͩͷruby script
    • ҎԼͷΑ͏ʹॻ͘ͱࣗಈͰPRʹίϝϯτͯ͠
    ͘ΕΔ
    message('Αͦ͞͏')
    warn('΍͹ͦ͏')
    fail('ͩΊͦ͏')

    View full-size slide

  5. Dangerfile?
    • PRʹؔ͢Δ৘ใΛgem͔ΒऔಘͰ͖Δ
    • ͍Ζ͍ΖPlugin΋͋Δ
    if github.pr_title.include? '[WIP]'
    warn('WIPͩΑ')
    end

    View full-size slide

  6. ࣮ࡍʹ΍ͬͨ͜ͱ
    • Ϛʔδઌ͕masterͳΒΞϥʔτ
    • λΠτϧʹIssue൪߸ؚ͕·Ε͍ͯͳ͚Ε͹Ξϥʔτ
    • λΠτϧʹWIPؚ͕·Ε͍ͯͨΒΞϥʔτ
    • ࣗಈͰؔ࿈IssueΛclose͢Δه๏͕ॻ͔Ε͍ͯͳ͚Ε͹Ξϥʔτ
    • assignee͕ઃఆ͞Ε͍ͯͳ͚Ε͹Ξϥʔτ
    • PR͕࡞੒͞ΕͨΒSlackʹϝϯγϣϯΛඈ͹͢

    View full-size slide

  7. ࣮ࡍͷεΫϦϓτ

    View full-size slide

  8. ΍Γ͍͚ͨͲग़དྷͯͳ͍͜ͱ
    • Reviewerʹؚ·Ε͍ͯΔਓʹͷΈϝϯγϣϯ
    Λඈ͹͢
    ɹ→ReviewerͷҰཡ͕danger͔Β͸औಘͰ͖ͳ
    ͍ɻGitHub্ͰAPI͕෼͔Ε͓ͯΓखಈͰऔಘ͢Δ
    ͷ΋ͪΐͬͱ໘౗

    View full-size slide

  9. ΍Γ͍͚ͨͲग़དྷͯͳ͍͜ͱ
    • AndroidLintΛ૸ΒͤࣗಈͰίʔυʹࢦఠίϝ
    ϯτΛຒΊࠐΉ
    ɹ→AndroidLint͕ͦ΋ͦ΋KotlinʹରԠ͍ͯ͠ͳ͍
    Β͍͠ͷͰอཹ

    View full-size slide

  10. ͓ΘΓ
    • ࠓޙ΋ػೳ֦ு͍͖͍ͯͨ͠ॴଘ

    View full-size slide