Slide 1

Slide 1 text

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

Slide 2

Slide 2 text

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

Slide 3

Slide 3 text

RubyKaigi 2023 5/11-13 3

Slide 4

Slide 4 text

দຊ৓ 4

Slide 5

Slide 5 text

ͦ͹ɺদຊϒϧϫϦʔ 5

Slide 6

Slide 6 text

#kaigieffect 6

Slide 7

Slide 7 text

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

Slide 8

Slide 8 text

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

Slide 9

Slide 9 text

1. OSSʹߩݙ͢Δಈػ 9

Slide 10

Slide 10 text

ۀ຿ͰOSSͷ໰୊Λݟ͚ͭΔ • ! ػೳෆ଍: ͋ͱগ͠ػೳ͕଍Γͳ͍ • " όά: υΩϡϝϯτͱڍಈ͕͍͋ͬͯͳ͍ • # આ໌ෆ଍: ॲཧͷڍಈ͕෼͔ΓͮΒ͍1 1 υΩϡϝϯτ΍ΤϥʔจݴΛ௚ͤΔՄೳੑ 10

Slide 11

Slide 11 text

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

Slide 12

Slide 12 text

! ϞϯΩʔύον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

Slide 13

Slide 13 text

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

Slide 14

Slide 14 text

OSSʹύονΛૹΔཧ༝ • ! ύονΛϝϯς͠ͳͯ͘ࡁΉ • " ίϛολͷϨϏϡʔΛड͚ΒΕΔ • ♻ OSS΁ͷԸฦ͠ ! OSSʹײँͯ͠ΔͷͰɺͰ͖ΔൣғͰ͸ڠྗ͍ͨ͠ 14

Slide 15

Slide 15 text

ͦͷଞͷϝϦοτ • ! ٕज़ྗͷ޲্ • " ӳޠྗͷ޲্ • # ΧδϡΞϧ໘ஊͷձ࿩ωλ • $ ษڧձͷొஃґཔʹܨ͕Δʢnowʣ 15

Slide 16

Slide 16 text

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

Slide 17

Slide 17 text

! 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

Slide 18

Slide 18 text

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

Slide 19

Slide 19 text

19

Slide 20

Slide 20 text

rubocop/rubocop 20

Slide 21

Slide 21 text

fluent/fluent-bit 21

Slide 22

Slide 22 text

! OSSʹؔΘͬͯΈΔ 22

Slide 23

Slide 23 text

! ؆୯ͳߩݙ • Twitter΍ϒϩάΛॻ͘ • GitHubͰϦΞΫγϣϯ͢Δ • ΦϑϥΠϯͰ࡞ऀʹײँΛ఻͑Δ • ! ࠙਌ձͰձ࿩ͷ͖͔͚ͬʹྑ͍ 23

Slide 24

Slide 24 text

24

Slide 25

Slide 25 text

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

Slide 26

Slide 26 text

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

Slide 27

Slide 27 text

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

Slide 28

Slide 28 text

28

Slide 29

Slide 29 text

29

Slide 30

Slide 30 text

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

Slide 31

Slide 31 text

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

Slide 32

Slide 32 text

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

Slide 33

Slide 33 text

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

Slide 34

Slide 34 text

34

Slide 35

Slide 35 text

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

Slide 36

Slide 36 text

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

Slide 37

Slide 37 text

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

Slide 38

Slide 38 text

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

Slide 39

Slide 39 text

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

Slide 40

Slide 40 text

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

Slide 41

Slide 41 text

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

Slide 42

Slide 42 text

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

Slide 43

Slide 43 text

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

Slide 44

Slide 44 text

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

Slide 45

Slide 45 text

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

Slide 46

Slide 46 text

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

Slide 47

Slide 47 text

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