From 5c4b02d0475e81e8503a736f00b6d350d488a915 Mon Sep 17 00:00:00 2001 From: Jesse Szwedko Date: Fri, 24 Mar 2023 08:00:28 -0700 Subject: [PATCH] Revert "chore(dev): Re-triage done issues with new comment (#15720)" This reverts commit 3c03350cf6b9c4a2eeffb39be46e0120e2680baa. --- .github/workflows/gardener_issue_comment.yml | 66 -------------------- 1 file changed, 66 deletions(-) delete mode 100644 .github/workflows/gardener_issue_comment.yml diff --git a/.github/workflows/gardener_issue_comment.yml b/.github/workflows/gardener_issue_comment.yml deleted file mode 100644 index 1267271bdc672..0000000000000 --- a/.github/workflows/gardener_issue_comment.yml +++ /dev/null @@ -1,66 +0,0 @@ -on: - issue_comment: - types: - - created - -jobs: - move-to-backlog: - name: Move done issues back to Gardener project board backlog - runs-on: ubuntu-latest - steps: - - name: Move issue back to backlog if status is Done - run: | - # ids fetched from https://docs.github.com/en/graphql/overview/explorer - project_id="PVT_kwDOAQFeYs4AAsTr" # Gardener - issue_id=${{ github.event.issue.node_id }} - status_field_id="PVTSSF_lADOAQFeYs4AAsTrzgAXRuU" # Status - backlog_option_id="f75ad846" # Backlog - - # ensures that the issue is already on board but also seems to be the only way to fetch - # the item id - item_id="$(gh api graphql -f query=' - mutation($project_id: ID!, $content_id: ID!) { - addProjectV2ItemById(input: {projectId: $project_id, contentId: $content_id}) { - item { - id - } - } - }' -f project_id="$project_id" -f content_id="$issue_id" -q '.data.addProjectV2ItemById.item.id' - ") - - current_status="$(gh api graphql -f query=' - query($node_id: ID!) { - node(id: $item_id) { - ... on ProjectV2Item { - fieldValueByName(name: "Status") { - ... on ProjectV2ItemFieldSingleSelectValue { - name - } - } - } - } - }' - ") -f item_id="$item_id" -q '.data.node.fieldValueByName.name' - - if [[ "$current_status" = "Done" ]] ; then - echo "Moving issue from Done to Backlog" - gh api graphql -f query=' - mutation($project_id: ID!, $item_id: ID!, $field_id: ID!, $option_id: String) { - updateProjectV2ItemFieldValue( - input: { - projectId: $project_id - itemId: $item_id - fieldId: $field_id - value: { - singleSelectOptionId: $option_id - } - } - ) { - projectV2Item { - id - } - } - }' -f project_id="$project_id" -f item_id="$item_id" -f field_id="$status_field_id" -f option_id="$backlog_option_id" - else - echo "Issue already in $current_status" - fi