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 1/4] 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 From b682a2c948da4c1310d743a7377ae999ac289ee9 Mon Sep 17 00:00:00 2001 From: AG <98327736+ggold7046@users.noreply.github.com> Date: Sun, 3 Dec 2023 20:44:25 +0530 Subject: [PATCH 2/4] Update broken-linkcheck.yml --- .github/workflows/broken-linkcheck.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/broken-linkcheck.yml b/.github/workflows/broken-linkcheck.yml index 350c8ea7b6f0d..f117bedf0022b 100644 --- a/.github/workflows/broken-linkcheck.yml +++ b/.github/workflows/broken-linkcheck.yml @@ -53,7 +53,6 @@ jobs: ``` $(cat linkcheck.txt) - ``` - name: Display broken links From 57f35dedf31f7c590e571fa45132596a7be1a6db Mon Sep 17 00:00:00 2001 From: AG <98327736+ggold7046@users.noreply.github.com> Date: Tue, 5 Dec 2023 00:10:00 +0530 Subject: [PATCH 3/4] Update broken-linkcheck.yml --- .github/workflows/broken-linkcheck.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/broken-linkcheck.yml b/.github/workflows/broken-linkcheck.yml index f117bedf0022b..c24613c82675d 100644 --- a/.github/workflows/broken-linkcheck.yml +++ b/.github/workflows/broken-linkcheck.yml @@ -37,7 +37,8 @@ jobs: uses: dacbd/create-issue-action@main with: token: ${{ secrets.GITHUB_TOKEN }} - title: "Linkcheck Report - $(date +'%Y-%m-%d')" + current_date: $(date +"%Y-%m-%d") + title: "Linkcheck Report - ${{ env.current_date }}" labels: "Docs,Good First Issue,Linkcheck-Report" body: | ### Linkcheck Report @@ -47,7 +48,7 @@ jobs: #### Summary: - Number of Broken Links: X - - Date: $(date +"%Y-%m-%d") + - Date: ${{ env.current_date }} #### Broken Links: From 7a819f67c6309278ce97dba5ab7ea0c1978a1810 Mon Sep 17 00:00:00 2001 From: AG <98327736+ggold7046@users.noreply.github.com> Date: Mon, 18 Dec 2023 15:44:16 +0530 Subject: [PATCH 4/4] Update broken-linkcheck.yml --- .github/workflows/broken-linkcheck.yml | 9 ++++++--- 1 file changed, 6 insertions(+), 3 deletions(-) diff --git a/.github/workflows/broken-linkcheck.yml b/.github/workflows/broken-linkcheck.yml index c24613c82675d..5b9abec1137dc 100644 --- a/.github/workflows/broken-linkcheck.yml +++ b/.github/workflows/broken-linkcheck.yml @@ -26,6 +26,9 @@ jobs: - name: Build Pandas uses: ./.github/actions/build_pandas + - name: Set current date as environment variable + run: echo "CURRENT_DATE=$(date +'%Y-%m-%d')" >> $GITHUB_ENV + - name: Run linkcheck script working-directory: ./doc run: | @@ -33,12 +36,12 @@ jobs: python make.py linkcheck | tee linkcheck.txt - name: Create or Update Linkcheck Issue - if: github.event_name == 'schedule' + if: failure() && github.event_name == 'schedule' uses: dacbd/create-issue-action@main with: token: ${{ secrets.GITHUB_TOKEN }} current_date: $(date +"%Y-%m-%d") - title: "Linkcheck Report - ${{ env.current_date }}" + title: "Linkcheck Report - ${{ env.CURRENT_DATE }}" labels: "Docs,Good First Issue,Linkcheck-Report" body: | ### Linkcheck Report @@ -48,7 +51,7 @@ jobs: #### Summary: - Number of Broken Links: X - - Date: ${{ env.current_date }} + - Date: ${{ env.CURRENT_DATE }} #### Broken Links: