From b71bbf89ce14936809c734c801b6722cef9616bd Mon Sep 17 00:00:00 2001 From: Kayla Cinnamon Date: Wed, 3 Sep 2025 10:25:43 -0700 Subject: [PATCH] Fix the dedup workflow so it actually works (#41580) ## Summary of the Pull Request Had some bad syntax in the first iteration, tested this on my fork and it adds the "duplicate" label and comments which issues it's a dup of. image ## PR Checklist - [ ] Closes: #xxx - [ ] **Communication:** I've discussed this with core contributors already. If the work hasn't been agreed, this work might be rejected - [ ] **Tests:** Added/updated and all pass - [ ] **Localization:** All end-user-facing strings can be localized - [ ] **Dev docs:** Added/updated - [ ] **New binaries:** Added on the required places - [ ] [JSON for signing](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ESRPSigning_core.json) for new binaries - [ ] [WXS for installer](https://github.com/microsoft/PowerToys/blob/main/installer/PowerToysSetup/Product.wxs) for new binaries and localization folder - [ ] [YML for CI pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/ci/templates/build-powertoys-steps.yml) for new test projects - [ ] [YML for signed pipeline](https://github.com/microsoft/PowerToys/blob/main/.pipelines/release.yml) - [ ] **Documentation updated:** If checked, please file a pull request on [our docs repo](https://github.com/MicrosoftDocs/windows-uwp/tree/docs/hub/powertoys) and link it here: #xxx ## Detailed Description of the Pull Request / Additional comments ## Validation Steps Performed --- .github/actions/spell-check/expect.txt | 1 + .../manual-batch-issue-deduplication.yml | 40 ++++++++++++++----- 2 files changed, 30 insertions(+), 11 deletions(-) diff --git a/.github/actions/spell-check/expect.txt b/.github/actions/spell-check/expect.txt index d91889e239..e9dd5f40e3 100644 --- a/.github/actions/spell-check/expect.txt +++ b/.github/actions/spell-check/expect.txt @@ -330,6 +330,7 @@ Deact debugbreak decryptor Dedup +Deduplicator Deeplink DEFAULTBOOTSTRAPPERINSTALLFOLDER DEFAULTCOLOR diff --git a/.github/workflows/manual-batch-issue-deduplication.yml b/.github/workflows/manual-batch-issue-deduplication.yml index 198d2accbd..d02dc2e282 100644 --- a/.github/workflows/manual-batch-issue-deduplication.yml +++ b/.github/workflows/manual-batch-issue-deduplication.yml @@ -1,20 +1,38 @@ name: Manual Batch Issue Deduplication on: - workflow_dispatch: # Only runs when manually triggered + workflow_dispatch: + inputs: + issue_numbers: + description: "JSON array of issue numbers to deduplicate (e.g. [101,102,103])" + required: true + since: + description: "Only compare against issues created after this date (ISO 8601, e.g. 2019-05-05T00:00:00Z)" + required: false + default: "2019-05-05T00:00:00Z" + label_as_duplicate: + description: "Apply duplicate label if duplicates are found (true/false)" + required: false + default: "true" + +permissions: + models: read + issues: write jobs: - batch-deduplicate: + deduplicate: runs-on: ubuntu-latest + strategy: + matrix: + issue: ${{ fromJson(github.event.inputs.issue_numbers) }} steps: - - name: Batch Deduplicate Issues + - name: Checkout + uses: actions/checkout@v3 + + - name: Run GenAI Issue Deduplicator uses: pelikhan/action-genai-issue-dedup@v0 with: - github-token: ${{ secrets.GITHUB_TOKEN }} - label-duplicate: "potential duplicate" - comment-duplicate: true - close-duplicate: false - batch-size: 100 - since: '2019-05-05T00:00:00Z' # Process issues dating back to 2019 - duplicate-comment-template: "This issue appears to be a duplicate of #{duplicate_issue_number}." - # Add other action-specific inputs if needed + github_token: ${{ secrets.GITHUB_TOKEN }} + github_issue: ${{ matrix.issue }} + label_as_duplicate: ${{ github.event.inputs.label_as_duplicate }} +