From d79e88ae9b480ca7d3e890d144ea039811995a54 Mon Sep 17 00:00:00 2001 From: Blue Date: Wed, 20 Mar 2024 16:44:23 -0700 Subject: [PATCH] Test integration --- .github/workflows/automated-triage.yml | 45 ------------------------- .github/workflows/new_issue.yml | 13 ++++--- .github/workflows/new_issue_comment.yml | 12 ++++--- 3 files changed, 16 insertions(+), 54 deletions(-) delete mode 100644 .github/workflows/automated-triage.yml diff --git a/.github/workflows/automated-triage.yml b/.github/workflows/automated-triage.yml deleted file mode 100644 index 906ad7b2..00000000 --- a/.github/workflows/automated-triage.yml +++ /dev/null @@ -1,45 +0,0 @@ -name: Run automated triage - -on: - workflow_call: - inputs: - issue: - required: false - type: string - similar_issue_text: - required: false - type: string - comment: - required: false - type: string - -jobs: - wti: - name: Run wti - runs-on: windows-2022 - permissions: - issues: write - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: 'Run WTI' - if: ${{ !contains(inputs.similar_issue_text, '''@') }} # Skip this step if the description contains a string that will break the here document - run: | - $message = @' - ${{ inputs.similar_issue_text }} - '@; - - $maybe_message = "" - if (![string]::IsNullOrEmpty($message) - { - $maybe_message = "--default-message-stdin"; - } - - $maybe_comment = @() - if (![string]::IsNullOrEmpty("${{ inputs.comment }}")) - { - $maybe_comment = @("--comment", "--${{ inputs.comment }}") - } - - cd wsl\triage && echo $message | .\wti.exe --issue ${{ inputs.issue }} --config config.yml --github-token "${{ secrets.GITHUB_TOKEN }}" --ignore-tags $maybe_message @maybe_comment \ No newline at end of file diff --git a/.github/workflows/new_issue.yml b/.github/workflows/new_issue.yml index 6d27148c..29f364f5 100644 --- a/.github/workflows/new_issue.yml +++ b/.github/workflows/new_issue.yml @@ -18,14 +18,17 @@ jobs: repository: ${{ github.repository }} similarityTolerance: "0.1" # Lowered value for testing commentBody: Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one and thumbs upping the other issue to help us prioritize it! - wti: name: Run wti needs: getSimilarIssues runs-on: windows-2022 permissions: issues: write - uses: ./.github/workflows/automated-triage.yml - with: - similar_issues_text: "${{ needs.getSimilarIssues.outputs.message }}" - issue: 11305 \ No newline at end of file + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - uses: ./.github/actions/triage + with: + similar_issues_text: "${{ needs.getSimilarIssues.outputs.message }}" + issue: '11305' \ No newline at end of file diff --git a/.github/workflows/new_issue_comment.yml b/.github/workflows/new_issue_comment.yml index 14f8914a..e490d881 100644 --- a/.github/workflows/new_issue_comment.yml +++ b/.github/workflows/new_issue_comment.yml @@ -9,7 +9,11 @@ jobs: runs-on: windows-2022 permissions: issues: write - uses: ./.github/workflows/automated-triage.yml - with: - comment: '2010845646' - issue: '11306' \ No newline at end of file + steps: + - name: Checkout repo + uses: actions/checkout@v4 + + - uses: ./.github/actions/triage + with: + issue: '11306' + comment: '2010845646' \ No newline at end of file