Skip to content

Commit 7df3e93

Browse files
authored
ci: Set dynamic fetch-depth in scans workflow (#711)
Updated the GitHub Actions scans workflow to set fetch-depth dynamically based on the number of pull request commits, improving the accuracy of fetched history for analysis.
1 parent 3b983b1 commit 7df3e93

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

.github/workflows/scans.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -209,6 +209,7 @@ jobs:
209209
with:
210210
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
211211
ref: ${{ github.event.pull_request.head.sha || github.sha }}
212+
fetch-depth: (${{ github.event.pull_request.commits || 2 }} + 1)
212213

213214
- id: megalinter
214215
# You can override MegaLinter flavor used to have faster performances

0 commit comments

Comments
 (0)