-
Notifications
You must be signed in to change notification settings - Fork 822
45 lines (39 loc) · 1.33 KB
/
automated-triage.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
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