diff --git a/.github/actions/triage/action.yml b/.github/actions/triage/action.yml index 7ace051..448129e 100644 --- a/.github/actions/triage/action.yml +++ b/.github/actions/triage/action.yml @@ -5,9 +5,6 @@ inputs: issue: required: false type: string - similar_issues_text: - required: false - type: string comment: required: false type: string @@ -22,21 +19,11 @@ runs: using: "composite" steps: - name: 'Run WTI' - if: ${{ !contains(inputs.similar_issues_text, '''@') }} # Skip this step if the description contains a string that will break the here document shell: pwsh env: previous_body: "${{ inputs.previous_body }}" run: | $ErrorActionPreference = [System.Management.Automation.ActionPreference]::Stop - $message = @' - ${{ inputs.similar_issues_text }} - '@ - - $maybe_message = @() - if (![string]::IsNullOrEmpty($message)) - { - $maybe_message = @("--default-message-stdin") - } $maybe_comment = @() if (![string]::IsNullOrEmpty("${{ inputs.comment }}")) @@ -53,4 +40,4 @@ runs: curl.exe -L https://github.com/OneBlue/wti/releases/download/v0.1.12/wti.exe -o triage/wti.exe - cd triage && echo -n $message | .\wti.exe --issue ${{ inputs.issue }} --config config.yml --github-token "${{ inputs.token }}" --ignore-tags @maybe_message @maybe_comment @maybe_previous_body \ No newline at end of file + cd triage && .\wti.exe --issue ${{ inputs.issue }} --config config.yml --github-token "${{ inputs.token }}" --ignore-tags @maybe_comment @maybe_previous_body \ No newline at end of file diff --git a/.github/workflows/issue_edited.yml b/.github/workflows/issue_edited.yml index 6518963..75027b8 100644 --- a/.github/workflows/issue_edited.yml +++ b/.github/workflows/issue_edited.yml @@ -6,25 +6,8 @@ on: types: [edited] jobs: - getSimilarIssues: - runs-on: ubuntu-latest - outputs: - message: ${{ steps.getBody.outputs.message }} - steps: - - uses: actions/checkout@v2 - - id: getBody - uses: craigloewen-msft/GitGudSimilarIssues@main - with: - issueTitle: ${{ github.event.issue.title }} - issueBody: ${{ github.event.issue.body }} - repository: ${{ github.repository }} - similarityTolerance: "0.7" - commentBody: | - # View similar issues - 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 @@ -34,7 +17,6 @@ jobs: - uses: ./.github/actions/triage with: - similar_issues_text: "${{ needs.getSimilarIssues.outputs.message }}" issue: "${{ github.event.issue.number }}" previous_body: "${{ github.event.changes.body.from }}" token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/.github/workflows/new_issue.yml b/.github/workflows/new_issue.yml index 2a7a514..4e81edf 100644 --- a/.github/workflows/new_issue.yml +++ b/.github/workflows/new_issue.yml @@ -6,27 +6,9 @@ on: types: [opened] jobs: - getSimilarIssues: - runs-on: ubuntu-latest - outputs: - message: ${{ steps.getBody.outputs.message }} - steps: - - uses: actions/checkout@v2 - - id: getBody - uses: craigloewen-msft/GitGudSimilarIssues@main - with: - issueTitle: ${{ github.event.issue.title }} - issueBody: ${{ github.event.issue.body }} - repository: ${{ github.repository }} - similarityTolerance: "0.7" - commentBody: | - # View similar issues - 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 - if: 'always()' # Run even if getSimilarIssues fails permissions: issues: write steps: @@ -35,6 +17,5 @@ jobs: - uses: ./.github/actions/triage with: - similar_issues_text: "${{ needs.getSimilarIssues.outputs.job_status == 'success' && needs.getSimilarIssues.outputs.message || '' }}" issue: "${{ github.event.issue.number }}" token: ${{ secrets.GITHUB_TOKEN }} \ No newline at end of file diff --git a/triage/wti.yml b/triage/wti.yml deleted file mode 100644 index eb0aee3..0000000 --- a/triage/wti.yml +++ /dev/null @@ -1,37 +0,0 @@ -name: Sync GitHub with ADO - -on: - pull_request: - -jobs: - getSimilarIssues: - runs-on: ubuntu-latest - outputs: - message: ${{ steps.getBody.outputs.message }} - steps: - - uses: actions/checkout@v2 - - id: getBody - uses: craigloewen-msft/GitGudSimilarIssues@main - with: - issueTitle: "Cannot install WSL on latest Windows Insider dev build" # Hardcoded for testing - issueBody: "Cannot install WSL on latest Windows Insider dev build" # Hardcoded for testing - 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 - steps: - - name: Checkout repo - uses: actions/checkout@v4 - - - name: 'Run WTI' - if: ${{ !contains(needs.getSimilarIssues.outputs.message, '''@') }} # Skip this step if the description contains a string that will break the here document - run: | - cd .github\workflows && echo @' - ${{ needs.getSimilarIssues.outputs.message }} - '@ | .\wti.exe --issue 11305 --config config.yml --github-token "${{ secrets.GITHUB_TOKEN }}" --ignore-tags --default-message-stdin \ No newline at end of file