I am creating a custom action where I am checking in a file after some modification. I would like to know how I can disable the versioning when I check-in the file.
So far, I have done the below.
In my code, I am passing null in the check-in function of the CheckOutCheckInService(checkOutCheckInService.checkin(workingNode, null);) as specified in the comments of the checkIn function to prevent versioning of the file but I can still see that a minor version is created e.g. 2.0 --> 2.1.
Then, I removed the versionable aspect(nodeService.removeAspect(actionedUponNodeRef, ContentModel.ASPECT_VERSIONABLE);) from the file and I was able to check in file without creating a version but all the information related to previous versions was lost. This is where I am not able to find out how can I check in the file through my custom action without increasing the version and preserving the version history at the same time.