Hi Jaroslav,

On 12.01.25 06:52, Jaroslav Tulach wrote:
I've noticed there is some commit validation checker as I got one failure
during development.

Why doesn't the checker:
- fail a PR check if there are two commits by the same person?
- e.g. two commits by jaroslav.tulach would fail the PR check.
- unless there is a label like "Merge allowed" attached to the PR

i thought about this before but I fear that this might not help. The basic idea would be to make multi-commit PRs opt-in via label.

This would have the following effects I believe:

 - PRs would essentially always fail the paperwork job while they are still in the development/review phase

 - committers which anticipate a multi-commit merge, will set the flag -> the checks are now green again

 - the same accidents can still happen, since the system does not know what the /intended/ number of commits is

The inverted case is to make a needs-squashing label fail the checks. However, who would set that? And where is the difference between setting a label and leaving a short note while approving?

Not sure if we can make it more strickt without it getting in the way
though.
Such a check would be a constant reminder for oldschoolers and wouldn't stay
in a way, as it could be disabled by adding a special label.

Yes a flag has indeed the potential to work as a reminder, but this will come with extra annoyances. E.g having to force a rebuild just to make the checks happy if the label was not set etc.

I think the best UI fix for this would be a confirm dialog on the github side in the sense of "are you sure you want to merge 15 commits?". But there are no hooks for things like this which I am aware off.

If this is mainly about finding ways to remind committers about things to watch out for, what if we inject the pre-merge checklist into the PR text template?

best regards,

michael



---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@netbeans.apache.org
For additional commands, e-mail: dev-h...@netbeans.apache.org

For further information about the NetBeans mailing lists, visit:
https://cwiki.apache.org/confluence/display/NETBEANS/Mailing+lists



Reply via email to