From 9f5232b18aca7ce3dacc2324bd3dce1410db6651 Mon Sep 17 00:00:00 2001 From: Matt Pollard Date: Mon, 23 Aug 2021 11:04:43 +0200 Subject: [PATCH] Be more careful about finding previous report (#20831) --- .github/workflows/check-all-english-links.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.github/workflows/check-all-english-links.yml b/.github/workflows/check-all-english-links.yml index fd4db9bac9..3ff09a7239 100644 --- a/.github/workflows/check-all-english-links.yml +++ b/.github/workflows/check-all-english-links.yml @@ -62,13 +62,14 @@ jobs: # Link to the previous report from the new report that triggered this # workflow run. - for issue_url in $(gh list-reports \ + previous_report_url=$(gh list-reports \ --state all \ --limit 2 \ --json url \ - --jq '.[].url' | grep -v ${{ env.NEW_REPORT_URL }}); do - gh issue comment ${{ env.NEW_REPORT_URL }} --body "⬅️ [Previous report]($issue_url)" - done + --jq '.[].url' \ + | grep -v ${{ env.NEW_REPORT_URL }} | head -1) + + gh issue comment ${{ env.NEW_REPORT_URL }} --body "⬅️ [Previous report]($previous_report_url)" # Link to the newer report from any older report that is still open, # then close the older report.