mirror of
https://github.com/zebrajr/pytorch.git
synced 2025-12-06 12:20:52 +01:00
Use three-dot diffs in URL and xref lint workflows (#152895)
Only run on the files actually modified in a PR, not every file touched on main since the branch point Fixes #152884 Pull Request resolved: https://github.com/pytorch/pytorch/pull/152895 Approved by: https://github.com/huydhn
This commit is contained in:
parent
f097e83369
commit
1798b0db25
8
.github/workflows/_link_check.yml
vendored
8
.github/workflows/_link_check.yml
vendored
|
|
@ -25,9 +25,9 @@ jobs:
|
|||
script: |
|
||||
./scripts/lint_urls.sh $(
|
||||
[ "${{ github.event_name }}" = "pull_request" ] \
|
||||
&& git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} \
|
||||
&& git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} \
|
||||
|| [ "${{ github.event_name }}" = "push" ] \
|
||||
&& git diff --name-only ${{ github.event.before }} ${{ github.sha }}
|
||||
&& git diff --name-only ${{ github.event.before }}...${{ github.sha }}
|
||||
) || {
|
||||
echo
|
||||
echo "URL lint failed."
|
||||
|
|
@ -50,7 +50,7 @@ jobs:
|
|||
script: |
|
||||
./scripts/lint_xrefs.sh $(
|
||||
[ "${{ github.event_name }}" = "pull_request" ] \
|
||||
&& git diff --name-only ${{ github.event.pull_request.base.sha }} ${{ github.event.pull_request.head.sha }} \
|
||||
&& git diff --name-only ${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }} \
|
||||
|| [ "${{ github.event_name }}" = "push" ] \
|
||||
&& git diff --name-only ${{ github.event.before }} ${{ github.sha }}
|
||||
&& git diff --name-only ${{ github.event.before }}...${{ github.sha }}
|
||||
)
|
||||
|
|
|
|||
Loading…
Reference in New Issue
Block a user