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

danger-swift

 danger-swift

Satoshi Hachiya

August 28, 2017
Tweet

More Decks by Satoshi Hachiya

Other Decks in Programming

Transcript

  1. danger-swift
    2017.08.28 potatotips #43 / #potatotips
    Satoshi Hachiya / @jpmartha_jp

    View full-size slide

  2. Satoshi Hachiya
    • iOS ΞϓϦ Player!
    • http:/
    /www.playerapp.tokyo
    • ϋφίϨ
    • https:/
    /hana-collection.com

    View full-size slide

  3. Danger (Ruby)

    View full-size slide

  4. Danger ͱ͸
    • Danger (Ruby)
    • http:/
    /danger.systems/ruby/
    • Danger JS
    • http:/
    /danger.systems/js/
    • ✨ danger-swift ✨
    • ✨ https:/
    /github.com/danger/danger-swift ✨

    View full-size slide

  5. [WIP] danger-swift
    • Dangerfile Λ Swift Ͱॻ͘
    • Danger JS ! JSON
    • Swift Package Manager Ͱ࡞ΔίϚϯυϥΠϯπʔϧ
    • Xcode 9 (beta) / Swift 4.0

    View full-size slide

  6. Danger JS
    http:/
    /danger.systems/js/

    View full-size slide

  7. Danger (Ruby) Ͱઆ໌
    http:/
    /danger.systems/ruby/

    View full-size slide

  8. λʔϛφϧ্Ͱ
    Danger Λ࢖͏

    View full-size slide

  9. Dangerfile
    # Test
    warn("ͱ͜ΖͰ΋͏ҿΜͰΔ΍Ζ!ʁ @#{github.pr_author}")

    View full-size slide

  10. ίϚϯυ࣮ߦʢOSS ͷ৔߹ʣ
    $ bundle exec danger pr https://github.com/jpmartha/LicensePlist/pull/1
    Result
    Warnings:
    - [ ] ͱ͜ΖͰ΋͏ҿΜͰΔ΍Ζ!ʁ @jpmartha

    View full-size slide

  11. CI ্Ͱ
    Danger Λ࢖͏

    View full-size slide

  12. GitHubʢOSS ͷ৔߹ʣ
    • Danger ༻ͷ ΞΧ΢ϯτ࡞੒
    • Personal access tokens Λઃఆ

    View full-size slide

  13. Travis CIʢ·ͨ͸ CircleCI ͳͲʣ
    • ؀ڥม਺ DANGER_GITHUB_API_TOKEN Λઃఆ

    View full-size slide

  14. Travis CI
    • .travis.yml Λ࡞੒
    ...
    include:
    - os: osx
    language: swift
    osx_image: xcode8.3
    script:
    - bundle exec danger
    ...

    View full-size slide

  15. bundle exec danger Λ
    ࣮ߦ͢ΔʢOSS ͷ৔߹ʣ
    # Test
    ͱ͜ΖͰ΋͏ҿΜͰΔ΍Ζ!ʁ @#{github.pr_author}")

    View full-size slide

  16. GitHub ͔ΒऔಘͰ͖Δ಺༰ͷҰྫ
    • github.pr_author
    • github.pr_title
    • github.pr_body
    • github.pr_labels
    • github.pr_json["milestone"]
    • github.pr_json["assignee"]
    • etc.

    View full-size slide

  17. αϯϓϧը૾

    View full-size slide

  18. ! Stop saying "you forgot to ..." in
    code review by
    (https:/
    /github.com/danger/danger/ ͔ΒҾ༻)

    View full-size slide

  19. try! Swift
    • try! Swift NYC 2017
    • try! Swift India
    • try! Swift Tokyo 2018ʢ࣮ݱʹ޲͚४උதʣ

    View full-size slide