Upgrade to Pro
— share decks privately, control downloads, hide ads and more …
Speaker Deck
Features
Speaker Deck
PRO
Sign in
Sign up for free
Search
Search
OSS貢献を気軽にしたい Let's Go Talk #1
Search
aboy
July 06, 2022
Programming
650
2
Share
OSS貢献を気軽にしたい Let's Go Talk #1
Let's Go Talk #1でのLT資料です
aboy
July 06, 2022
More Decks by aboy
See All by aboy
生成AIで日々のエラー調査を進めたい
yuyaabo
0
990
みんなでエラー監視するSRE夕会の効果_ゆるSRE勉強会1
yuyaabo
1
720
Go 1.19.1 security fix net/url JoinPath
yuyaabo
1
550
HTTPステータスコードが意図した値にならないとき Let's Go Talk #2
yuyaabo
1
550
困ったときが学びどき.pdf
yuyaabo
0
650
Build dynamic iOS apps with the Create ML framework の要約
yuyaabo
0
1.2k
fastlaneベースでTravis CIからBitriseに移行しました
yuyaabo
0
1.8k
Mixpanelのすゝめ
yuyaabo
0
3k
Use model deployment and security with Core MLの要約
yuyaabo
2
610
Other Decks in Programming
See All in Programming
存在論的プログラミング: 時間と存在を記述する
koriym
5
770
ローカルで稼働するAI エージェントを超えて / beyond-local-ai-agents
gawa
1
240
Geminiをパートナーに神社DXシステムを個人開発した話(いなめぐDX 開発振り返り)
fujiba
0
140
野球解説AI Agentを開発してみた - 2026/02/27 LayerX社内LT会資料
shinyorke
PRO
0
390
Kubernetesでセルフホストが簡単なNewSQLを求めて / Seeking a NewSQL Database That's Simple to Self-Host on Kubernetes
nnaka2992
0
200
Go_College_最終発表資料__外部公開用_.pdf
xe_pc23
0
120
Strategy for Finding a Problem for OSS: With Real Examples
kibitan
0
130
2026-03-27 #terminalnight 変数展開とコマンド展開でターミナル作業をスマートにする方法
masasuzu
0
290
安いハードウェアでVulkan
fadis
1
890
forteeの改修から振り返るPHPerKaigi 2026
muno92
PRO
3
210
[PHPerKaigi 2026]PHPerKaigi2025の企画CodeGolfが最高すぎて社内で内製して半年運営して得た内製と運営の知見
ikezoemakoto
0
320
Coding as Prompting Since 2025
ragingwind
0
680
Featured
See All Featured
Code Review Best Practice
trishagee
74
20k
More Than Pixels: Becoming A User Experience Designer
marktimemedia
3
370
Everyday Curiosity
cassininazir
0
190
JAMstack: Web Apps at Ludicrous Speed - All Things Open 2022
reverentgeek
1
410
Groundhog Day: Seeking Process in Gaming for Health
codingconduct
0
140
The Psychology of Web Performance [Beyond Tellerrand 2023]
tammyeverts
49
3.4k
Fantastic passwords and where to find them - at NoRuKo
philnash
52
3.6k
We Analyzed 250 Million AI Search Results: Here's What I Found
joshbly
1
1.1k
Ruling the World: When Life Gets Gamed
codingconduct
0
190
Navigating the moral maze — ethical principles for Al-driven product design
skipperchong
2
320
Applied NLP in the Age of Generative AI
inesmontani
PRO
4
2.2k
Agile Actions for Facilitating Distributed Teams - ADO2019
mkilby
0
170
Transcript
OSS貢献を気軽にしたい 2022/07/06 Let’s Go Talk #1 5分LT
自己紹介 - aboyです - コネヒト株式会社 - 最近はママリの検索を最高にする仕事をしてます - あと最近GoをさわっていてTech VisionのGo戦略を推進中
モチベーション - 普段お世話になっているOSSに貢献したい - Goさわりたてなので簡単なことから始めたい
Go Report Cardっていうのがあるぞ - https://goreportcard.com/ - Go製プロジェクトのREADMEによくあるこのバッヂ - 指定したプロジェクトに静的解析をかけてスコア化してくれる
Go Report Cardを使ってOSS貢献を始める - gocycloとlicense以外は、どう修正したらいいかがわかりやすい - Go初学者でもPRを送りやすい - misspellだって、あってもいいことは何も無いので、立派な貢献 -
少なくとも見つけたらそのままにしない gorilla/schemaのmisspellの例
👏 ※ gorillaのメンテナ事情(切実)https://github.com/gorilla/mux/issues/659
他の人の背中も押したいぞ - OSS貢献したいけど、ハードルや面倒さを感じてる人の背中を押したい - 入口がmisspellの修正でも、成功体験からさらにGoに興味を持ってくれると嬉しい - 自分たちがお世話になっているOSSへ貢献するという行動を当たり前にできると嬉しい - 仕組み化したい -
ある程度は仕組み化して自動化や横展開できると嬉しい
ツールをつくった(ってる) - https://github.com/YuyaAbo/gontribute - Go Report CardはCLIが提供されてる - https://github.com/gojp/goreportcard/tree/master/cmd/goreportcard-cli -
自分たちのプロジェクトのgo.modに書かれているrequireに対してCLIを適用 すればやりたいことできそう
デモ
実装 1. GitHub APIをつかって指定リポジトリのgo.modを取得する 2. go.modをパースする(後述) 3. requireに対してGitHub APIをつかってアーカイブリンクを取得する 4.
アーカイブリンクからzipをダウンロードする 5. zipを展開 6. 展開先のディレクトリでGo Report Card CLIを実行 7. 展開したディレクトリを削除 8. 3~7を繰り返す
go.modのパース - 準標準パッケージmod/modfileで可能 - https://pkg.go.dev/golang.org/x/mod/modfile fc, _, _, err :=
client.Repositories.GetContents(ctx, owner, repo, "go.mod", nil) if err != nil { log.Fatalln(err) } s, err := fc.GetContent() if err != nil { log.Fatalln(err) } f, err := modfile.Parse("go.mod", []byte(s), nil) if err != nil { log.Fatalln(err) }
あとは愚直オブ愚直 - exec.Commandでコマンド実行 - ↓こんな感じ b, err := exec.Command("zipinfo", "-1",
zipFileName).Output() if err != nil { log.Println(err) return } dirName := strings.Split(string(b), "/")[0] if err = exec.Command("unzip", "-o", zipFileName).Run(); err != nil { log.Println(err) return }
まとめ - 自分たちが使っているOSSに気軽に貢献したい、する人を増やしたい - Go Report Cardを使えば比較的簡単な貢献チャンスに気づける - Go Report
Card CLIを使って仕組み化するようなツールを作ってみた - 引き続きいい感じに作っていくぞ!
fin