Proposal to tighten branch rules in the Orekit repository

Dear all,

This message is specifically intended for people who have commit access to the Orekit repository (i.e., people who have the developer, maintainer, or owner role in GitLab): @luc, @MaximeJ, @Vincent, @bcazabonne, @Serrof, @evan.ward, @yzokras, @petrus.hyvonen, @markrutten, @hankgrabowski, @pascal.parraud and @yannick.

Some of us, in the heat of the moment, make the mistake of pushing their contributions directly to the main and develop branches, which have a special role in our workflow. I’m not pointing fingers, as this has happened to me too.

Sometimes these enthusiastic and optimistic contributions “break” the develop branch. This is problematic because this branch should only contain validated code (i.e., code that compiles, passes tests, and quality control), so that everyone can, at any time, have a healthy base from which to create a branch and develop their own feature.

GitLab avoids this problem by prohibiting contributions to these branches and only allowing merges from other branches.

Do you agree that I should enable these restrictions on the main, develop, and release-* branches?

Thank you in advance for your votes and comments.

3 Likes

Hi Sebastien,

To be honest I thought it was already the case for main and release branches. If not it should definitely be.
For develop, I guess we could also enforce it, it’d avoid multiple commits that could have been squashed. For very small changes it is sometimes convenient to avoid the MR though.

Cheers,
Romain.

2 Likes

Yes I agree with this 100%. I do this even on software projects/repos where I am the only developer.

1 Like

+1 for restricting this.
And I am certainly the one who most often makes these mistakes :flushed:

1 Like

+1 from me as well, it is a good practice.

+1 from me also, good idea @sdinot !

+1 also ! I just did it on orekit-tutorials for the release :face_in_clouds:. We will not ask ourselves wether we should do the right or the evil thing !

2 Likes

Fine with me. My usual practice to create an MR, tag someone who I think has knowledge of that part of the code, and wait a couple days for any comments.

1 Like

OK, thank you all for your responses. Do you agree with the rules below?

2 Likes

I agree: +1

1 Like