You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+41
Original file line number
Diff line number
Diff line change
@@ -363,6 +363,47 @@ This option is implemented by `skip-duplicate-actions`.
363
363
An advantage is that this works regardless of whether you are using PRs or raw feature-branches, and of course it also works for "required" checks.
364
364
Internally, `skip-duplicate-actions` uses the [Repos Commit API](https://docs.github.com/en/rest/reference/repos#get-a-commit) to perform an efficient backtracking-algorithm for paths-skipping-detection.
365
365
366
+
This is how the algorithm works approximately:
367
+
368
+
```mermaid
369
+
stateDiagram-v2
370
+
Check_Commit: Check Commit
371
+
[*] --> Check_Commit: Current commit
372
+
373
+
state Path_Ignored <<choice>>
374
+
Check_Commit --> Path_Ignored: Do all changed files match against "paths_ignore"?
375
+
Ignored_Yes: Yes
376
+
Ignored_No: No
377
+
Path_Ignored --> Ignored_Yes
378
+
Path_Ignored --> Ignored_No
379
+
380
+
state Path_Skipped <<choice>>
381
+
Ignored_No --> Path_Skipped: Do none of the changed files match against "paths"?
382
+
Skipped_Yes: Yes
383
+
Skipped_No: No
384
+
Path_Skipped --> Skipped_Yes: No matches
385
+
Path_Skipped --> Skipped_No: Some matches
386
+
387
+
Parent_Commit: Fetch Parent Commit
388
+
Ignored_Yes --> Parent_Commit
389
+
Skipped_Yes --> Parent_Commit
390
+
391
+
state Successful_Run <<choice>>
392
+
Parent_Commit --> Successful_Run: Is there a successful run for this commit?
393
+
Run_Yes: Yes
394
+
Run_No: No
395
+
Successful_Run --> Run_Yes
396
+
Successful_Run --> Run_No
397
+
398
+
Run_No --> Check_Commit: Parent commit
399
+
400
+
Skip: Skip!
401
+
Run_Yes --> Skip: (Because all changes since this run are in ignored or skipped paths)
402
+
403
+
Dont_Skip: Don't Skip!
404
+
Skipped_No --> Dont_Skip: (Because changed files needs to be "tested")
0 commit comments