Skip to content

How to Create Pull Requests

Sydney Walcoff edited this page Feb 18, 2024 · 7 revisions

Introduction

Creating a Pull Request (PR) is an essential step in the development process, allowing you to propose your changes and collaborate effectively with your team. Here's a simplified and cohesive guide to creating a new PR in our repository

Table of Contents

What is a Pull Request

Because we don't want to allow just any code into our application, the Pull Request is where the developer will explain what changes were made and why they were made. A Pull Request, often just called a PR, is a request to pull your code changes into the larger code base. When a developer is working on code, they are working on a copy that exists only on their computer and doesn't affect the live site. That code is kept up to date so we are able to seamlessly integrate new code.

PRs are also a great place for developers to share knowledge and learn from one another. Since it is impossible to know everything, a new set of eyes may be able to improve the proposed solution.

What makes a good Pull Request

An effective PR will explain to a reviewer:

  • what the original issue was on the site
  • what the actual issue was in the code
  • what changes the developer
  • why they made those changes

PRs help us track and understand the thought process and the context of the app at the time the PR was made.

Creating a New Pull Request

Create Pull Request on GitHub:

  • Open Pull Requests Tab: Navigate to the 'Pull Requests' tab on your GitHub repository page.
  • Initiate New Pull Request: Click the "New pull request" button.
  • Set Base Branch: Ensure that the base branch is set to base:dev.
  • Set Compare Branch: Ensure that the compare branch is set to the local branch you created and are pushing the changes with.
  • Provide PR Details:
    • Title: Create a concise and meaningful title for your PR, use the issue number infront of your title like so: #411-fix footer this provides the reviewer with clear insight on what issue this PR is regarding.
    • Description: Add a detailed description of the changes. Explain why these changes are necessary and how they address the issue.

4. Post PR for Review:

  • Move Issue to 'Ready for Review': In our project board move the associated issue to the "Ready for Review" section.
  • Notify Team: Post in the #expunge-assist-dev channel with a link to your newly created PR.

5. Review and Merge:

  • Peer Review: Wait for at least one approval from your teammates. Address any feedback or changes requested.
  • Final Approval and Merge: After receiving the necessary approval(s), assign the PR to the Development Lead for final review and merging into the dev branch.

Remember, a well-documented PR eases the review process and fosters better collaboration. Ensure your changes are clear, and don't hesitate to provide extra context where necessary! Happy coding!