From 22630f4c3dea18485b326256ef3ca4c98a561f90 Mon Sep 17 00:00:00 2001 From: bhavyaus Date: Tue, 17 Dec 2024 22:30:40 -0800 Subject: [PATCH] Add duplicate issue labels and remove obsolete workflow --- .github/commands.json | 45 +++++++++++++++++++++++++++++++++++++ .github/workflows/label.yml | 35 ----------------------------- 2 files changed, 45 insertions(+), 35 deletions(-) delete mode 100644 .github/workflows/label.yml diff --git a/.github/commands.json b/.github/commands.json index c25d821..5ea2ba2 100644 --- a/.github/commands.json +++ b/.github/commands.json @@ -156,5 +156,50 @@ "addLabel": "info-needed", "removeLabel": "~confirmation-needed", "comment": "Please diagnose the root cause of the issue by running the command `F1 > Help: Troubleshoot Issue` and following the instructions. Once you have done that, please update the issue with the results.\n\nHappy Coding!" + }, + { + "type": "label", + "name": "~rate-limiting", + "addLabel": "rate-limiting", + "removeLabel": "~rate-limiting", + "action": "close", + "reason": "not_planned", + "comment": "This issue is a duplicate of https://github.com/microsoft/vscode-copilot-release/issues/2627. Please refer to that issue for updates and discussions. Feel free to open a new issue if you think this is a different problem." + }, + { + "type": "label", + "name": "~rai-content-filters", + "addLabel": "rai-content-filters", + "removeLabel": "~rai-content-filters", + "action": "close", + "reason": "not_planned", + "comment": "This issue is a duplicate of https://github.com/microsoft/vscode-copilot-release/issues/2625. Please refer to that issue for updates and discussions. Feel free to open a new issue if you think this is a different problem." + }, + { + "type": "label", + "name": "~public-code-blocking", + "addLabel": "public-code-blocking", + "removeLabel": "~public-code-blocking", + "action": "close", + "reason": "not_planned", + "comment": "This issue is a duplicate of https://github.com/microsoft/vscode-copilot-release/issues/2626. Please refer to that issue for updates and discussions. Feel free to open a new issue if you think this is a different problem." + }, + { + "type": "label", + "name": "~infinite-response-loop", + "addLabel": "infinite-response-loop", + "removeLabel": "~infinite-response-loop", + "action": "close", + "reason": "not_planned", + "comment": "This issue is a duplicate of https://github.com/microsoft/vscode-copilot-release/issues/2628. Please refer to that issue for updates and discussions. Feel free to open a new issue if you think this is a different problem." + }, + { + "type": "label", + "name": "~lm-unavailable", + "addLabel": "lm-unavailable", + "removeLabel": "~lm-unavailable", + "action": "close", + "reason": "not_planned", + "comment": "This issue is a duplicate of https://github.com/microsoft/vscode-copilot-release/issues/2116. Please refer to that issue for updates and discussions. Feel free to open a new issue if you think this is a different problem." } ] diff --git a/.github/workflows/label.yml b/.github/workflows/label.yml deleted file mode 100644 index b9aabe9..0000000 --- a/.github/workflows/label.yml +++ /dev/null @@ -1,35 +0,0 @@ -name: Label Duplicate - -on: - issues: - types: [labeled] - -permissions: - issues: write - -jobs: - close_and_mark_duplicate: - runs-on: ubuntu-latest - steps: - - name: Close and Mark as Duplicate - if: ${{ github.event.label.name == '~rate-limiting' || github.event.label.name == '~rai-content-filters' || github.event.label.name == '~public-code-blocking' || github.event.label.name == '~infinite-response-loop' || github.event.label.name == '~lm-unavailable' }} - run: | - declare -A label_to_issue_map=( - ["~rate-limiting"]="2627" - ["~rai-content-filters"]="2625" - ["~public-code-blocking"]="2626" - ["~infinite-response-loop"]="2628" - ["~lm-unavailable"]="2116" - ) - - label_name="${{ github.event.label.name }}" - duplicate_issue_number="${label_to_issue_map[$label_name]}" - duplicate_issue_url="https://github.com/microsoft/vscode-copilot-release/issues/${duplicate_issue_number}" - gh issue comment ${{ github.event.issue.number }} --body "This issue is a duplicate of ${duplicate_issue_url}. Please refer to that issue for updates and discussions. Feel free to open a new issue if you think this is a different problem." --repo ${{ github.repository }} - gh issue edit ${{ github.event.issue.number }} --add-label "duplicate" --repo ${{ github.repository }} - gh issue edit ${{ github.event.issue.number }} --remove-label "${{ github.event.label.name }}" --repo ${{ github.repository }} - new_label="${label_name#\~}" - gh issue edit ${{ github.event.issue.number }} --add-label "${new_label}" --repo ${{ github.repository }} - gh issue close ${{ github.event.issue.number }} --reason "not planned" --repo ${{ github.repository }} - env: - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file