If we are in a position where new developments or bug fixes need to be merged from a branch back to master, follow the rules defined here. If there is anything unclear also in specific cases, we can always discuss in our meetings.
Keep merge request as small as possible; changes limited to one problem/issue/bug. This will help to get MRs reviewed and closed quickly.
In order to review and merge your 'merge requests' (MRs) quickly and efficiently:
It is very useful and will speed up the process described here if particular developments have already been discussed in meetings or gitlab Issues BEFORE a Merge Request or any development is started.
- document and discuss your contributions PRIOR to start to code in an Issue!
- keep merge request as small as possible.
- changes limited to one problem/issue/bug.
- discuss your code contribution in the MR discussion area.
- make sure coding quality is high, and guidelines are followed.
It is very useful and will speed up the process described here if particular developments have already been discussed in meetings or gitlab [Issues](https://gitlab.ikp.kit.edu/AirShowerPhysics/corsika/-/issues) BEFORE a MR or any development is started.
A merge request is not complete, if there are no Labels assigned. Labels help the code review.
- Select between: Bug, Feature, Development
- Specify, if needed: Critical (must be addressed immediately), Important (blocks other things)
- Describe the scope: Stack, Documentation, Processes, Testing, Style, ... (add further items if needed)
- Describe the scope: Stack, Documentation, Processes, Build System, Testing, Style, ... (add further items if needed)
In the following graph the typical default workflow is described:
```mermaid
graph TD;
subgraph "Code contributor"
A000[Creating new MR] --> A001[Via existing gitlab Issue];
A000 --> A002[Via MR/Create new MR];
A000 --> A003[From existing branch, or fork];
A002 --> A004[Make sure the MR title starts with `WIP:` to mark it as work in progress];
A003 --> A004;
A001 --> A004;
A000[Creating new MR] ==> A001[Via existing gitlab Issue];
A000 -.-> A002[Via MR/Create new MR];
A000 -.-> A003[From existing branch, or fork];
A002 ==> A004[Make sure the MR title starts with `WIP:` to mark it as 'work in progress'];
A003 -.-> A004;
A001 -.-> A004;
style A001 stroke-width:4px;
A004 --> A005[Use the MR template `New Merge Request`];
A005 --> A006[If not automatic but possible: create link to Issue];
...
...
@@ -27,8 +36,8 @@ graph TD;
A007 --> A0
A0[Working on MR/branch] -- Finished main work --> A2[Make sure all conditions for code review and approval are met];
A2 -- Ok --> A3[Remove WIP status];
A0[Working on MR/branch] -- Finished main work --> A2[Make sure all conditions for code review and approval are met, Read [coding](Coding) ];
A2 -- Ok --> A3[Remove 'WIP' status];
A3 --> A4[Inform developers/corsika-devel that code review can proceed];