Open main menu

DAVE Developer's Wiki β

Changes

MISC-TN-028: GitLab-based workflow

54 bytes added, 07:33, 18 August 2023
no edit summary
In this case, we call the issue "First release" as shown by the following picture:
[[File:Gitlab-wf-1.png|center|thumb|600px]]
Then, we create a merge request associated with the issue. We instruct GitLab to automatically create a branch associated with this issue as well. The branch will be called <code>1-first-release</code> and its source branch is <code>master</code>. This means then when the merge request is accepted, the new code in the branch <code>1-first-release</code> will be merged into the branch <code>master</code>.
[[File:Gitlab-wf-2.png|center|thumb|600px]]
Please note that the merge options are so that the branch will be deleted when the merge request is accepted. This usually makes sense because we don't need to keep the branch when the job is done. If you are asking to yourself, don't worry: although the branch is deleted, commits will not be lost. Therefore, the history of changes will be preserved.
[[File:Gitlab-wf-3.png|center|thumb|600px]]
On GitLab side everything is in place, so we can work on our local host to write our code. For the sake of simplicity, we will just edit one file, <code>README.md</code>.
</pre>
[[File:Gitlab-wf-4.png|center|thumb|600px]]
On GitLab-side we can close the merge request. We mark it as ready in order to prepare it for merging:[[File:Gitlab-wf-5.png|center|thumb|600px]]In case you have permission to start the merging by yourself, you can press the "Merge" button. If you do not have such permission, for example because you have been assigned a <code>developer</code> role, this operation will be run by the <code>maintainer</code> of the repository on your behalf, possibly after reviewing your code.[[File:Gitlab-wf-6.png|center|thumb|600px]]After merging is complete, you should see something like this:[[File:Gitlab-wf-7.png|center|thumb|600px]]If we check the <code>master</code> branch, GitLab confirms that the merging was completed successfully:[[File:Gitlab-wf-8.png|center|thumb|600px]]We can also see a graphical representation of we just did: it is clear that the temporary branch was deleted after it had been merged into the <code>master</code> branch: [[File:Gitlab-wf-9.png|center|thumb|600px]]
== Conclusion ==
We strongly recommend to use this workflow for any implementation, being it adding a new feature, fixing a bug, optimizing a function, or whatever. Even though it may seem a little bit cumbersome at first sight, it has proved to be very efficient and effective when several developers are involved in the same project.
4,650
edits