new: Documentation for Branching and Code Reviews,
This commit is contained in:
parent
b9a76775ae
commit
65cead18aa
5 changed files with 166 additions and 4 deletions
2
.order
2
.order
|
|
@ -4,7 +4,7 @@ getting-started
|
|||
agile-working
|
||||
documentation-guidelines
|
||||
versioning
|
||||
code-review-process
|
||||
branching-code-review-process
|
||||
network
|
||||
service-catalogue
|
||||
faq
|
||||
|
|
|
|||
57
branching-code-review-process.md
Normal file
57
branching-code-review-process.md
Normal file
|
|
@ -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.
|
||||
|
||||

|
||||
|
||||
## 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.
|
||||
|
|
@ -1,3 +0,0 @@
|
|||
# Code Review Process
|
||||
|
||||
Guidelines and expectations for code review.
|
||||
108
resources/diagrams/branching-code-review-process.drawio
Normal file
108
resources/diagrams/branching-code-review-process.drawio
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
<mxfile host="Electron" modified="2024-06-13T13:43:42.494Z" agent="Mozilla/5.0 (Macintosh; Intel Mac OS X 10_15_7) AppleWebKit/537.36 (KHTML, like Gecko) draw.io/21.7.5 Chrome/114.0.5735.289 Electron/25.8.1 Safari/537.36" etag="cg7QfzvNA38MKxiqKTFu" version="21.7.5" type="device">
|
||||
<diagram name="Page-1" id="-EEyyUf5nYEXA_laAhuK">
|
||||
<mxGraphModel dx="1434" dy="1027" grid="1" gridSize="10" guides="1" tooltips="1" connect="1" arrows="1" fold="1" page="1" pageScale="1" pageWidth="827" pageHeight="1169" math="0" shadow="0">
|
||||
<root>
|
||||
<mxCell id="0" />
|
||||
<mxCell id="1" parent="0" />
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-1" value="feature branch" style="swimlane;horizontal=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="40" y="40" width="1600" height="200" as="geometry">
|
||||
<mxRectangle x="40" y="40" width="40" height="150" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-21" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="-nrJaol4Bb5bSKeGxYpq-1" source="-nrJaol4Bb5bSKeGxYpq-18" target="-nrJaol4Bb5bSKeGxYpq-22" edge="1">
|
||||
<mxGeometry relative="1" as="geometry">
|
||||
<mxPoint x="600" y="120" as="targetPoint" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-18" value="Add documentation code changes" style="points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];shape=mxgraph.bpmn.task;whiteSpace=wrap;rectStyle=rounded;size=10;html=1;container=1;expand=0;collapsible=0;taskMarker=manual;fillColor=#ffe6cc;strokeColor=#d79b00;" parent="-nrJaol4Bb5bSKeGxYpq-1" vertex="1">
|
||||
<mxGeometry x="440" y="80" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-30" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="-nrJaol4Bb5bSKeGxYpq-1" source="-nrJaol4Bb5bSKeGxYpq-22" target="-nrJaol4Bb5bSKeGxYpq-23" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-22" value="Create PR" style="points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];shape=mxgraph.bpmn.task;whiteSpace=wrap;rectStyle=rounded;size=10;html=1;container=1;expand=0;collapsible=0;taskMarker=manual;" parent="-nrJaol4Bb5bSKeGxYpq-1" vertex="1">
|
||||
<mxGeometry x="760" y="80" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-31" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="-nrJaol4Bb5bSKeGxYpq-1" source="-nrJaol4Bb5bSKeGxYpq-23" target="-nrJaol4Bb5bSKeGxYpq-24" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-23" value="Automated testing in pipeline (linting etc.)" style="points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];shape=mxgraph.bpmn.task;whiteSpace=wrap;rectStyle=rounded;size=10;html=1;container=1;expand=0;collapsible=0;taskMarker=service;" parent="-nrJaol4Bb5bSKeGxYpq-1" vertex="1">
|
||||
<mxGeometry x="920" y="80" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-32" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="-nrJaol4Bb5bSKeGxYpq-1" source="-nrJaol4Bb5bSKeGxYpq-24" target="-nrJaol4Bb5bSKeGxYpq-25" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-24" value="Review" style="points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];shape=mxgraph.bpmn.task;whiteSpace=wrap;rectStyle=rounded;size=10;html=1;container=1;expand=0;collapsible=0;taskMarker=manual;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="-nrJaol4Bb5bSKeGxYpq-1" vertex="1">
|
||||
<mxGeometry x="1080" y="80" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-36" value="rejected" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="-nrJaol4Bb5bSKeGxYpq-1" source="-nrJaol4Bb5bSKeGxYpq-25" target="-nrJaol4Bb5bSKeGxYpq-18" edge="1">
|
||||
<mxGeometry x="-0.9186" relative="1" as="geometry">
|
||||
<Array as="points">
|
||||
<mxPoint x="1265" y="40" />
|
||||
<mxPoint x="500" y="40" />
|
||||
</Array>
|
||||
<mxPoint as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-25" value="" style="points=[[0.25,0.25,0],[0.5,0,0],[0.75,0.25,0],[1,0.5,0],[0.75,0.75,0],[0.5,1,0],[0.25,0.75,0],[0,0.5,0]];shape=mxgraph.bpmn.gateway2;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;align=center;perimeter=rhombusPerimeter;outlineConnect=0;outline=none;symbol=none;gwType=exclusive;" parent="-nrJaol4Bb5bSKeGxYpq-1" vertex="1">
|
||||
<mxGeometry x="1240" y="95" width="50" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="Vsr6RkPdlcdsNb9Uu0XS-1" value="Manual testing, linting, preview changes." style="points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];shape=mxgraph.bpmn.task;whiteSpace=wrap;rectStyle=rounded;size=10;html=1;container=1;expand=0;collapsible=0;taskMarker=manual;" vertex="1" parent="-nrJaol4Bb5bSKeGxYpq-1">
|
||||
<mxGeometry x="600" y="80" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-6" value="main branch" style="swimlane;horizontal=0;whiteSpace=wrap;html=1;" parent="1" vertex="1">
|
||||
<mxGeometry x="40" y="240" width="1600" height="200" as="geometry">
|
||||
<mxRectangle x="40" y="40" width="40" height="150" as="alternateBounds" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-14" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="-nrJaol4Bb5bSKeGxYpq-6" source="-nrJaol4Bb5bSKeGxYpq-10" target="-nrJaol4Bb5bSKeGxYpq-12" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-10" value="" style="points=[[0.145,0.145,0],[0.5,0,0],[0.855,0.145,0],[1,0.5,0],[0.855,0.855,0],[0.5,1,0],[0.145,0.855,0],[0,0.5,0]];shape=mxgraph.bpmn.event;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;align=center;perimeter=ellipsePerimeter;outlineConnect=0;aspect=fixed;outline=standard;symbol=general;" parent="-nrJaol4Bb5bSKeGxYpq-6" vertex="1">
|
||||
<mxGeometry x="40" y="80" width="50" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-7" value="" style="points=[[0.145,0.145,0],[0.5,0,0],[0.855,0.145,0],[1,0.5,0],[0.855,0.855,0],[0.5,1,0],[0.145,0.855,0],[0,0.5,0]];shape=mxgraph.bpmn.event;html=1;verticalLabelPosition=bottom;labelBackgroundColor=#ffffff;verticalAlign=top;align=center;perimeter=ellipsePerimeter;outlineConnect=0;aspect=fixed;outline=end;symbol=terminate2;" parent="-nrJaol4Bb5bSKeGxYpq-6" vertex="1">
|
||||
<mxGeometry x="1520" y="75" width="50" height="50" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-15" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="-nrJaol4Bb5bSKeGxYpq-6" source="-nrJaol4Bb5bSKeGxYpq-12" target="-nrJaol4Bb5bSKeGxYpq-13" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-12" value="Story created, change approved" style="points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];shape=mxgraph.bpmn.task;whiteSpace=wrap;rectStyle=rounded;size=10;html=1;container=1;expand=0;collapsible=0;taskMarker=manual;" parent="-nrJaol4Bb5bSKeGxYpq-6" vertex="1">
|
||||
<mxGeometry x="120" y="65" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-17" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="-nrJaol4Bb5bSKeGxYpq-6" source="-nrJaol4Bb5bSKeGxYpq-13" target="-nrJaol4Bb5bSKeGxYpq-16" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-13" value="Requirements engineering, we are sure what we do and why" style="points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];shape=mxgraph.bpmn.task;whiteSpace=wrap;rectStyle=rounded;size=10;html=1;container=1;expand=0;collapsible=0;taskMarker=manual;fillColor=#e1d5e7;strokeColor=#9673a6;" parent="-nrJaol4Bb5bSKeGxYpq-6" vertex="1">
|
||||
<mxGeometry x="280" y="65" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-16" value="git checkout -b new-branch" style="points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];shape=mxgraph.bpmn.task;whiteSpace=wrap;rectStyle=rounded;size=10;html=1;container=1;expand=0;collapsible=0;taskMarker=manual;" parent="-nrJaol4Bb5bSKeGxYpq-6" vertex="1">
|
||||
<mxGeometry x="440" y="65" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-34" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="-nrJaol4Bb5bSKeGxYpq-6" source="-nrJaol4Bb5bSKeGxYpq-27" target="-nrJaol4Bb5bSKeGxYpq-28" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-27" value="Merge PR" style="points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];shape=mxgraph.bpmn.task;whiteSpace=wrap;rectStyle=rounded;size=10;html=1;container=1;expand=0;collapsible=0;taskMarker=manual;" parent="-nrJaol4Bb5bSKeGxYpq-6" vertex="1">
|
||||
<mxGeometry x="1205" y="60" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-35" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0;entryY=0.5;entryDx=0;entryDy=0;entryPerimeter=0;" parent="-nrJaol4Bb5bSKeGxYpq-6" source="-nrJaol4Bb5bSKeGxYpq-28" target="-nrJaol4Bb5bSKeGxYpq-7" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-28" value="Mirror repo" style="points=[[0.25,0,0],[0.5,0,0],[0.75,0,0],[1,0.25,0],[1,0.5,0],[1,0.75,0],[0.75,1,0],[0.5,1,0],[0.25,1,0],[0,0.75,0],[0,0.5,0],[0,0.25,0]];shape=mxgraph.bpmn.task;whiteSpace=wrap;rectStyle=rounded;size=10;html=1;container=1;expand=0;collapsible=0;taskMarker=service;" parent="-nrJaol4Bb5bSKeGxYpq-6" vertex="1">
|
||||
<mxGeometry x="1360" y="60" width="120" height="80" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-20" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=1;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="-nrJaol4Bb5bSKeGxYpq-16" target="-nrJaol4Bb5bSKeGxYpq-18" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-33" style="edgeStyle=orthogonalEdgeStyle;rounded=0;orthogonalLoop=1;jettySize=auto;html=1;entryX=0.5;entryY=0;entryDx=0;entryDy=0;entryPerimeter=0;" parent="1" source="-nrJaol4Bb5bSKeGxYpq-25" target="-nrJaol4Bb5bSKeGxYpq-27" edge="1">
|
||||
<mxGeometry relative="1" as="geometry" />
|
||||
</mxCell>
|
||||
<mxCell id="-nrJaol4Bb5bSKeGxYpq-37" value="approved" style="edgeLabel;html=1;align=center;verticalAlign=middle;resizable=0;points=[];" parent="-nrJaol4Bb5bSKeGxYpq-33" vertex="1" connectable="0">
|
||||
<mxGeometry x="-0.4609" y="-1" relative="1" as="geometry">
|
||||
<mxPoint x="1" y="-6" as="offset" />
|
||||
</mxGeometry>
|
||||
</mxCell>
|
||||
</root>
|
||||
</mxGraphModel>
|
||||
</diagram>
|
||||
</mxfile>
|
||||
BIN
resources/diagrams/branching-code-review-process.png
Normal file
BIN
resources/diagrams/branching-code-review-process.png
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 54 KiB |
Loading…
Add table
Add a link
Reference in a new issue