Skip to content

Commit 365b22c

Browse files
authored
Update _link_check.yml
1 parent 064eff4 commit 365b22c

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

.github/workflows/_link_check.yml

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,10 @@ jobs:
1616
ref: ${{ inputs.ref }}
1717
timeout: 90
1818
script: |
19-
./scripts/lint_urls.sh
19+
./scripts/lint_urls.sh $(
20+
[ "${{ github.event_name }}" = "pull_request" ] \
21+
&& git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
22+
)
2023
2124
lint-xrefs:
2225
uses: pytorch/test-infra/.github/workflows/linux_job_v2.yml@main
@@ -28,4 +31,7 @@ jobs:
2831
ref: ${{ inputs.ref }}
2932
timeout: 90
3033
script: |
31-
./scripts/lint_xrefs.sh
34+
./scripts/lint_xrefs.sh $(
35+
[ "${{ github.event_name }}" = "pull_request" ] \
36+
&& git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }}
37+
)

0 commit comments

Comments
 (0)