I am implementing a RepositoryMergeCheck and want to be able to issue GIT commands against the repo. I cannot figure out how to get an instance of GitScmCommandBuilder or GitCommandBuilderFactory
Would someone know how I can get one of these so I can call builder().command(…)
I have the declaration for GitCommandBuilderFactory, using the @ComponentImport. When I compile the code, I get this error:
variable gitCommandBuilderFactory might not have been initialized
So what I am asking is, how do I get an instance of the factory object? I am writting a MergeCheck plugin and the only interface that I have is:
RepositoryMergeCheck and this method:
public RepositoryHookResult preUpdate(@Nonnull PreRepositoryHookContext context,
@Nonnull PullRequestMergeHookRequest request)
In this method I would like to be able to issue git commands against the repo. To do that, I need the factory so I can create the builder.
Does anyone know how to get an instance of the builder factory ?
PS - I downloaded the source code for YACC as you suggested, but I cannot find anywhere in the code where it uses the builder factory or implements the merge check interface.
I was able to find the builder factory stuff in the YACC plugin code, thanks for the tip. However, it is using the older, deprecated style of <component-import> rather than the preferred Spring Scanner method. Once I figured out how to use the @ComponentImport annotation, everything worked!