From 81afa77f3b095feb13d08148865f2598ed63bbc9 Mon Sep 17 00:00:00 2001 From: AG <98327736+ggold7046@users.noreply.github.com> Date: Sun, 3 Dec 2023 20:03:46 +0530 Subject: [PATCH] Update broken-linkcheck.yml #45409 A Github Action to run the Sphinx linkcheck monthly to check link errors. If errors are found, the GIthub Action creates a new issue, (and delete the old one) reporting all the errors, and label as Docs and Good First Issue --- .github/workflows/broken-linkcheck.yml | 26 +++++++++++++++++++++++++- 1 file changed, 25 insertions(+), 1 deletion(-) diff --git a/.github/workflows/broken-linkcheck.yml b/.github/workflows/broken-linkcheck.yml index 10ab5b08a4437..350c8ea7b6f0d 100644 --- a/.github/workflows/broken-linkcheck.yml +++ b/.github/workflows/broken-linkcheck.yml @@ -32,7 +32,31 @@ jobs: set -o pipefail python make.py linkcheck | tee linkcheck.txt + - name: Create or Update Linkcheck Issue + if: github.event_name == 'schedule' + uses: dacbd/create-issue-action@main + with: + token: ${{ secrets.GITHUB_TOKEN }} + title: "Linkcheck Report - $(date +'%Y-%m-%d')" + labels: "Docs,Good First Issue,Linkcheck-Report" + body: | + ### Linkcheck Report + + This issue is automatically created or updated to report broken links found during the linkcheck process. + + #### Summary: + + - Number of Broken Links: X + - Date: $(date +"%Y-%m-%d") + + #### Broken Links: + + ``` + $(cat linkcheck.txt) + + ``` + - name: Display broken links - if: failure() + if: failure() && github.event_name == 'schedule' working-directory: ./doc run: grep broken linkcheck.txt