Engineering/Engineering Principles/2 Quality/Source Control And Code Review/Pull Requests/

Pull Request Standards · QUAL-05

A branch policy must be set on main development branches · QUAL-05.1 · MUST · DEV/TEST

Code reviews must be enforced by setting a branch policy on the main development branches (e.g. dev and/or main) with the following settings:

  1. Require a minimum of at least 1 reviewer (an individual project can require more than 1 reviewer if desired).
  2. Do not allow users to approve their own changes (unless the minimum number of reviewers is more than 1).
  3. ‘Reset code reviewer votes when there are new changes’ should be selected.
  4. ‘Check for linked work items’ should be required.
  5. ‘Check for comment resolution’ should be required.
  6. ‘Limit merge types’ should generally be set to ‘Basic merge (no fast-forward)’.
  7. ‘Build validation’ should be set for the relevant build pipeline(s) to ensure that the pull request doesn’t break the build, with the expiration set to immediately.

Projects can diverge from this policy provided it makes the policy stricter rather than more relaxed. For example, requiring more than 1 reviewer.

A checklist must be in use for all pull requests · QUAL-05.2 · MUST · DEV/TEST

Checklists must, at a minimum, include the following checks:

  • That logging is added, where appropriate.
  • That security has been considered and secure coding standards followed.
  • That performance has been considered.
  • That the appropriate testing has taken place to meet the functionality requested.
  • That documentation has been written, where necessary.

Template checklists are available in the Audacia.Templates repository

Restricted
Login to display internal content.

.