I'm trying to fill in streamFile on a pre-receive hook. I can't figure out how to get a changesetID and a path for the file being pushed to the repository. How do I get those?
Community moderators have prevented the ability to post new answers.
I ended up using commitService.streamChanges([parameters]). From there you can grab the file path (change.getPath()) for each change. As for the changesetID I decided to use the refHash isntead which is also valid. You can get that by doing refChange.getFromHash().
This will help,
https://answers.atlassian.com/questions/171295/stash-pre-receive-hook-plugin-accessing-committed-contents
Normally inorder to get the file path
commitService#onStreamChanges() will gives us to get file path.
go through the abbove link and you will get the sample code in sub links.
Check the latest discussion of mine
Regards
Anil Kumar R
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.
The code sample here should get you as far as the changesets. I am not sure how to get the files, but I suspect it is probably somewhere in CommitService.
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.
Community moderators have prevented the ability to post new answers.
You must be a registered user to add a comment. If you've already registered, sign in. Otherwise, register and sign in.