mirror of
https://github.com/microsoft/WSL.git
synced 2025-12-10 17:47:59 -06:00
Add logic to process new logs when an issue is edited (#11544)
* Add logic to review edited issues if log files were added * Add workflow * yaml * yaml * yaml * yaml * yaml
This commit is contained in:
parent
a873439107
commit
676a8c9f2b
16
.github/actions/triage/action.yml
vendored
16
.github/actions/triage/action.yml
vendored
@ -14,6 +14,9 @@ inputs:
|
||||
token:
|
||||
required: false
|
||||
type: string
|
||||
previous_body:
|
||||
required: false
|
||||
type: string
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
@ -21,6 +24,8 @@ runs:
|
||||
- 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 = @'
|
||||
@ -39,6 +44,13 @@ runs:
|
||||
$maybe_comment = @("--comment", "${{ inputs.comment }}")
|
||||
}
|
||||
|
||||
curl.exe -L https://github.com/OneBlue/wti/releases/download/v0.1.7/wti.exe -o triage/wti.exe
|
||||
$maybe_previous_body = @()
|
||||
if (![string]::IsNullOrEmpty("$env:previous_body"))
|
||||
{
|
||||
$env:previous_body | Out-File -Encoding utf8 "triage\previous_body.txt"
|
||||
$maybe_previous_body = @("--previous-issue-body", "previous_body.txt")
|
||||
}
|
||||
|
||||
cd triage && echo -n $message | .\wti.exe --issue ${{ inputs.issue }} --config config.yml --github-token "${{ inputs.token }}" --ignore-tags @maybe_message @maybe_comment
|
||||
curl.exe -L https://github.com/OneBlue/wti/releases/download/v0.1.8/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
|
||||
40
.github/workflows/issue_edited.yml
vendored
Normal file
40
.github/workflows/issue_edited.yml
vendored
Normal file
@ -0,0 +1,40 @@
|
||||
name: Process edited issue
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
issues:
|
||||
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
|
||||
steps:
|
||||
- name: Checkout repo
|
||||
uses: actions/checkout@v4
|
||||
|
||||
- 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 }}
|
||||
Loading…
x
Reference in New Issue
Block a user