From 58a6fc522c980af438421e1f8aeb7149f3b45db8 Mon Sep 17 00:00:00 2001 From: Tabatha Zeitke Date: Tue, 27 Aug 2024 11:44:43 -0500 Subject: [PATCH] chore: remove redundant workflow step - this is hooked up to an old board (project 67) - writers are using UI workflow settings for their new board (project 108) - this is causing both projects to now be added to PRs and issues --- .github/workflows/issue-triage.yml | 34 ++++++++---------------------- .github/workflows/pr-triage.yml | 15 ------------- 2 files changed, 9 insertions(+), 40 deletions(-) diff --git a/.github/workflows/issue-triage.yml b/.github/workflows/issue-triage.yml index fab1459db41..9789fd35d4b 100644 --- a/.github/workflows/issue-triage.yml +++ b/.github/workflows/issue-triage.yml @@ -9,21 +9,6 @@ env: COLUMN_NAME: Hero to triage # column where issues will be created jobs: - content_project: - runs-on: ubuntu-latest - env: - PROJECT_ID: 11873277 - PROJECT_NAME: Docs PRs and Issues - name: Triage to Content Project - steps: - - name: Triages NEW issues to the Content Project - if: github.event.action == 'opened' - run: | - HEADER="Accept: application/vnd.github.inertia-preview+json" - ISSUE_ID=${{ github.event.issue.id }} - COLUMN=$(gh api -H "$HEADER" projects/$PROJECT_ID/columns --jq ".[] | select(.name == \"$COLUMN_NAME\").id") - gh api -H "$HEADER" -X POST projects/columns/$COLUMN/cards -f content_type='Issue' -F content_id=$ISSUE_ID - localization_project: runs-on: ubuntu-latest env: @@ -31,13 +16,12 @@ jobs: PROJECT_NAME: Docs Site Localization PRs and Issues name: Triage to Localization Project steps: - - name: Triages NEW issues to the Localization Project - if: | - github.event.action == 'labeled' && - contains(github.event.issue.labels.*.name, 'localization') - run: | - HEADER="Accept: application/vnd.github.inertia-preview+json" - ISSUE_ID=${{ github.event.issue.id }} - COLUMN=$(gh api -H "$HEADER" projects/$PROJECT_ID/columns --jq ".[] | select(.name == \"$COLUMN_NAME\").id") - gh api -H "$HEADER" -X POST projects/columns/$COLUMN/cards -f content_type='Issue' -F content_id=$ISSUE_ID - + - name: Triages NEW issues to the Localization Project + if: | + github.event.action == 'labeled' && + contains(github.event.issue.labels.*.name, 'localization') + run: | + HEADER="Accept: application/vnd.github.inertia-preview+json" + ISSUE_ID=${{ github.event.issue.id }} + COLUMN=$(gh api -H "$HEADER" projects/$PROJECT_ID/columns --jq ".[] | select(.name == \"$COLUMN_NAME\").id") + gh api -H "$HEADER" -X POST projects/columns/$COLUMN/cards -f content_type='Issue' -F content_id=$ISSUE_ID diff --git a/.github/workflows/pr-triage.yml b/.github/workflows/pr-triage.yml index edca034e207..ebc056b877b 100644 --- a/.github/workflows/pr-triage.yml +++ b/.github/workflows/pr-triage.yml @@ -9,21 +9,6 @@ env: COLUMN_NAME: Hero to triage # column where issues will be created jobs: - content_project: - name: pr added to the docs github board (optional) - runs-on: ubuntu-latest - env: - PROJECT_ID: 11873277 - PROJECT_NAME: Docs PRs and Issues - steps: - - name: Triages NEW pull requests to the Content Project - if: github.event.action == 'opened' - run: | - HEADER="Accept: application/vnd.github.inertia-preview+json" - PR_ID=${{ github.event.pull_request.id }} - COLUMN=$(gh api -H "$HEADER" projects/$PROJECT_ID/columns --jq ".[] | select(.name == \"$COLUMN_NAME\").id") - gh api -H "$HEADER" -X POST projects/columns/$COLUMN/cards -f content_type='PullRequest' -F content_id=$PR_ID - localization_project: name: pr added to the localization github board (optional) runs-on: ubuntu-latest