Heads up! On March 5, starting at 4:30 PM Central Time, our community will be undergoing scheduled maintenance for a few hours. During this time, you will find the site temporarily inaccessible. Thanks for your patience. Read more.

×
Create
cancel
Showing results for 
Search instead for 
Did you mean: 
Sign up Log in

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

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