How to participate in the construction of open source projects on Github

I am participating in the "Nuggets · Sail Program"

foreword

The rapid development of today's programming world cannot be separated from the thriving development of open source projects. As a well-known open source project code community, Github plays a pivotal role in the open source community. This article will help you understand how to participate in the construction of open source on Github.

Participate in open source

For most people, the use of open source projects is already commonplace, whether it is a database or ide, a third-party library or a connection tool may be a member of an open source project. But many people just use it. In fact, open source projects need everyone's help to thrive.

Many people think that only by submitting code and doing PR to merge code can be considered as a contribution to open source projects. In fact, this is not correct. There are other solutions that can also contribute to open source projects.

Discussions

DiscussionsIt is a discussion area for Github open source projects. Developers can ask questions and various topics in the discussion area, and can participate in discussions.

discussion.png

DiscussionsThere will be managers of open source projects to manage. Developers can raise various usage problems and put forward new ideas, design ideas, etc., which is a relatively open forum-like module. Using your own understanding of the current open source project to answer questions can make more newcomers who are new to this project join more quickly.

Issue

IssueIt is one of the important functions of Github. Developers can Issuepropose bugs, new features, etc. by creating, and they can also raise issues for discussion in the community.

issue1.png

The process proposed by each project Issuewill be slightly different. Here is open-telemetry/opentelemetry-java-instrumentationan example of the project:

issue2.png

Here, Issuethe template modification by the community is divided into three types, bug, feature and security vulnerability. After following the guide, you will find that the internal template is also preset:

issue3.png

Read the contents of the template carefully and fill it out accordingly.

IssueDiscussions实际上没有固定的边界,大部分情况下你既可以在Discussions提出问题也可以通过Issue提出问题。但是以我个人的理解,Issue会更加的正式,并且正规的开源项目会有人以专门的流程来处理提出的Issue,因此如果是一些bug类的问题建议还是提出Issue更好。

Issue分类标签

如果只是提出Issue的话没法更多的参与项目,但是想尝试去解决一些Issue往往又无从下手,该怎么办?

此处善用Issue的分类标签可以帮上大忙。为了管理Issue,往往社区人员会查看新提出的Issue之后会对其打上一定的标签。社区的新人可以关注如下的标签:good first issue

first.png 这个标签表示Issue适合新人来熟悉项目。有些大型的项目甚至还会有类似的good second issue等标签。用户善于使用标签筛选,找到这类Issue就能够帮助自己更好的成为开源项目的新人。

Pull Requests

Pull Requests一般简称为PR,是一种将自己改动代码推送合并到开源项目的手段。一般的开源项目都禁止直接在分支上进行推送,所有的代码改动都需要走PR的流程。

如何提出自己的第一个PR

此处样例使用的是开源项目open-telemetry/opentelemetry-java-instrumentation

  1. 首先需要从原开源项目fork一份到你自己的仓库,这样你自己仓库就会有一份最新的开源代码
  2. 之后你就可以将自己仓库的fork的那份代码clone到本地进行开发,推荐创建新的分支来进行开发
  3. 开发完成后将代码push上来,至此都是正常的开发流程
  4. 此处开始新建PR

pr.png

  1. 之后选定自己的开发项目开发分支,以及想要合并到的开源分支,然后选择创建PR

pr2.png

  1. When creating a PR, you need to fill in some comments. In order for the PR to be merged, it is recommended to describe in detail what you have done this time and what problems have been solved. It would be better PRif there is a specific connectionIssue

pr3.png

  1. After that, click create to complete PRthe creation. The follow-up is the review of the community managers and suggestions for modification, and then the follow-up is repeated modification and improvement, and then the code is merged.

Precautions for PR

Each open source project PRwill have different specifications, and the specific details are generally CONTRIBUTING.mddescribed in detail in the file, including coding specifications, protocol specifications of the library used, etc. Please PRread carefully before submitting to avoid violating the specifications after submission. was rejected.

Summarize

There are still many ways to play in the open source community. Here are just some of the simplest ways to participate in open source. If you want to participate in more in-depth meetings of various communities, SIGs of various communities, etc., you can try to explore by yourself , to explore the charm of the open source community.

おすすめ

転載: juejin.im/post/7229536038715179064
おすすめ