Git - HealthTeacher/style-guide GitHub Wiki
Flow
- Create a topic branch off of
origin/staging
*. rebase
againstorigin/staging
* frequently to stay up to date.- Push your topic branch to
origin
. - Submit a pull request to
staging
. - Follow PR guidelines.
- Squash & merge your branch via GitHub and delete your topic branch.
- Immediately deploy to the staging.
*All hot fixes should branch off of master.
Branches
- All branch names should be prefixed with
feature/
,bug/
,chore/
,hot-fix/
, orspike/
, followed by a concise description. - Utilize ticket ID's provided by Clubhouse to associate your feature branch to
the related ticket (e.g.
bug/ch1234/repair-heading-size
).
Commits
- Limit the subject line to 50 characters.
- Capitalize the subject line.
- Do not end the subject line with a period.
- Use the imperative mood in the subject line.
- When necessary, use the body to explain what and why vs. how.
- Separate subject from body with a blank line.
- Wrap the body at 72 characters.
- Additional Info.
Pull Requests
- PR titles and bodies should adhere to the same guidelines outlined above for commits.
- Prerequisites for requesting review:
- Passing CI build.
- How many approvals are required to merge?
Aim for two approvals, free to move forward with one if under a tight schedule.
- How many should be requested to review?
Only request the targeted number of reviewers.
- What should influence choosing a reviewer?
- GitHub's proposed reviewers.
- Seniority/experience in context.
- How fast should reviewers respond to PR review request notifications?
Aim to respond within 1 hour.
- Do NOT make changes to a PR for which you do not possess responsibility.
- The PR submitter is responsible for handling any reviewer-requested changes. This only changes
in the following scenarios:
- The submitter requests assistance from a coworker and passes responsibility.
- A coworker is free and desires to handle the changes, in which case they should notify the submitter via Slack or PR comments.