Merge Check: Modify Merge Default Fields

Hi All,
I have a merge check hook, which is triggered when clicking this “Merge” button (in the final dialog before the actual merge), validating the merge.

I would like to use this hook (or another) to modify the dialog box itself.
For example, I would like to, based on the PR’s attributes and content:

  • Set a custom Commit Message
  • Allow specific merge strategies

Hook skeleton code:

public class MergePoliceCheck implements RepositoryMergeCheck
{
	@Override
	public RepositoryHookResult preUpdate(@Nonnull PreRepositoryHookContext context, 
										  @Nonnull PullRequestMergeHookRequest request) 
	{
          //My code
    }
}

How do you suggest doing it?
Thanks in advance, TG