diff --git a/.github/workflows/automated-triage.yml b/.github/workflows/automated-triage.yml new file mode 100644 index 00000000..1a1bfba6 --- /dev/null +++ b/.github/workflows/automated-triage.yml @@ -0,0 +1,32 @@ +name: Run automated triage + +on: + workflow_call: + inputs: + similar_issue_text: + 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(needs.getSimilarIssues.outputs.message, '''@') }} # Skip this step if the description contains a string that will break the here document + run: | + $message = @' + ${{ needs.getSimilarIssues.outputs.message }} + '@; + + $maybe_message = "" + if (![string]::IsNullOrEmpty($message) + { + $maybe_message = "--default-message-stdin"; + } + cd triage && echo $message | .\wti.exe --issue 11305 --config config.yml --github-token "${{ secrets.GITHUB_TOKEN }}" --ignore-tags $maybe_message \ No newline at end of file diff --git a/.github/workflows/new_issue.yml b/.github/workflows/new_issue.yml new file mode 100644 index 00000000..95e35c5d --- /dev/null +++ b/.github/workflows/new_issue.yml @@ -0,0 +1,31 @@ +name: Sync GitHub with ADO + +on: + pull_request: # TODO change with issue + +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: + - uses: ./.github/workflows/build.yml + with: + similar_issues_text: ${{ needs.getSimilarIssues.outputs.message }} \ No newline at end of file diff --git a/.github/workflows/config.yml b/triage/config.yml similarity index 94% rename from .github/workflows/config.yml rename to triage/config.yml index 10f97333..add18743 100644 --- a/.github/workflows/config.yml +++ b/triage/config.yml @@ -20,19 +20,21 @@ logs_rules: Once completed please upload the output files to this Github issue. [Click here for more info on logging](https://github.com/microsoft/WSL/blob/master/CONTRIBUTING.md#8-collect-wsl-logs-recommended-method) - If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and add the `emailed-logs` tag to this issue. + If you choose to email these logs instead of attaching to the bug, please send them to wsl-gh-logs@microsoft.com with the number of the github issue in the subject, and in the message a link to your comment in the github issue and reply with '/emailed-logs'. missing_logs_add_tags: ['needs-author-feedback'] skip_tags: ['feature', 'question', 'emailed-logs', 'network'] - tags_rules: - contains: '/question' tag: 'question' - contains: '/feature' tag: 'feature' + + - contains: '/emailed-logs' + tag: 'emailed-logs' rules: - logline: diff --git a/.github/workflows/no-filter.wpaProfile b/triage/no-filter.wpaProfile similarity index 100% rename from .github/workflows/no-filter.wpaProfile rename to triage/no-filter.wpaProfile diff --git a/.github/workflows/wti.exe b/triage/wti.exe similarity index 100% rename from .github/workflows/wti.exe rename to triage/wti.exe diff --git a/.github/workflows/wti.yml b/triage/wti.yml similarity index 100% rename from .github/workflows/wti.yml rename to triage/wti.yml