diff --git a/.order b/.order index f724cc2..0de313d 100644 --- a/.order +++ b/.order @@ -4,7 +4,7 @@ getting-started agile-working documentation-guidelines versioning -code-review-process +branching-code-review-process network service-catalogue faq diff --git a/branching-code-review-process.md b/branching-code-review-process.md new file mode 100644 index 0000000..290e937 --- /dev/null +++ b/branching-code-review-process.md @@ -0,0 +1,57 @@ +# Branching and Code Review Process + +This document outlines the guidelines and expectations for effective code branching, review, and merging within a regulated Azure DevOps environment. Emphasis is placed on the four-eyes principle and traceability of changes. + +![Branching and Code Review Process.](resources/diagrams/branching-code-review-process.png "Branching and Code Review Process.") + +## Traceability + +- Utilize Azure Boards for work item tracking, linking commits and PRs to their respective items. +- Enforce policies in Azure Repos to require reviews, approvals, optionally linked work items for merges. +- Use annotations in your code for significant changes, providing explanations and linking back to documentation or specs. + +## Create a Branch + +- Create branches under subfolders aligned with their purpose (`new`, `update`, `fix`, `delete`) following the semantic versioning linked with release notes documentation. +- Use descriptive branch names that reflect the feature or fix. + +## Apply Changes + +- Commit changes regularly with clear, concise messages that follow semantic versioning. +- Include work item or issue numbers in commit messages for traceability. + +## Manual Testing + +- Perform local linting to ensure code quality. +- Preview changes locally, especially for UI-related updates. +- Run unit tests and ensure they pass before pushing code. + +## Create a Pull Request + +- Rebase your branch on the latest main branch to simplify the review process and prevent conflicts. +- Ensure your PR description is detailed, linking back to any related work items or issues for context. +- Tag relevant team members for review and set a deadline if necessary. + +## Automated Testing + +- Optional part, automated tests can be defined within a pipeline that is triggered automnatcally when a Pull Request is created. +- Ensure all automated tests pass, including unit, integration, and end-to-end tests. +- Check for code coverage and ensure it meets the project's standards. + +## Review a Pull Request + +- Focus on maintainability, readability, and scalability of the code. +- Ensure new code adheres to project standards and integrates well with existing codebase. +- Provide constructive feedback, highlighting both strengths and areas for improvement. + +## Merge a Pull Request + +- Ensure all PR checks pass (build, test pipelines, and any additional checks your team requires). +- Only merge after at least one other team member has approved the changes. +- Upon merging, the main branch triggers a CI/CD pipeline to deploy changes to a staging environment for further testing. + +## Post-Merge + +- Delete the feature branch to keep the repository clean and manageable. +- Update any project tracking tools to reflect the completion of tasks. +- Review deployment results and ensure no issues in the staging environment before promoting to production. diff --git a/code-review-process.md b/code-review-process.md deleted file mode 100644 index a113296..0000000 --- a/code-review-process.md +++ /dev/null @@ -1,3 +0,0 @@ -# Code Review Process - -Guidelines and expectations for code review. diff --git a/resources/diagrams/branching-code-review-process.drawio b/resources/diagrams/branching-code-review-process.drawio new file mode 100644 index 0000000..ce35b1a --- /dev/null +++ b/resources/diagrams/branching-code-review-process.drawio @@ -0,0 +1,108 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + diff --git a/resources/diagrams/branching-code-review-process.png b/resources/diagrams/branching-code-review-process.png new file mode 100644 index 0000000..9d64d76 Binary files /dev/null and b/resources/diagrams/branching-code-review-process.png differ