From b99d9c092a77ba7c9ab305c5ac41f5e7d21b3d37 Mon Sep 17 00:00:00 2001 From: Anthony Shoumikhin Date: Mon, 5 May 2025 23:03:06 -0700 Subject: [PATCH] Match PyTorch _link_check.yml --- .github/workflows/_link_check.yml | 24 ++++++++++++++++++------ 1 file changed, 18 insertions(+), 6 deletions(-) diff --git a/.github/workflows/_link_check.yml b/.github/workflows/_link_check.yml index 6a9e8272711..39779adc73c 100644 --- a/.github/workflows/_link_check.yml +++ b/.github/workflows/_link_check.yml @@ -12,10 +12,10 @@ jobs: with: runner: linux.2xlarge docker-image: executorch-ubuntu-22.04-linter - submodules: 'none' + submodules: false fetch-depth: 0 ref: ${{ inputs.ref }} - timeout: 90 + timeout: 120 script: | ./scripts/lint_urls.sh $( { [ "${{ github.event_name }}" = "pull_request" ] \ @@ -23,7 +23,13 @@ jobs: || \ { [ "${{ github.event_name }}" = "push" ] \ && git diff --name-only "${{ github.event.before }}...${{ github.sha }}"; } - ) + ) || { + echo + echo "URL lint failed." + echo "If this is a transient outage, you can bypass it by adding the \`skip-url-lint\` label to your PR." + echo "Or add \`@lint-ignore\` somewhere on the same line as the URL you want to skip checking." + exit 1 + } lint-xrefs: if: ${{ github.event_name != 'pull_request' || !contains(github.event.pull_request.labels.*.name, 'skip-xref-lint') }} @@ -31,10 +37,10 @@ jobs: with: runner: linux.2xlarge docker-image: executorch-ubuntu-22.04-linter - submodules: 'none' + submodules: false fetch-depth: 0 ref: ${{ inputs.ref }} - timeout: 90 + timeout: 60 script: | ./scripts/lint_xrefs.sh $( { [ "${{ github.event_name }}" = "pull_request" ] \ @@ -42,4 +48,10 @@ jobs: || \ { [ "${{ github.event_name }}" = "push" ] \ && git diff --name-only "${{ github.event.before }}...${{ github.sha }}"; } - ) + ) || { + echo + echo "Xref lint failed." + echo "If this is a transient outage, you can bypass it by adding the \`skip-xref-lint\` label to your PR." + echo "Or add \`@lint-ignore\` somewhere on the same line as the reference you want to skip checking." + exit 1 + }