QA on GitHub
Summary
Just need a quick reminder? This flowchart shows a summary of the process. Scroll down to see more detail about the steps.

This process can be managed in GitHub desktop, VS Code, RStudio, or the IDE you are most comfortable with.
Remember the principles of branching
First let’s remind ourselves of the principles of branching (see here for an intro to branching):
All code in the main branch should be fully QA’d and functional - even if this means that the repo is almost empty initially.
New developments and changes should be coded in their own branch: one branch per ‘feature’. Give the branch a name that helps you identify what a change relates to.
If working on larger changes, it may be best to break it down into smaller steps and develop and QA iteratively - you can branch off your branch to help with this.
GitHub will provide an audit trail of changes made, when they were made, and who made them. This aligns nicely with the team’s QASAR process. It is also easy to roll back to an earlier version if needed.
Remember that we don’t have enterprise licences so we can’t protect our main branches. Changes can be merged without review so be careful.
1. Planned QA Process
Check
There are a couple of checks to do before QA kicks off properly.
If you are the author:
Check that your code is intentionally commented.
The changes you have made are complete, self-reviewed, and saved.
You may want to include the author and latest modification date at the top (although GitHub will help manage this for you).
Ensure that you have committed and pushed the latest changes so that the person QA-ing has the most recent version.
Make sure that the reviewer is a collaborator in the repo settings.
Ensure any files (e.g. config) required for the code are uploaded onto SharePoint for the reviewer to use.
If you are the reviewer:
- Make sure that you have the time, access, and knowledge to do the review.
Complete QA - the reviewer
Once you’ve been added as a reviewer, you will receive an email with a link, and a GitHub notification where you can view changes.

Additions will be in green and removals in red
Review the QA checklist and files changed list. Add comments and request changes where necessary. The best way to do this is often to clone the repository to your local area, and run the code yourself.

Once on the Pull Request page, navigate to the Files changed tab to see the code.
Comments can be added in-line with code. If you do this, click Start a Review if you want all the comments to be sent over at once, at the end of your review.

After reviewing the code, as reviewer, you decide what the verdict is. Click “Review Changes” and leave an overall comment, with one of the following options:
- Comment - Submit general feedback without explicit approval
- Approve - Submit feedback and approve merging these changes
- Request changes - Submit feedback that must be addressed before merging
If as the reviewer, you think there could be some improvements, or you’re not sure about xyz, this is a good way to convey that.

If as the reviewer, you’re happy with the piece of work, and want the author to merge this into main branch with no edits, this is what you want.

If as the reviewer, you’ve spotted something which needs to be changed before being merged into main, you can request changes to deny the pull request until those are actioned.

2. What to do if you spot an issue or have an idea
If you are not within the designated QA process, it is still possible that, in using the code, you see a bug or you have a suggestion for a development. You can do that by creating issues. Any user with read access to a repo can create an issue (assuming that issues are enabled for the repo).

The process
[You, the idea-haver or bug-spotter] Create an issue detailing the problem or idea (help here: https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/creating-an-issue).
[You] If the error or bug is solvable and you feel inclined, you have the option to create a branch that addresses the issue. You can link the pull request with the issue (https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).
[The author] The person managing the code can add the issue number to any relevant ticket on the task board.
[The author] The error, bug, or development can be prioritised and actions. Their pull request can also be linked with the issue (https://docs.github.com/en/issues/tracking-your-work-with-issues/using-issues/linking-a-pull-request-to-an-issue#linking-a-pull-request-to-an-issue-using-a-keyword).
Issues linked with a pull request will close automatically when they are merged. If not, they can be closed by users with triage permission or greater (https://docs.github.com/en/issues/tracking-your-work-with-issues/administering-issues/closing-an-issue).
Summary of the process




