Closed
Description
Recently, a wrong merge happened from main
into 6.2.x
, since the merge was a fast-forward it went unnoticed until a contributor reported it in #15016. The result was that 6.2.x
was synced with main
.
We should prevent it from happening again, a few suggestions are:
- A Gradle task that checks if we are in a branch that matches
*.x
and then compare it with theversion
ingradle.properties
. Thecheck
task would depend on this new task. - A pre-commit hook that does the same as above
- A CI task/workflow that does the same as above
- Use no fast-forward option (
--no-ff
), this will create a merge commit even when a fast-forward is possible, making it easier to spot the mistake