Skip to content

Commit 3b51594

Browse files
authored
Update _link_check.yml
1 parent d6ebd47 commit 3b51594

File tree

1 file changed

+10
-10
lines changed

1 file changed

+10
-10
lines changed

.github/workflows/_link_check.yml

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,11 +18,11 @@ jobs:
1818
timeout: 120
1919
script: |
2020
./scripts/lint_urls.sh $(
21-
{ [ "${{ github.event_name }}" = "pull_request" ] \
22-
&& git diff --name-only "${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }}"; } \
23-
|| \
24-
{ [ "${{ github.event_name }}" = "push" ] \
25-
&& git diff --name-only "${{ github.event.before }}...${{ github.sha }}"; }
21+
if [ "${{ github.event_name }}" = "pull_request" ]; then
22+
echo "${{ github.event.pull_request.base.sha }}" "${{ github.event.pull_request.head.sha }}"
23+
else
24+
echo "${{ github.event.before }}" "${{ github.sha }}"
25+
fi
2626
) || {
2727
echo
2828
echo "URL lint failed."
@@ -43,11 +43,11 @@ jobs:
4343
timeout: 60
4444
script: |
4545
./scripts/lint_xrefs.sh $(
46-
{ [ "${{ github.event_name }}" = "pull_request" ] \
47-
&& git diff --name-only "${{ github.event.pull_request.base.sha }}...${{ github.event.pull_request.head.sha }}"; } \
48-
|| \
49-
{ [ "${{ github.event_name }}" = "push" ] \
50-
&& git diff --name-only "${{ github.event.before }}...${{ github.sha }}"; }
46+
if [ "${{ github.event_name }}" = "pull_request" ]; then
47+
echo "${{ github.event.pull_request.base.sha }}" "${{ github.event.pull_request.head.sha }}"
48+
else
49+
echo "${{ github.event.before }}" "${{ github.sha }}"
50+
fi
5151
) || {
5252
echo
5353
echo "Xref lint failed."

0 commit comments

Comments
 (0)