From 586133a2ace6dd4df6ff0b16665ba6a6f36ce4e7 Mon Sep 17 00:00:00 2001 From: Matt Pollard Date: Tue, 7 Sep 2021 19:16:55 +0200 Subject: [PATCH] Remove old broken link report from Docs Content's first responder project board (#21325) --- .github/workflows/check-all-english-links.yml | 29 ++++++++++--------- 1 file changed, 16 insertions(+), 13 deletions(-) diff --git a/.github/workflows/check-all-english-links.yml b/.github/workflows/check-all-english-links.yml index 4f0ed40b90..476919d821 100644 --- a/.github/workflows/check-all-english-links.yml +++ b/.github/workflows/check-all-english-links.yml @@ -16,6 +16,7 @@ jobs: runs-on: ubuntu-latest env: GITHUB_TOKEN: ${{ secrets.DOCUBOT_FR_PROJECT_BOARD_WORKFLOWS_REPO_ORG_READ_SCOPES }} + FIRST_RESPONDER_PROJECT: Docs content first responder REPORT_AUTHOR: docubot REPORT_LABEL: broken link report REPORT_REPOSITORY: github/docs-content @@ -80,19 +81,6 @@ jobs: 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. - - for issue_url in $(gh list-reports \ - --search 'no:assignee' \ - --json url \ - --jq '.[].url'); do - if [ "$issue_url" != "${{ env.NEW_REPORT_URL }}" ]; then - gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})" - gh issue close $issue_url - fi - done - # If an old report is open and assigned to someone, link to the newer # report without closing the old report. @@ -103,3 +91,18 @@ jobs: gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})" fi done + + # Link to the newer report from any older report that is still open, + # then close the older report and remove it from the first responder's + # project board. + + for issue_url in $(gh list-reports \ + --search 'no:assignee' \ + --json url \ + --jq '.[].url'); do + if [ "$issue_url" != "${{ env.NEW_REPORT_URL }}" ]; then + gh issue comment $issue_url --body "➡️ [Newer report](${{ env.NEW_REPORT_URL }})" + gh issue close $issue_url + gh issue edit $issue_url --remove-project "${{ env.FIRST_RESPONDER_PROJECT }}" + fi + done