@@ -173,7 +173,7 @@ func TestProcessFiles(t *testing.T) {
173173 writeFile (t , p , fixture .input )
174174 }
175175
176- stats , err := ProcessFiles (dir , DefaultPrefixes (), commitMap )
176+ stats , err := ProcessFiles (dir , DefaultPrefixes (), commitMap , 0 )
177177 if err != nil {
178178 t .Fatalf ("ProcessFiles returned error: %v" , err )
179179 }
@@ -207,15 +207,15 @@ func TestProcessFiles(t *testing.T) {
207207 want := `{"sha":"oldSHA1","nested":[{"sha":"oldSHA2"}]}`
208208 writeFile (t , filePath , want )
209209
210- if _ , err := ProcessFiles (dir , []string {"pull_requests" }, map [string ]string {}); err != nil {
210+ if _ , err := ProcessFiles (dir , []string {"pull_requests" }, map [string ]string {}, 0 ); err != nil {
211211 t .Fatalf ("ProcessFiles returned error: %v" , err )
212212 }
213213
214214 assertJSONFileEqual (t , filePath , want )
215215 })
216216
217217 t .Run ("no matching files" , func (t * testing.T ) {
218- if _ , err := ProcessFiles (t .TempDir (), DefaultPrefixes (), map [string ]string {"oldSHA1" : "newSHA1" }); err != nil {
218+ if _ , err := ProcessFiles (t .TempDir (), DefaultPrefixes (), map [string ]string {"oldSHA1" : "newSHA1" }, 0 ); err != nil {
219219 t .Fatalf ("ProcessFiles returned error: %v" , err )
220220 }
221221 })
@@ -227,7 +227,7 @@ func TestProcessFiles(t *testing.T) {
227227 writeFile (t , fooPath , `{"sha":"oldSHA1"}` )
228228 writeFile (t , pullPath , `{"sha":"oldSHA1"}` )
229229
230- stats , err := ProcessFiles (dir , []string {"foo" }, map [string ]string {"oldSHA1" : "newSHA1" })
230+ stats , err := ProcessFiles (dir , []string {"foo" }, map [string ]string {"oldSHA1" : "newSHA1" }, 0 )
231231 if err != nil {
232232 t .Fatalf ("ProcessFiles returned error: %v" , err )
233233 }
@@ -257,7 +257,7 @@ func TestProcessFiles(t *testing.T) {
257257 "oldSHA3" : "newSHA3" ,
258258 "oldSHA4" : "newSHA4" ,
259259 }
260- if _ , err := ProcessFiles (dir , []string {"pull_requests" }, commitMap ); err != nil {
260+ if _ , err := ProcessFiles (dir , []string {"pull_requests" }, commitMap , 0 ); err != nil {
261261 t .Fatalf ("ProcessFiles returned error: %v" , err )
262262 }
263263
@@ -270,7 +270,7 @@ func TestProcessFiles(t *testing.T) {
270270 original := `{"title":"no SHA here","body":"https://example.invalid/oldSHA1","labels":["bug","help wanted"]}`
271271 writeFile (t , filePath , original )
272272
273- if _ , err := ProcessFiles (dir , []string {"issues" }, map [string ]string {"oldSHA1" : "newSHA1" }); err != nil {
273+ if _ , err := ProcessFiles (dir , []string {"issues" }, map [string ]string {"oldSHA1" : "newSHA1" }, 0 ); err != nil {
274274 t .Fatalf ("ProcessFiles returned error: %v" , err )
275275 }
276276
@@ -305,7 +305,7 @@ func TestProcessFiles_SkipsWriteWhenNoReplacements(t *testing.T) {
305305 t .Fatalf ("stat before: %v" , err )
306306 }
307307
308- stats , err := ProcessFiles (dir , []string {"pull_requests" }, map [string ]string {"unrelated" : "x" })
308+ stats , err := ProcessFiles (dir , []string {"pull_requests" }, map [string ]string {"unrelated" : "x" }, 0 )
309309 if err != nil {
310310 t .Fatalf ("ProcessFiles returned error: %v" , err )
311311 }
@@ -345,7 +345,7 @@ func TestProcessFiles_ReturnsPartialStatsOnError(t *testing.T) {
345345 writeFile (t , validPath , `{"sha":"oldSHA1"}` )
346346 writeFile (t , badPath , `{not valid json` )
347347
348- stats , err := ProcessFiles (dir , []string {"pull_requests" }, map [string ]string {"oldSHA1" : "newSHA1" })
348+ stats , err := ProcessFiles (dir , []string {"pull_requests" }, map [string ]string {"oldSHA1" : "newSHA1" }, 0 )
349349 if err == nil {
350350 t .Fatal ("expected error from malformed JSON file" )
351351 }
0 commit comments