DEV Community

A Guide for Contributing to Any Open Source JavaScript Project Ever ๐Ÿ’›

Saurabh Daware ๐ŸŒป on July 04, 2020

Lately, I had people asking how can they contribute to open-source projects when the codebase is large, or issues are taken, or good first issues s...
Collapse
 
mykalcodes profile image
Mykal

Great post, Saurabh!
I've recently started contributing to OS more frequently and have found a few really friendly repos. My favourite being blitz! a fullstack react framework that aims to be rails for react

If you're familiar with react, next.js, and full-stack concepts, and looking for a super friendly place to start contributing to OS check it out! the whole team is super welcoming and has tonnes of good-first-issue's!

Collapse
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป

This is amazing! Thanks for sharing :D

Collapse
 
veselinastaneva profile image
Vesi Staneva

Thank you very much for sharing this awesome post! Contributing to open-sourced projects really is the way to go and I absolutely share your ideas. :)

My team just completed an open-sourced Content Moderation Service built with Node.js, TensorFlowJS, and ReactJS that we have been working over the past weeks. We have now released the first part of a series of three tutorials - How to create an NSFW Image Classification REST API and we would love to hear your feedback(no ML experience needed to get it working). Any comments & suggestions are more than welcome. Thanks in advance!
(Fork it on GitHub or click๐ŸŒŸstar to support us and stay connected๐Ÿ™Œ)

Collapse
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป

that looks great! I will give it a read. thank you for sharing!

Collapse
 
avelino profile image
Thiago Avelino

One thing many engineers forget when contributing projects (mainly open source) is that behind the project we have people.

We don't know the people who are on the other side (project maintainers), generating the need for communication to be clear, and we don't assume that other people have the same knowledge as us (nobody knows what we have inside our head), even some concepts being obvious I made clear in communication (issue, pull request and so on). Finally, I have no attachment to code - code is a means to get to the solution of a problem.

When we are on the project maintainer's side: consider each (every) contribution as the person's best possible contribution, the contributor has left his or her tasks to contribute to a project that is not his or her own, try to understand why the person had an affinity to the project - this will help him or her to create a community (he or she will help you maintain the project)

good contribution friends, I'm passionate about Open Source project \o/

Collapse
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป

Yes yes totally agree!

Collapse
 
hinasoftwareengineer profile image
Hina-softwareEngineer

Thanks, Saurabh for the valuable knowledge. I want to know about code reviews. I don't know how to do code reviews in Github?

Collapse
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป

Thank you and yes that's a great question, I'll try to write the steps here:

  1. In Pull Request, you would see a File Changes tab where you can see diff of the changes made by the PR.
  2. Then in the top right corner, you would see Review Changes button, which has three options. Comment (for casual comments), Approve (to approve the PR), Request Changes (to request any changes from the author of the PR).
  3. The comment, and approve would be straightforward, you can just type a message and approve a PR or write comment.
  4. But in case of requesting changes, you may sometimes have to point out where you want the changes to be.

Process of Requesting Changes:

  1. You would see a + sign left to every line of code in the changes Screenshot that shows a plus sign on the left of code line You can click that plus button to comment on one line or drag it to select multiple lines
  2. Then you will get a box of comment, where you can mention what change you think the author can do, A screenshot of comment box with Add Comment and Start Review buttons If you casually want to add a comment without submitting a proper review, you can click "Add Comment" but most probably you would want to "Start Review"
  3. Similarly, you can add multiple comments to code and click Start Review
  4. When you're done mentioning changes, In "Review Changes" button in the top right corner, select Request changes and put a general comment mentioning that you've requested changes below Screenshot from GitHub that shows a comment and requested changes option selected
  5. And Submit Review.

Finally, your requested changes will be rendered as
Rendererd output in the conversation tab of PR that shows all the mentioned changes in a list

Thank you and let me know if you have any other questions

Collapse
 
hinasoftwareengineer profile image
Hina-softwareEngineer • Edited

Got it finally, what are code reviews and how to do it, ๐Ÿ˜ƒ ๐Ÿ˜ƒ . Thanks for writing a long comment. I have a question that Is code review only done by repository owner/contributor? or like someone else can do code review in someone's repository. Like If I want to do code review in someone's repo and I have not made any pull request or i am not a contributor to that repo. Then can I do code review?

Thread Thread
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป

Yes you can do that as well. In the PR conversation it will be marked with a grey check mark and the owner's review will be marked with a green check mark.

Thread Thread
 
hinasoftwareengineer profile image
Hina-softwareEngineer

That's great. Thank you

Collapse
 
maxdevjs profile image
maxdevjs

These comments could very well become a standalone article :)

Collapse
 
thebuildguy profile image
Tulsi Prasad

This really is an essential part of oss contribution! I was always afraid of this part in the beginning and probably a lot more I have to know too! This could be a part of the original post as well.

Collapse
 
prafulla-codes profile image
Prafulla Raichurkar

True, I remember contributing to your DEV Widget on a small bug like converting the username to lower cases

Collapse
 
saurabhdaware profile image
Saurabh Daware ๐ŸŒป

yes yes thank you so much and it was a big bug so that contribution was super helpful! thank you so much

Collapse
 
madev7 profile image
Moyomade

Awesome Saurabh!
I've been finding it hard to find issues to contribute to, this will definitely be of help.
Thanks!