GitHub 初心者向け:OSS コントリビュート入門ガイド
GitHub Blog は、初心者向けにオープンソースソフトウェア(OSS)への貢献方法を解説し、特に GitHub Copilot Chat を活用して「good first issue」ラベル付きのプロジェクトを効率的に見つける具体的な手順を紹介している。
キーポイント
オープンソースの基本概念と価値
OSS はソースコードが公開され、誰でも利用・構築可能なソフトウェアであり、大規模なプロジェクトへの参加を通じて開発者の成長を促す重要な手段である。
Copilot Chat を活用したプロジェクト探索
GitHub Copilot Chat の質問機能を使い、「TypeScript で初心者歓迎のプロジェクト」など具体的なプロンプトを入力することで、効率的に貢献先を絞り込む手法が紹介されている。
「good first issue」ラベルの活用
リポジトリ内の Issues タブから「good first issue」ラベルを選択することで、初心者向けの課題をフィルタリングし、貢献の第一歩として適切なタスクを見つけることができる。
コントリビューターガイドの確認
実際に作業を開始する前に、プロジェクトのリポジトリにあるコントリビューターガイド(貢献者向けガイド)を必ず読み、ルールや手順を理解することが推奨されている。
貢献に適したプロジェクトの見極め基準
README、コントリビューターガイド、ライセンス、100 以上のスター、活発な開発状況、および「good first issue」ラベルがあるかを確認することが重要です。
フォークとプルリクエストの作成フロー
プロジェクトをフォークしてローカルで変更を加え、新しいブランチを作成した上でプルリクエストを提案することで、本家プロジェクトへの貢献を行います。
フォーク間の比較設定
プルリクエスト作成ウィンドウの上部で「compare across forks」を選択することで、自分のフォークの変更点を元のリポジトリと比較表示できます。
影響分析・編集コメントを表示
影響分析
この記事は、AI ツール(Copilot)とオープンソース文化を結びつける具体的なワークフローを提供することで、新規開発者の参入障壁を大幅に下げる効果があります。特に、人手による検索から AI 支援型探索へのシフトを示しており、OSS エコシステムの活性化と人材育成における AI の役割を明確に定義しています。
編集コメント
AI ツールが単なるコード補完を超え、開発者のキャリア形成やコミュニティ参加を支援する「ナビゲーター」として機能する事例として注目すべき記事です。
GitHub for Beginners にようこそ。これまでに、GitHub Issues と Projects、GitHub Actions、セキュリティ、GitHub Pages、そして Markdown について議論してきました。今回はオープンソースソフトウェアと、そのコミュニティへの貢献方法についてお話しします。この記事を読み終える頃には、オープンソースとは何か、作業に適したプロジェクトを見つける方法、オープンソースリポジトリの読み方、そして最初の貢献を開始する方法がわかるようになります。では、始めましょう!
いつも通り、動画をご覧になりたい場合や参照したい場合は、YouTube で「GitHub for Beginners」のエピソードをすべてご覧いただけます。
オープンソースとは何か?
オープンソースソフトウェア(OSS)は、ソースコードが自由に利用可能であることを特徴とするソフトウェアを指します。「クローズドソースソフトウェア」と対照的に、OSS は誰でも使用し、それを基に構築することができるよう公に公開されています。つまり、コードベースやユーザー間のコミュニケーションを含むすべての作業が、誰もが閲覧できる状態にあります。
ソフトウェア開発の世界でまだ初心者の方にとって、オープンソースプロジェクトの閲覧や貢献は、世界中の無数のユーザーによって利用されている大規模で影響力のあるプロジェクトに触れる絶好の方法です。
GitHub はオープンソースソフトウェアの本拠地ですので、貢献できるプロジェクトを見つける方法を見ていきましょう。
オープンソースソフトウェアプロジェクトに初めて貢献するのは、誰もが経験するほど daunting(恐ろしい)ことかもしれません!最初のステップは、自分が知っている言語で新規コントリビューターを受け入れているプロジェクトを探すことです。これを行う一つの方法として、GitHub Copilot Chat に助けを求めることができます。
github.com にアクセスし、Copilot アイコンを選択してチャットウィンドウを開きます。
チャットウィンドウの左下隅にあるコンボボックスを使用して、「Ask(質問)」を選択します。
以下のようなプロンプトを入力してください。ただし、自分が慣れている言語に合わせて内容を更新することを忘れないでください。
TypeScript で書かれており、新規コントリビューターを受け入れているオープンソースプロジェクトの一覧を探しています。GitHub を検索し、「good first issue(初心者向け)」ラベルを使用しており、かつ GitHub 上でスターが 100 件以上のリポジトリに絞り込んでください。
Copilot が検索を実行し、「good first issue」ラベルでフィルタリングされた、探索可能なプロジェクトの一覧を返します。このラベルは、その課題が初心者にも親しみやすく、新規コントリビューターにとって最適な出発点であることを示しています。このラベルは、取り組むことができるプロジェクト内の課題を見つけるための素晴らしい方法です。
例えば、vscode リポジトリに貢献したいとしましょう。
vscode リポジトリへ移動します。
リポジトリの上部にある「Issues(課題)」タブを選択します。
「Issues」ページで、「Labels(ラベル)」ボックスをクリックしてドロップダウンメニューを開きます。
ドロップダウンメニュー内のテキストボックスに「good」と入力し始めると、「good first issue」のオプションが表示されます。
「good first issue」ラベルを選択します。
ウィンドウが更新され、取り組むべき「good first issues」のリストが表示されます。ただし、すぐに着手する前に、プロジェクトのリポジトリにあるコントリビューターガイドを読む必要があります。適切に維持されているオープンソースプロジェクトのほとんどには、必ずこのガイドが存在します。
オープンソースプロジェクトの理解
先ほど触れた通り、適切に維持されているオープンソースプロジェクトにはいくつか共通点があります。具体的には以下の項目です:
インストール手順が記載された文書化された README ファイル。
貢献方法について説明するコントリビューターガイド(Contributor's Guide)。
誰もがプロジェクトを自由に使用できることを示すオープンソースライセンス。
コミュニティで利用されていることを示す GitHub スター数が少なくとも 100 以上。
活発な開発が行われており、ソースコードのメンテナーがあなたの貢献をレビューできること。
新規コントリビューターを受け入れていることを示す「good first issue」ラベル。
貢献するプロジェクトを探す際、リポジトリで確認すべき点はこれらです。
優れたオープンソースプロジェクトを見つけるための詳細なドキュメントについては、gh.io/gfb-oss を訪れて、「good first issues」の探し方についてさらに学びましょう。
OSS への貢献を行う
では、実際のプロジェクトを見て、最初の issue を提出する方法を一緒に確認していきましょう。今回のデモでは「gitfolio」リポジトリをご覧ください。先ほどの箇条書き項目に基づき、これが取り組むのに適したプロジェクトかどうかを確認します。
このプロジェクトには文書化された README ファイルが用意されています。
また、コントリビューターガイド(CONTRIBUTING.md)も存在しています。
オープンソースライセンスを確認できます:LICENSE。
スター数が数千あり、100 というベンチマークを大きく上回っています。
ファイルリストの上部には、最も最近の実行結果が表示されており、これは比較的新しいものです。この文章を書いている時点では、最終実行は昨日のものであり、プロジェクトが積極的にメンテナンスされていることを示しています。
これらの点を踏まえると、TypeScript に慣れている方であれば、貢献に適したリポジトリと言えます。ただし、デモの続きを追うために TypeScript の知識が必要というわけではありません。
次に、リポジトリのフォークを作成します。フォークとは、オリジナルプロジェクトに影響を与えることなく自由に実験や変更を加えられるためのリポジトリのコピーです。オープンソースへの貢献には通常、このフォークが利用されます。リポジトリのフォーク方法について復習したい場合は、以前の「GitHub for Beginners」ブログ記事をご覧ください。
まだ移動していない場合は、プロジェクトのホームページへ移動してください。
プロジェクトページの上部にある「Fork」ボタンをクリックします。
新しいウィンドウでは、所有者を自分のアカウントのままにし、「Repository name」(リポジトリ名)がオリジナルのリポジトリと同じ(つまり"gitfolio")であることを確認してください。
ウィンドウの下部で「Create fork」を選択します。
フォークされたコピーのリポジトリ内で、ファイルリストから README.md をクリックします。
テキストを追加してファイルを変更します。
右上隅にある「Commit changes…」を選択します。
下部のオプションで、「このコミットから新しいブランチを作成し、プルリクエストを開始する」が選択されていることを確認してください。
「Propose changes」を選択します。
次のウィンドウで、[Create pull request] ボタンをクリックしてください。これにより、変更を加えたブランチからメインリポジトリに対してプルリクエストを作成できます。
「Open a pull request」ウィンドウの上部で、「compare across forks」を選択します。これにより、フォークされたリポジトリの変更点が元のリポジトリと比較して表示されます。
もし実際にリポジトリへ変更を提出するのではなく、デモの手順を踏んでいるだけの場合は、ここでプルリクエストにタイトルと説明を追加します。また、解決しようとしていた課題へのリンクを、プルリクエストの説明に記載することも望ましいでしょう。
この時点で、ウィンドウ下部のボタンをクリックしてプルリクエストを提出する準備が整います。ただし、一度それをクリックすると、それはもはやフォーク内の変更だけでなく、元のリポジトリに対する更新要求となります。そのため、上記の手順には含まれていません。実際にプルリクエストを提出すると、メンテナがレビューし、 hopefully 承認できるようになります。
承認されマージされると、GitHub は自動的にフォークされたリポジトリから変更を適用し、コードベースの公式な真実源である元のリポジトリのメインブランチに反映されます。
次に何をするか?
おめでとうございます!オープンソースソフトウェアへの貢献を行う方法を学びました。これがあなたのお気に入りのプロジェクトへの貢献へのインスピレーションになれば幸いです。
さらに詳しい情報をお探しの場合、役立つドキュメントが多数あります。以下にいくつかのリンクを記載します:
GitHub でオープンソースに貢献する方法を見つける
オープンソースプロジェクトへの貢献
フォークを通じてプロジェクトへの貢献
Happy coding!
この投稿「GitHub for Beginners: Getting started with OSS contributions」は、The GitHub Blog に最初に掲載されました。
原文を表示
Welcome back to GitHub for Beginners. So far, we’ve discussed GitHub Issues and Projects, GitHub Actions, security, GitHub Pages, and Markdown. This time we’re going to talk about open source software and how to contribute to that community. By the end of this post, you’ll know what open source is, how to find projects to work on, how to read an open source repository, as well as start making your first contributions. So let’s get started!
As always, if you prefer to watch the video or want to reference it, we have all of our GitHub for Beginners episodes available on YouTube.
What is open source?
Open source software (OSS) refers to software that features freely available source code. In contrast with “closed source software,” OSS is publicly available for anyone to use and build upon. This means that all of the work, including the codebase and communication between users, is available for everyone to see.
If you’re just getting started in the world of software development, browsing and contributing to open source projects is a great way to dip your toes into large, impactful projects used by countless users worldwide.
GitHub is the home for open source software, so let’s look at how to find projects you can contribute to.
How to find OSS projects to work on
Contributing to an open source software project for the first time can be daunting—we’ve all been there! The first step is to look for projects in a language that you know which are accepting new contributors. One of the ways you can do this is to ask GitHub Copilot Chat for help.
Navigate to github.com and select the Copilot icon to open a chat window.
In the bottom-left corner of the chat window, use the combo box to select Ask.
Enter a prompt like the following, but remember to update it for a language you’re comfortable with.
I’m looking for a list of open source projects written in TypeScript that are accepting new contributors. Search GitHub and narrow down the list to repositories that use the good first issue label and have over 100 stars on GitHub.
Copilot will do some searching and return a list of projects you can explore filtered by the good first issue label. This label indicates that an issue is beginner friendly, and a great starting point for new contributors. This label is a great way to find issues in a project you can work on.
For example, let’s say that you wanted to contribute to the vscode repository.
Navigate to the vscode repository.
At the top of the repository, select the Issues tab.
On the Issues page, click the Labels box to open the drop down menu.
In the text box on the drop down menu, start typing “good” until you see the option for good first issue.
Select the good first issue label.
The window will update and display a list of good first issues for you to work on. But before jumping in, you should read the contributor’s guide in the project’s repository. Most well-maintained open source projects will have one.
Understanding an open source project
As we just alluded to, most open source projects have a few things in common if they’re well maintained. These are the following items:
A well-documented README with installation instructions.
A contributor’s guide that explains how to contribute.
An open source license, so everyone knows the project is free to use.
At least 100 GitHub stars to show it’s used in the community.
Active development so that you know a maintainer of the source code will be able to review your contributions.
A good first issue label to indicate its open to new contributors.
When you’re looking for a project to contribute to, these are the things you should be looking for in a repository.
For more documentation on finding a good open source project, go to gh.io/gfb-oss to learn more about finding good first issues.
Making an OSS contribution
Now let’s look at an actual project and work on how you would submit your first issue. For this demo, take a look at the gitfolio repository. Using the bullet points above, we want to see if this would be a good project to work on.
The project does have a well-documented README file.
The project has a contributor’s guide: CONTRIBUTING.md.
You can see the open source license: LICENSE.
It has several thousands of stars, so well over our 100 benchmark.
At the top of the file list, you can see the most recent check in which should be fairly recent. While writing this, the last check in was yesterday, indicating the project is being actively maintained.
Based on these points, as long as you are familiar with TypeScript, this is a good repository to contribute to. However, you don’t need to be familiar with TypeScript to continue following along in the demo.
Now you want to create a fork of the repository. A fork is a copy of the repository that we can freely experiment on and make changes in without affecting the original project. We usually use forks for open source contributions. If you need a refresher on forking a repository, check out this previous GitHub for Beginners blog.
Navigate to the home page of the project if you are not already there.
At the top of the project, click the Fork button.
In the new window, leave yourself as the owner and make sure the “Repository name” is the same as the original repository (i.e., “gitfolio”).
At the bottom of the window, select Create fork.
In your forked copy of the repository, click README.md in the list of files.
Change the file by adding some text.
In the top-right, select Commit changes…
Make sure to select the option at the bottom for Create a new branch from this commit and start a pull request.
Select Propose changes.
On the following window, click the Create pull request button. This will let you create a pull request to the main repository from your branch with the changes.
At the top of the “Open a pull request” window, select compare across forks. This will show your fork’s changes compared to the original repository.
If you were submitting an actual change to the repository—not just walking through a demo—this is where you would give your pull request a title and a description. You’d also want to provide a link to the issue that you were solving in the description of the pull request.
At this point, you’d be ready to submit your pull request by clicking the button at the bottom of the window. However, once you do that, it no longer becomes just a change in your fork and will be a requested update on the original repository. That’s why it isn’t included in the steps above. When you do submit your pull request, it will be available and ready for a maintainer to review and, hopefully, approve!
Once approved and merged, GitHub automatically applies the changes from your fork into the main branch of the original repository, the official source of truth for the codebase.
What’s next?
Congratulations! You’ve learned how to make your own contributions to open source software. I hope it inspires you to contribute to your favorite projects.
And if you’re looking for more information, we have lots of documentation that can help. Here are a few links to get you stated:
Finding ways to contribute to open source on GitHub
Contributing to open source projects
Contributing to a project through forking
Happy coding!
The post GitHub for Beginners: Getting started with OSS contributions appeared first on The GitHub Blog.
関連記事
今日のまとめ
AI日報で今日の重要ニュースをまとめ読み