Skip to content

Commit 732cc45

Browse files
heiskrCopilot
andauthored
Set fetch-depth: 2 on workflows using tj-actions/changed-files (#60219)
Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
1 parent bf69e09 commit 732cc45

File tree

6 files changed

+18
-2
lines changed

6 files changed

+18
-2
lines changed

.github/workflows/content-lint-markdown.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -24,6 +24,9 @@ jobs:
2424
steps:
2525
- name: Check out repo
2626
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
27+
with:
28+
# Fetch 2 commits so tj-actions/changed-files can diff without extra API calls
29+
fetch-depth: 2
2730

2831
- name: Set up Node and dependencies
2932
uses: ./.github/actions/node-npm-setup

.github/workflows/link-check-on-pr.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -30,6 +30,9 @@ jobs:
3030
steps:
3131
- name: Checkout
3232
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
33+
with:
34+
# Fetch 2 commits so tj-actions/changed-files can diff without extra API calls
35+
fetch-depth: 2
3336

3437
- uses: ./.github/actions/node-npm-setup
3538

.github/workflows/readability.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -27,10 +27,11 @@ jobs:
2727
if: github.repository == 'github/docs-internal'
2828
runs-on: ubuntu-latest
2929
steps:
30-
- name: Check out repo with full history
30+
- name: Check out repo
3131
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
3232
with:
33-
fetch-depth: 0
33+
# Fetch 2 commits so tj-actions/changed-files can diff without extra API calls
34+
fetch-depth: 2
3435

3536
- name: Checkout PR for manual dispatch
3637
if: ${{ github.event_name == 'workflow_dispatch' }}

.github/workflows/reviewers-legal.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -33,6 +33,9 @@ jobs:
3333
steps:
3434
- name: Checkout repository
3535
uses: actions/checkout@v6.0.1
36+
with:
37+
# Fetch 2 commits so tj-actions/changed-files can diff without extra API calls
38+
fetch-depth: 2
3639

3740
- name: Get changed files
3841
id: changed_files

.github/workflows/test-changed-content.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ jobs:
2828
# Even if if doesn't do anything
2929
- name: Check out repo
3030
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
31+
with:
32+
# Fetch 2 commits so tj-actions/changed-files can diff without extra API calls
33+
fetch-depth: 2
3134

3235
- uses: ./.github/actions/node-npm-setup
3336

.github/workflows/test.yml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -88,6 +88,9 @@ jobs:
8888
# Even if if doesn't do anything
8989
- name: Check out repo
9090
uses: actions/checkout@8e8c483db84b4bee98b60c0593521ed34d9990e8 # v6.0.1
91+
with:
92+
# Fetch 2 commits so tj-actions/changed-files can diff without extra API calls
93+
fetch-depth: 2
9194

9295
- uses: ./.github/actions/setup-elasticsearch
9396
if: ${{ matrix.name == 'search' || matrix.name == 'languages' }}

0 commit comments

Comments
 (0)