Interface ChangeMessageModifier


  • public interface ChangeMessageModifier
    Allows to modify the commit message for new commits generated by Rebase Always submit strategy.

    Invoked by Gerrit when all information about new commit is already known such as parent(s), tree hash, etc, but commit's message can still be modified.

    • Method Detail

      • onSubmit

        String onSubmit​(String newCommitMessage,
                        org.eclipse.jgit.revwalk.RevCommit original,
                        org.eclipse.jgit.revwalk.RevCommit mergeTip,
                        Branch.NameKey destination)
        Implementation must return non-Null commit message.

        mergeTip and original commit are guaranteed to have their body parsed, meaning that their commit messages and footers can be accessed.

        Parameters:
        newCommitMessage - the new commit message that was result of either
        original - the commit of the change being submitted. Note that its commit message may be different than newCommitMessage argument.
        mergeTip - the current HEAD of the destination branch, which will be a parent of a new commit being generated
        destination - the branch onto which the change is being submitted
        Returns:
        a new not null commit message.