Skip to content

Commit 59e346b

Browse files
authored
Merge pull request #1957 from trillium/add-git-pr-to-contributing
Add git pr to contributing
2 parents 7ff04f5 + 5f18896 commit 59e346b

File tree

1 file changed

+68
-1
lines changed

1 file changed

+68
-1
lines changed

CONTRIBUTING.md

Lines changed: 68 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@
2222
- [**Part 4: How to create pull requests**](#part-4-how-to-create-pull-requests)
2323
- [**4.1 Push changes to your forked repository**](#41-push-changes-to-your-forked-repository)
2424
- [**4.2 Create a pull request on the VRMS repository**](#42-create-a-pull-request-on-the-vrms-repository)
25+
- [**Part 5: How to review pull requests**](#part-5-how-to-review-pull-requests)
2526

2627
## **Part 1 : How to join the team**
2728

@@ -183,7 +184,7 @@ Developers may choose from issues with the following `role` labels:
183184
- `role: Back End`
184185
- `role: Database`
185186
- `role: devops`
186-
- *_Lead developers may choose from the above labels, as well as issues with the label:_ `role: Dev Lead`
187+
- _Lead developers may choose from the above labels, as well as issues with the label:_ `role: Dev Lead`
187188

188189
Claiming an issue is a two step process:
189190

@@ -243,3 +244,69 @@ git commit -m "your commit message"
243244
5. Include before & after images with your pull request if there are visual changes to the user interface
244245
6. Request a review from another developer on the team
245246
7. Review another developers pull request while you are waiting for your pull request to be reviewed
247+
248+
## **Part 5: How to review pull requests**
249+
250+
Reviewing pull requests is an important part of maintaining code quality and helping team members improve their contributions. Here’s how to review a pull request on the VRMS repository:
251+
252+
1. **Navigate to the Pull Requests tab**
253+
Go to the [Pull Requests](https://github.com/hackforla/VRMS/pulls) section of the repository to see open pull requests.
254+
255+
2. **Select a pull request to review**
256+
Choose a pull request that is ready for review (look for those assigned to you or marked as "Ready for review").
257+
258+
3. **Read the pull request description**
259+
Review the summary, linked issue(s), and any screenshots or documentation provided by the author.
260+
261+
4. **Check the code changes**
262+
263+
- Click on the "Files changed" tab to see the code diff.
264+
- Look for code quality, readability, and adherence to project conventions.
265+
- Ensure the code addresses the issue and does not introduce bugs.
266+
267+
5. **Run the code locally (optional but recommended)**
268+
269+
- Pull the branch to your local machine.
270+
- Follow the setup instructions to test the changes.
271+
- Run tests to verify nothing is broken.
272+
273+
6. **Leave feedback**
274+
275+
- Use GitHub’s review tools to comment on specific lines or leave general feedback.
276+
- Be constructive and respectful in your comments.
277+
278+
7. **Approve or request changes**
279+
280+
- If the pull request is ready, click "Approve".
281+
- If changes are needed, click "Request changes" and specify what needs to be addressed.
282+
283+
8. **Merge the pull request (if authorized)**
284+
- If you have permission and the pull request meets all requirements, you may merge it.
285+
- Otherwise, notify the author or a maintainer that it is ready to merge.
286+
287+
**Tip:** You can use the following helpful git alias to quickly check out a pull request locally:
288+
289+
```sh
290+
# This git alias allows you to quickly check out a pull request by its number.
291+
# eg "git pr 1820 vrms"
292+
git config alias.pr '!f() { \
293+
# If no arguments are provided, print usage instructions
294+
if [ $# -lt 1 ]; then \
295+
echo "Usage: git pr <id> [<remote>] # assuming <remote>[=origin] is on GitHub"; \
296+
echo " eg: git pr 1340 upstream"; \
297+
else \
298+
# Save current HEAD (optional, for safety)
299+
git checkout -q "$(git rev-parse --verify HEAD)" && \
300+
# Fetch the pull request from the specified remote (default: origin) into a local branch
301+
git fetch -fv "${2:-origin}" pull/"$1"/head:pr/"$1" && \
302+
# Check out the fetched PR branch
303+
git checkout pr/"$1"; \
304+
fi; \
305+
}; f'
306+
```
307+
308+
This allows you to run `git pr <PR_NUMBER>` to fetch and check out a pull request by its number. For example: `git pr 1234 upstream`.
309+
310+
**Resources:**
311+
312+
- [GitHub: Reviewing proposed changes in a pull request](https://docs.github.com/en/github/collaborating-with-pull-requests/reviewing-changes-in-pull-requests)

0 commit comments

Comments
 (0)