|
22 | 22 | - [**Part 4: How to create pull requests**](#part-4-how-to-create-pull-requests)
|
23 | 23 | - [**4.1 Push changes to your forked repository**](#41-push-changes-to-your-forked-repository)
|
24 | 24 | - [**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) |
25 | 26 |
|
26 | 27 | ## **Part 1 : How to join the team**
|
27 | 28 |
|
@@ -183,7 +184,7 @@ Developers may choose from issues with the following `role` labels:
|
183 | 184 | - `role: Back End`
|
184 | 185 | - `role: Database`
|
185 | 186 | - `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` |
187 | 188 |
|
188 | 189 | Claiming an issue is a two step process:
|
189 | 190 |
|
@@ -243,3 +244,69 @@ git commit -m "your commit message"
|
243 | 244 | 5. Include before & after images with your pull request if there are visual changes to the user interface
|
244 | 245 | 6. Request a review from another developer on the team
|
245 | 246 | 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