Forums

Articles
Create
cancel
Showing results for 
Search instead for 
Did you mean: 

Exclude certain files patterns in a pre-recieve hook while calling commitService.streamDiff

kairazeh
I'm New Here
I'm New Here
Those new to the Atlassian Community have posted less than three times. Give them a warm welcome!
May 1, 2020 edited

Hi ,

I am trying to write a pre-recieve (preUpate) hook to get the Diff content for a commit and scan for the specific  strings  from the Diff using commitService.

commitService.streamDiff(new DiffRequest.Builder(repo, commitId).build(), new DiffContentCallback() {
        //implement methods that are called as the diff is streamed.
//grep specific string pattern });

However , I do not wish to scan on the entire Diff results  from StreamDiff and want to exclude certain file with specific extentions (such as .json files) 

Can you help me with some examples to achieve this

 

Thanks

0 answers

Suggest an answer

Log in or Sign up to answer
TAGS
AUG Leaders

Atlassian Community Events