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

Get started with OSS contributions

Get started with OSS contributions

OSSへのコントリビュート - Techmee vol.7
https://timeedev.connpass.com/event/279568/

Takumi Shotoku

May 25, 2023
Tweet

More Decks by Takumi Shotoku

Other Decks in Technology

Transcript

  1. Get started with OSS contributions
    Techmee vol.7 2023/05/25
    1

    View full-size slide

  2. ࣗݾ঺հ
    • ໊લ: ਖ਼ಙ ޼(aka: ਆ଎)
    • ձࣾ: גࣜձࣾλΠϛʔ
    • GitHub: @sinsoku (ը૾ӈ্)
    • Twitter: @sinsoku_listy (ը૾ӈԼ)
    • ޷͖ͳݴޠ: Rust ΋ͪΖΜRubyʂ
    !
    • ࢓ࣄ: YAMLͱHCLʢTerraformʣ৬ਓ
    2

    View full-size slide

  3. RubyKaigi 2023 5/11-13
    3

    View full-size slide

  4. ͦ͹ɺদຊϒϧϫϦʔ
    5

    View full-size slide

  5. #kaigieffect
    6

    View full-size slide

  6. !
    ʮOSS΁ͷߩݙ͸೉ͦ͠͏ʯ
    !
    ʮOSS͸೉͘͠φΠϤʯ
    7

    View full-size slide

  7. ΞδΣϯμ
    1. OSSʹߩݙ͢Δಈػ
    2. OSSʹߩݙ͢Δํ๏ͱࣄྫ঺հ
    3. RailsͰૂ͍໨ͷߩݙϙΠϯτ
    8

    View full-size slide

  8. 1. OSSʹߩݙ͢Δಈػ
    9

    View full-size slide

  9. ۀ຿ͰOSSͷ໰୊Λݟ͚ͭΔ

    !
    ػೳෆ଍: ͋ͱগ͠ػೳ͕଍Γͳ͍

    "
    όά: υΩϡϝϯτͱڍಈ͕͍͋ͬͯͳ͍

    #
    આ໌ෆ଍: ॲཧͷڍಈ͕෼͔ΓͮΒ͍1
    1 υΩϡϝϯτ΍ΤϥʔจݴΛ௚ͤΔՄೳੑ
    10

    View full-size slide

  10. !
    खݩͰ௚͢͜ͱ΋Ͱ͖Δ
    11

    View full-size slide

  11. !
    ϞϯΩʔύον2
    # config/application.rb
    require 'webpacker/version'
    raise 'Consider removing this patch' unless Webpacker::VERSION == '5.4.4'
    module WebpackerPatch
    module FasterCompilation
    # https://github.com/rails/webpacker/pull/2855
    def fresh?
    last_compilation_digest&.== watched_files_digest
    end
    end
    Webpacker::Compiler.prepend(FasterCompilation)
    end
    2 https://docs.ruby-lang.org/ja/latest/method/Module/i/prepend.html
    12

    View full-size slide

  12. !
    GitHubͰϑΥʔΫ
    gemΛϑΥʔΫ͠ɺίʔυΛ௚ͨ͠gemΛGemfileͰࢀর͢Δɻ
    # Gemfile
    source 'https://rubygems.org'
    git_source(:github) { |repo| "https://github.com/#{repo}.git" }
    gem "foo", github: "sinsoku/foo"
    13

    View full-size slide

  13. OSSʹύονΛૹΔཧ༝

    !
    ύονΛϝϯς͠ͳͯ͘ࡁΉ

    "
    ίϛολͷϨϏϡʔΛड͚ΒΕΔ


    OSS΁ͷԸฦ͠
    !
    OSSʹײँͯ͠ΔͷͰɺͰ͖ΔൣғͰ͸ڠྗ͍ͨ͠
    14

    View full-size slide

  14. ͦͷଞͷϝϦοτ

    !
    ٕज़ྗͷ޲্

    "
    ӳޠྗͷ޲্

    #
    ΧδϡΞϧ໘ஊͷձ࿩ωλ

    $
    ษڧձͷొஃґཔʹܨ͕Δʢnowʣ
    15

    View full-size slide

  15. 2. OSSʹߩݙ͢Δํ๏ͱࣄྫ঺հ
    16

    View full-size slide

  16. !
    OSSʹߩݙ͢Δ४උ
    ߩݙ͢Δਓ޲͚ͷυΩϡϝϯτΛಡΈ·͠ΐ͏ɻ
    • rails/rails: Contributing to Ruby on Rails3
    • rubocop/rubocop: CONTRIBUTING.md4
    • fluent/fluent-bit: CONTRIBUTING.md5
    5 https://github.com/fluent/fluent-bit/blob/v2.1.3/CONTRIBUTING.md
    4 https://github.com/rubocop/rubocop/blob/v1.51.0/CONTRIBUTING.md
    3 https://guides.rubyonrails.org/contributingtorubyonrails.html
    17

    View full-size slide

  17. rails/rails
    IssueͰػೳཁ๬Λग़͞ͳ͍ɻ
    1.4 What about Feature Requests?
    Please don't put "feature request" items into GitHub Issues.
    cosmetic changesͷϓϧϦΫΛग़͞ͳ͍ɻ
    Changes that are cosmetic and do not add anything substantial to the stability,
    functionality, or testability of Rails will generally not be accepted
    18

    View full-size slide

  18. rubocop/rubocop
    20

    View full-size slide

  19. fluent/fluent-bit
    21

    View full-size slide

  20. !
    OSSʹؔΘͬͯΈΔ
    22

    View full-size slide

  21. !
    ؆୯ͳߩݙ
    • Twitter΍ϒϩάΛॻ͘
    • GitHubͰϦΞΫγϣϯ͢Δ
    • ΦϑϥΠϯͰ࡞ऀʹײँΛ఻͑Δ

    !
    ࠙਌ձͰձ࿩ͷ͖͔͚ͬʹྑ͍
    23

    View full-size slide

  22. ~/.config/rails/railsrc ʹରԠ͢ΔϓϧϦΫɻ
    25

    View full-size slide

  23. !
    OSSͷ։ൃʹؔΘͬͯΈΔ
    26

    View full-size slide

  24. !
    গ͠೉͍͠ߩݙ
    • IssueͷτϦΞʔδʹڠྗ͢Δ
    • ϓϧϦΫͷϨϏϡʔʹࢀՃ͢Δ
    • υΩϡϝϯτΛ௚͢
    27

    View full-size slide

  25. https://github.com/rails/rails/issues/37446
    30

    View full-size slide

  26. https://sinsoku.hatenablog.com/entry/2019/08/08/020954
    31

    View full-size slide

  27. https://github.com/rails/rails/pull/39411#discussion_r432927246
    32

    View full-size slide

  28. https://github.com/rails/rails/pull/37054
    33

    View full-size slide

  29. rurema -
    !
    Ͱ࢝Ί΍͍͔͢΋
    35

    View full-size slide

  30. !
    ͞ΒʹOSSͷ։ൃʹؔΘͬͯΈΔ
    36

    View full-size slide

  31. !
    ೉͍͠ߩݙ
    • IssueΛใࠂ͢Δ
    • όάΛमਖ਼͢Δ
    • ৽ػೳΛ௥Ճ͢Δ
    37

    View full-size slide

  32. ؾΛ͚ͭͯΔ͜ͱ
    • Issueʹ͸࠷খͷ࠶ݱखॱΛॻ͘
    • աڈͷIssueͱϓϧϦΫΛࢀߟʹ͢Δ
    • ίϛοτϝοηʔδΛஸೡʹॻ͘6
    6 Railsͩͱgit log --author=kamipo --no-merges Λࢀߟʹ͍ͯ͠Δ
    38

    View full-size slide

  33. https://github.com/rails/rails/issues/39205
    39

    View full-size slide

  34. https://github.com/github/branch-deploy/pull/103
    40

    View full-size slide

  35. 3. RailsͰૂ͍໨ͷߩݙϙΠϯτ
    41

    View full-size slide

  36. RailsͰૂ͍໨ͷߩݙϙΠϯτ
    1. IssueͱϓϧϦΫͷτϦΞʔδ
    2. Rails v7.1.0.rc1 ͷಈ࡞ใࠂ
    3. Docker, mrsked/mrsk
    42

    View full-size slide

  37. IssueͱϓϧϦΫͷτϦΞʔδ
    • ίʔυͷมߋΑΓෑډ͕௿͍
    • Railsίϛολͷख͕଍Γͯͳ͍
    • Issues 385 / Pull requests 4557
    • ࣗ෼ͷษڧʹͳΔ
    • େࣄͳͷ͸ӳޠྗͱؾ߹͍
    7 2023-05-24ݱࡏ
    43

    View full-size slide

  38. Rails v7.1.0.rc1 ͷಈ࡞ใࠂ
    • ۀ຿ͷCIͰ2όʔδϣϯΛಈ͔ͯ͠ΈΔ
    • σάϨ͕͋Ε͹ɺRailsʹIssueͰใࠂ͢Δ
    • gem͕ະରԠͳΒɺv7.1ʹରԠ͢ΔϓϧϦΫΛૹΔ
    • v7.1ͷϦϦʔεલͳΒRailsίϛολͷॿྗΛظ଴Ͱ͖Δ
    • ϦϦʔεޙ͸೉͍͠...
    44

    View full-size slide

  39. https://github.com/rails/rails/issues/361038
    8 kamipo͞Μ͕1೔Ͱमਖ਼͍ͯ͠Δ
    !
    45

    View full-size slide

  40. Docker, mrsked/mrsk
    • Dockerfile
    • v7.1Ͱ͸Dockerfile͕ੜ੒͞ΕΔ
    • https://github.com/rails/rails/pull/46762
    • mrsked/mrsk
    • DHH੡ͷσϓϩΠπʔϧ
    • https://github.com/rails/rails/pull/47926
    46

    View full-size slide

  41. ͥͻOSSʹߩݙͯ͠Έ·͠ΐ͏
    47

    View full-size slide