From a75ed291db19432814aceb35061f346d871b4ff3 Mon Sep 17 00:00:00 2001 From: Svetlana Karslioglu Date: Tue, 29 Oct 2024 13:57:25 -0700 Subject: [PATCH] Add a condition to skip linkcheck In some cases, like in this [PR](https://github.com/pytorch/tutorials/pull/3125), we might be adding links in the PR that don't yet exist and that will be added with that current PR. We should have an ability to skip linkcheck for cases like this. This PR adds a condition to skip link check if a label skip-link-check is added. --- .github/workflows/link_checkPR.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.github/workflows/link_checkPR.yml b/.github/workflows/link_checkPR.yml index 58612bf2586..769984cd732 100644 --- a/.github/workflows/link_checkPR.yml +++ b/.github/workflows/link_checkPR.yml @@ -7,6 +7,7 @@ on: branches: [main] jobs: linkChecker: + if: "!contains(github.event.pull_request.labels.*.name, 'skip-link-check')" runs-on: ubuntu-latest steps: - uses: actions/checkout@v4