loading...

re: A Guide for Contributing to Any Open Source JavaScript Project Ever 💛 VIEW POST

TOP OF THREAD FULL DISCUSSION
re: Thanks, Saurabh for the valuable knowledge. I want to know about code reviews. I don't know how to do code reviews in Github?
 

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

 

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?

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.

 

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.

 

These comments could very well become a standalone article :)

code of conduct - report abuse