Skip to main content

PR Lifecycle

A well-structured PR process ensures that changes are tracked, reviewed efficiently, and merged smoothly into the codebase. This document outlines the steps to follow when raising a PR in the frontend repository.

The following outlines the key stages of the PR lifecycle:

  1. Raise a ticket

    • All code changes must have an associated Jira ticket. The ticket ID will look similar to ENG-0000.
    • If a ticket does not already exist, either create one or work with Product to have one created.
    • Set the Assignee of the ticket to yourself to avoid others accidentally picking it up.
  2. Create a new branch

    • Changes should be made in a separate branch based on main.
    • Name the branch using the format: [Jira-ticket-id]-[ticket-title-summary].
      • Example: If your ticket is ENG-0000 with the title Remove all comments, your branch name could be ENG-0000-remove-all-comments.
      • The ID is required, while the summary is left to your judgment.
  3. Make the code changes

    • Implement the required changes as described in the Jira ticket.
    • If the scope becomes too large, consider breaking the ticket into smaller parts to keep PRs manageable.
  4. Add and Run e2e tests

    • If your changes affect the UI or introduce new functionality, add corresponding tests.
    • Run yarn workspace web e2e to confirm that no existing tests are broken.
    • If any tests fail, rerun them individually to rule out flaky tests. Investigate persistent failures.
  5. Open a new PR

    • Ensure all code is committed and pushed to your branch.
    • Open a new PR in GitHub.
    • Rebase your branch with main before raising the PR to simplify merging.
    • Review the PR details:
      • Confirm the PR title follows the correct format.
      • Provide a clear description including:
        • A summary of the changes introduced.
        • Relevant labels (Bug Fix / Feature / Enhancement, etc.).
        • Any relevant screenshots.
        • Clear testing steps.
  6. Have it reviewed

    • Post a message in #engineering-frontend or #engineering-general on Slack to notify the team that the PR is ready for review.
  7. Merge into main

    • A PR can be merged when:
      • It has been reviewed and approved.
      • All actions/tests have passed.
      • It is up to date with main.
    • The branch should be automatically deleted after merging.