Hi All,
I'm working with PullRequest and I'm using "PreReceiveRepositoryHook" interfece.
How can I get the commit information while I'm doing pullrequest from one branch to another.
I able to get the details while pusing but i need same for pull request.
urgent please..
Thanks&Regards
Anil.
I have not (yet) used RepositoryMergeRequestCheck, but it seems from the documentation that RepositoryMergeRequestCheckContext.getMergeRequest().getPullRequest().getFromRef() gets you a ref to the branch which is about to be merged and then you can fish out the commits from there using CommitService.
You cannot do this with a pre-receive hook. Take a look at this topic for advice on how to get this done.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
Hi Balazs,
With PreReceiveRepositoryHook,RepositorySettingsValidator, I able to get the with this
public boolean onReceive(RepositoryHookContext context, Collection<RefChange> refChanges, HookResponse hookResponse) {
}
I able to get the commit details.
And also with these AsyncPostReceiveRepositoryHook, RepositorySettingsValidator
public void postReceive(RepositoryHookContext context, Collection<RefChange> refChanges)
{
}
I able to get the commit details here as well.
But with RepositoryMergeRequestCheck, RepositorySettingsValidator
public void check(RepositoryMergeRequestCheckContext context)
{
// here im not able to get the commit info.
}
I need to get the commit info here becuse while i'm doing pullrequest this is excecuting so i need to update my ticet portals with some "pull request intiated " message.
With the AsyncPostReceiveRepositoryHook, RepositorySettingsValidator
public void postReceive(RepositoryHookContext context, Collection<RefChange> refChanges)
{
//here i able to get the commit details.
}
So, with PreRepositoryMergeHook i need to get the commit info while user clicks the pullrequest button in stash server.
Thanks&Regards
Anil
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.