This repository has been archived by the owner on Sep 25, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 4
Best Practices
Shivani Karikar edited this page Jul 6, 2023
·
2 revisions
- Always create a branch for any proposed changes
- Name the branch based on the issue/task. Keep it generic and concise. Using initials in the branch name is useful.
- Limit the changes on your branch to the issue being worked on. Create a new branch if working on multiple efforts. This helps the review as well.
- If collaborating with others on a branch, remember to
push
andpull
often and keep your team members in the loop. - ALWAYS test your code before review. Testing (the code you're actively working on) as often as daily is ideal.
Note: If working on an existing InSpec profile, remember to bump the version in inspec.yml
- Stage a pull request (PR) before asking a reviewer to take a look at your code.
- Convert your PR to draft until it's ready for review.
- Name your PR using a concise title relevant to the task.
- If there is an issue logged that triggered the task, use
resolves #<issue number>
in the description of the PR. - If no issue is logged for the task, describe the changes in detail. Ideally: Why is the code being changed? What was changed? How the new code is better?
- Once your code has been completed, tested, and ready for review: Mark it ready and assign the reviewer and assignee.
- Notify the reviewer on standup that the PR is now ready.
- If changes are requested, make the changes (if in agreement), test them, and respond to the reviewer's comments with an update (and an optional commit hash).
- Re-request a review until the PR is approved.
- Merge the PR when it is approved.
- Delete the branch.
-
resolves #<issue number>
should automatically close the issue.