Skip to content

Commit 8e8b3a5

Browse files
fix broken-link-checker workflow bugs (#5468)
- rename job IDs from broken-lint-checker to broken-link-checker (typo) - fix buffer-size from INT32_MAX (2147483647) to 8MB (8388608) - fix corrupted --exclude regex containing embedded markdown artifact - fix [A-z] character class to [A-Za-z] in exclude regex - escape literal dots in version number pattern in exclude regex - escape dot in github.com in i18n exclude pattern - simplify redundant if condition - add timeout-minutes: 45 Fixes #2814 Signed-off-by: mishalshanavas <mishalshanavas8@gmail.com>
1 parent 800f043 commit 8e8b3a5

1 file changed

Lines changed: 13 additions & 16 deletions

File tree

Lines changed: 13 additions & 16 deletions
Original file line numberDiff line numberDiff line change
@@ -1,26 +1,23 @@
11
# Copyright the Hyperledger Fabric contributors. All rights reserved.
22
#
33
# SPDX-License-Identifier: Apache-2.0
4-
54
name: "Broken Link Checker"
6-
75
on:
86
workflow_dispatch:
97
schedule:
108
- cron: "50 1 * * *"
119
pull_request:
1210
paths:
1311
- .github/workflows/broken-link-checker.yml
14-
1512
permissions:
1613
contents: read
17-
1814
jobs:
19-
broken-lint-checker:
15+
broken-link-checker:
2016
# Only run the scheduled job in hyperledger/fabric repository, not on personal forks
21-
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'hyperledger/fabric')
17+
if: github.event_name != 'schedule' || github.repository == 'hyperledger/fabric'
2218
name: "main"
2319
runs-on: ${{ github.repository == 'hyperledger/fabric' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
20+
timeout-minutes: 45
2421
steps:
2522
- name: Check Broken Links with Muffet
2623
# Exclude any links that direct to the documentation or release notes of the non-latest version to limit the scanning to target to that of the latest version.
@@ -35,17 +32,17 @@ jobs:
3532
--skip-tls-verification \
3633
--max-connections-per-host=1 \
3734
--timeout=120 \
38-
--buffer-size=2147483647 \
35+
--buffer-size=8388608 \
3936
--color=always \
40-
--exclude="^(https:\/\/hyperledger-fabric.readthedocs.io\/([A-z_]+\/(v[\d]+.[\d]+.[\d]+|release)|(es|fa|fr|it|ja|ko|ml|pt|ru|vi|zh-cn|zh_CN)\/latest)).*$" \
41-
--exclude="https://github.com/YOURGITHUBID/fabric-docs-i18n/pull/new/newtranslation" \
37+
--exclude="^(https:\/\/hyperledger-fabric\.readthedocs\.io\/([A-Za-z_]+\/(v[\d]+\.[\d]+\.[\d]+|release)|(es|fa|fr|it|ja|ko|ml|pt|ru|vi|zh-cn|zh_CN)\/latest)).*$" \
38+
--exclude="https://github\.com/YOURGITHUBID/fabric-docs-i18n/pull/new/newtranslation" \
4239
https://hyperledger-fabric.readthedocs.io/en/latest/
43-
44-
broken-lint-checker-25:
40+
broken-link-checker-25:
4541
# Only run the scheduled job in hyperledger/fabric repository, not on personal forks
46-
if: github.event_name != 'schedule' || (github.event_name == 'schedule' && github.repository == 'hyperledger/fabric')
42+
if: github.event_name != 'schedule' || github.repository == 'hyperledger/fabric'
4743
name: "release-2.5"
4844
runs-on: ${{ github.repository == 'hyperledger/fabric' && 'fabric-ubuntu-22.04' || 'ubuntu-22.04' }}
45+
timeout-minutes: 45
4946
steps:
5047
- name: Check Broken Links with Muffet
5148
# Exclude any links that direct to the documentation or release notes of the non-release-2.5 version to limit the scanning to target to that of the release-2.5 version.
@@ -60,8 +57,8 @@ jobs:
6057
--skip-tls-verification \
6158
--max-connections-per-host=1 \
6259
--timeout=120 \
63-
--buffer-size=2147483647 \
60+
--buffer-size=8388608 \
6461
--color=always \
65-
--exclude="^(https:\/\/hyperledger-fabric.readthedocs.io\/[A-z_]+\/(v[\d]+.[\d]+.[\d]+|release-1.4|release-2.0|release-2.1|release-2.2|release-2.3|latest)).*$" \
66-
--exclude="https://github.com/YOURGITHUBID/fabric-docs-i18n/pull/new/newtranslation" \
67-
https://hyperledger-fabric.readthedocs.io/en/release-2.5/
62+
--exclude="^(https:\/\/hyperledger-fabric\.readthedocs\.io\/[A-Za-z_]+\/(v[\d]+\.[\d]+\.[\d]+|release-1\.4|release-2\.0|release-2\.1|release-2\.2|release-2\.3|latest)).*$" \
63+
--exclude="https://github\.com/YOURGITHUBID/fabric-docs-i18n/pull/new/newtranslation" \
64+
https://hyperledger-fabric.readthedocs.io/en/release-2.5/

0 commit comments

Comments
 (0)