Class MergedByPushOp

java.lang.Object
com.google.gerrit.server.git.MergedByPushOp
All Implemented Interfaces:
BatchUpdateOp, RepoOnlyOp

public class MergedByPushOp extends Object implements BatchUpdateOp
Operation to close a change on push.

When we find a change corresponding to a commit that is pushed to a branch directly, we close the change. This class marks the change as merged, and sends out the email notification.

  • Method Details

    • getMergedIntoRef

      public String getMergedIntoRef()
    • setPatchSetProvider

      public MergedByPushOp setPatchSetProvider(com.google.inject.Provider<PatchSet> patchSetProvider)
    • updateChange

      public boolean updateChange(ChangeContext ctx) throws IOException
      Description copied from interface: BatchUpdateOp
      Override this method to modify a change.
      Specified by:
      updateChange in interface BatchUpdateOp
      Parameters:
      ctx - context
      Returns:
      whether anything was changed that might require a write to the metadata storage.
      Throws:
      IOException
    • postUpdate

      public void postUpdate(PostUpdateContext ctx)
      Description copied from interface: RepoOnlyOp
      Override this method to do something after the update e.g. send email or run hooks
      Specified by:
      postUpdate in interface RepoOnlyOp
      Parameters:
      ctx - context