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:
-
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
Assigneeof the ticket to yourself to avoid others accidentally picking it up.
-
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.
- Example: If your ticket is ENG-0000 with the title Remove all comments, your branch name could be
- Changes should be made in a separate branch based on
-
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.
-
Add and Run e2e tests
- If your changes affect the UI or introduce new functionality, add corresponding tests.
- Run
yarn workspace web e2eto confirm that no existing tests are broken. - If any tests fail, rerun them individually to rule out flaky tests. Investigate persistent failures.
-
Open a new PR
- Ensure all code is committed and pushed to your branch.
- Open a new PR in GitHub.
- Rebase your branch with
mainbefore 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.
-
Have it reviewed
- Post a message in
#engineering-frontendor#engineering-generalon Slack to notify the team that the PR is ready for review.
- Post a message in
-
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.
- A PR can be merged when: