コネヒトの健全性を支えるGithub Actionsの事例紹介

1821636ac95415aa6e84bc33b394283d?s=47 tommykw
September 25, 2020

コネヒトの健全性を支えるGithub Actionsの事例紹介

1821636ac95415aa6e84bc33b394283d?s=128

tommykw

September 25, 2020
Tweet

Transcript

  1. $POOFIJUP*OD෋ా݈ೋ  ίωώτϚϧγΣΦϯϥΠϯʮࣄۀΛࢧ͑Δ8FC։ൃʯWPM ϚϚͷҰาΛࢧ͑Δ ίωώτͷ݈શੑΛࢧ͑Δ (JUIVC"DUJPOTͷࣄྫ঺հ 

  2. !UPNNZLX ෋ా݈ೋ ίωώτ"OESPJEΤϯδχΞ 

  3. ΞδΣϯμ  1. ίωώτͷ݈શੑͱ͸ʁ 2. Github ActionsͰࣗಈԽ 3. Github Actionsͷόʔδϣχϯά

    4. ·ͱΊ
  4. ίωώτͷ݈શੑͱ͸ʁ 

  5.  • ։ൃޮ཰্͕͕Δ͜ͱͰɺίωώτͷαʔ ϏεΛ࢖ͬͯ͘ΕΔϢʔβʔ΁ૉૣ͘Ձ஋ Λఏڙ͢Δ • ։ൃνʔϜʹ͓͚Δ݈શੑΛࣔ͢ • 2020 1QͰఆٛ͠ɺ2Q͔ΒվળΛճͯ͠

    ͍Δ ίωώτͷ݈શੑͱ͸ʁ
  6.  ݈શੑ͸ͲΜͳࢦඪʁ

  7.  • λεΫணख ʙ ׬ྃͷฏۉΛ2.4೔Ҏ಺ • ϨϏϡʔ։࢝·ͰΛ1Ӧۀ೔Ҏ಺ʹߦͬͨ PR͕90%Ҏ্ • PRͷੜଘظؒͷฏۉ͕1.4೔ҎԼ

    ݈શੑ͸ͲΜͳࢦඪʁ
  8.  • λεΫணख ʙ ׬ྃͷฏۉΛ2.4೔Ҏ಺ • ϨϏϡʔ։࢝·ͰΛ1Ӧۀ೔Ҏ಺ʹߦͬͨ PR͕90%Ҏ্ • PRͷੜଘظؒͷฏۉ͕1.4೔ҎԼ

    ݈શੑ͸ͲΜͳࢦඪʁ IssueΛద੾ͳαΠζʹ෼ׂ͢ΔͨΊʹ ετʔϦʔϙΠϯτͷେ͖͞Λݟͯ൑அ
  9.  • λεΫணख ʙ ׬ྃͷฏۉΛ2.4೔Ҏ಺ • ϨϏϡʔ։࢝·ͰΛ1Ӧۀ೔Ҏ಺ʹߦͬͨ PR͕90%Ҏ্ • PRͷੜଘظؒͷฏۉ͕1.4೔ҎԼ

    ݈શੑ͸ͲΜͳࢦඪʁ PR͕์ஔ͞Εͳ͍Α͏ϨϏϡʔ։࢝·Ͱ ʹͲΕ͘Β͍͔͔͍ͬͯΔ͔ΛτϥοΩϯ ά
  10.  • λεΫணख ʙ ׬ྃͷฏۉΛ2.4೔Ҏ಺ • ϨϏϡʔ։࢝·ͰΛ1Ӧۀ೔Ҏ಺ʹߦͬͨ PR͕90%Ҏ্ • PRͷੜଘظؒͷฏۉ͕1.4೔ҎԼ

    ݈શੑ͸ͲΜͳࢦඪʁ PR͕Ϋϩʔζ͞ΕΔ·ͰΛτϥοΩϯά ͠΍ΓऔΓʹ஗Ԇ͕ੜ͍ͯ͡ͳ͍͔νΣο Ϋ
  11.  • λεΫணख ʙ ׬ྃͷฏۉΛ2.4೔Ҏ಺ • ϨϏϡʔ։࢝·ͰΛ1Ӧۀ೔Ҏ಺ʹߦͬͨ PR͕90%Ҏ্ • PRͷੜଘظؒͷฏۉ͕1.4೔ҎԼ

    ݈શੑ͸ͲΜͳࢦඪʁ
  12.  • λεΫணख ʙ ׬ྃͷฏۉΛ2.4೔Ҏ಺ • ϨϏϡʔ։࢝·ͰΛ1Ӧۀ೔Ҏ಺ʹߦͬͨ PR͕90%Ҏ্ • PRͷੜଘظؒͷฏۉ͕1.4೔ҎԼ

    ݈શੑ͸ͲΜͳࢦඪʁ ʮϨϏϡʔ։࢝·ͰΛӦۀ೔Ҏ಺ ʹߦͬͨ13͕Ҏ্ʯΛ (JUIVC"DUJPOTͰվળͯ͠ΈΔ
  13. (JUIVC"DUJPOTͰࣗಈԽ 

  14.  • ʮϨϏϡʔ։࢝·ͰΛ1Ӧۀ೔Ҏ಺ʹߦͬ ͨ PR͕90%Ҏ্ʯΛୡ੒͍ͨ͠ • ʮҰ೔ͨͬͯ΋ϨϏϡʔ։࢝ͯ͠ͳ͍ͱ͖ ʹϨϏϡϫʔʹϝϯγϣϯΛૹΔʯʹλ εΫ෼ղͰ͖Δ •

    Github scheduled remindersͰ্هͷΑ͏ ͳࡉ͔͍νϡʔχϯά͸೉ͦ͠͏ Github Team ϦϚΠϯμʔΛ࢖͏ͱ࠷খͷܦա࣌ ؒΛઃఆͰ͖Δ (JUIVC"DUJPOTͰ΍Γ͍ͨ͜ͱ
  15.  • https://github.com/ marketplace/actions/ pull-request-reviewer- reminder-action • PRͷreviewersΛࢦఆ͠ ͔ͯΒઃఆͨ࣌ؒ͠· ͰʹϨϏϡʔ͞Ε͔ͨ

    νΣοΫ͢Δ (JUIVC"DUJPOTΛ࡞ͬͨ
  16.  • .github/workflows/pull-request-reviewer- reminder.yml ͷΑ͏ͳϑΝΠϧΛ࡞੒͢Δ • ඞཁʹԠͯ͡ύϥϝʔλΛௐ੔͢Δ ࢖͍ํ

  17.  ௨஌಺༰

  18. ಋೖͨ݁͠Ռ͸ʁ 

  19.  • ࣮͸ಋೖͯ͠·ͩҰि͔ؒ͠ܦ͍ͬͯͳ͍ ͷͰޮՌ͕Θ͔͍ͬͯͳ͍ • ͨͩɺ௨஌ʹΑͬͯPRϨϏϡʔʹؾͮ͘ ৔໘͕૿͑ͨ • ֤ϦϙδτϦʹಋೖ͢Δඞཁ͕͋ΔͷͰ खؒ

    • ࣗ࡞Github ActionsΛ࡞Δ্Ͱಠಛͳόʔ δϣϯ؅ཧ͕͋Δ ಋೖͨ݁͠Ռ
  20.  • ࣮͸ಋೖͯ͠·ͩҰि͔ؒ͠ܦ͍ͬͯͳ͍ ͷͰޮՌ͕Θ͔͍ͬͯͳ͍ • ͨͩɺhogehoge͞Ε͍ͯΔ • ֤ϦϙδτϦʹಋೖ͢Δඞཁ͕͋ΔͷͰ खؒ •

    ࣗ࡞Github ActionsΛ࡞Δ্Ͱಠಛͳόʔ δϣϯ؅ཧΛ஌ͬͨ ಋೖͨ݁͠Ռ ͲΜͳόʔδϣϯ؅ཧ ͳΜͩΖ͏ʁ
  21. (JUIVC"DUJPOTͷ όʔδϣχϯά 

  22.  • Github MarketplaceͰGitHub ActionΛݟͯ Δͱɺv1΍v1.x.xͱ͍ͬͨόʔδϣϯ͕͋ Δ • ެࣜυΩϡϝϯτͰ͸ɺv1Λϝδϟʔόʔ δϣϯ͕͓͢͢Ί͞Ε͍ͯΔ

    • ϝδϟʔόʔδϣϯ͸ɺޓ׵ੑΛอ্ͬͨ Ͱɺόάमਖ਼΍ػೳ௥Ճ΍ηΩϡϦςΟम ਖ਼Λར༻Ͱ͖Δ (JUIVC"DUJPOTͷόʔδϣ χϯά
  23. ࡞Δଆͱ࢖͏ଆͷ஫ҙ఺ 

  24.  • ϝδϟʔόʔδϣϯ͕v1ͱͳΔΑ͏ʹ͢Δ • ϚΠφʔόʔδϣϯͳͲΛ࡞ΔͱɺλάΛ ෇͚ସ͑Δඞཁ͕͋Δ • https://github.com/nowactions/update- majorver Λ࢖͏ͱࣗಈͰϝδϟʔόʔ

    δϣϯΛߋ৽ͯ͘͠ΕΔ (JUIVC"DUJPOTΛ࡞Δଆ
  25.  • .github/workflows/ ҎԼʹԼهΛ࡞੒͢Δ VQEBUFNBKPSWFSͷ࢖͍ํ

  26.  • ϝδϟʔόʔδϣϯ v1ͱϚΠφʔόʔδϣ ϯv1.x.x͕ඥ͍͍ͮͯΔ͜ͱΛ֬ೝ͢Δ (JUIVC"DUJPOTΛ࢖͏ଆ

  27. ·ͱΊ 

  28.  • ݱঢ়ͷίωώτͷ݈શੑʹ͍ͭͯ঺հ͠ ͨ • PRʹؔ͢Δࢦඪ͕ଟ͔ͬͨͷͰɺGithub ActionsΛ࢖ͬͯҰ෦վળͨ͠ • Github ActionsΛར༻ɺ࡞੒͢Δͱ͖͸

    όʔδϣχϯάΛҙࣝ͠Α͏ ·ͱΊ
  29.  • ࣗ࡞Github ActionsΛެ։͢Δͱ͖ͷλά ෇͚ • https://qiita.com/yanamura/items/ a9c112f0fc2ae7ce27ac • Team

    ͷεέδϡʔϧ͞ΕͨϦϚΠϯμʔ Λ؅ཧ͢Δ • https://docs.github.com/ja/github/setting- up-and-managing-organizations-and- teams/managing-scheduled-reminders- for-your-team ࢀߟจݙ
  30. ͝ਗ਼ௌ͋Γ͕ͱ͏͍͟͝·͢