Skip to content

Commit

Permalink
Test integration
Browse files Browse the repository at this point in the history
  • Loading branch information
OneBlue committed Mar 20, 2024
1 parent f600762 commit 8356b5e
Show file tree
Hide file tree
Showing 2 changed files with 19 additions and 5 deletions.
19 changes: 16 additions & 3 deletions .github/workflows/automated-triage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,15 @@ 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:
Expand All @@ -18,15 +24,22 @@ jobs:
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
if: ${{ !contains(inputs.similar_issue_text, '''@') }} # Skip this step if the description contains a string that will break the here document
run: |
$message = @'
${{ needs.getSimilarIssues.outputs.message }}
${{ inputs.similar_issue_text }}
'@;
$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
$maybe_comment = @()
if (![string]::IsNullOrEmpty("${{ inputs.comment }}"))
{
$maybe_comment = @("--comment", "--${{ inputs.comment }}")
}
cd triage && echo $message | .\wti.exe --issue ${{ inputs.issue }} --config config.yml --github-token "${{ secrets.GITHUB_TOKEN }}" --ignore-tags $maybe_message @maybe_comment
5 changes: 3 additions & 2 deletions .github/workflows/new_issue.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,6 +26,7 @@ jobs:
permissions:
issues: write
steps:
- uses: ./.github/workflows/build.yml
- uses: ./.github/workflows/automated_triage.yml
with:
similar_issues_text: ${{ needs.getSimilarIssues.outputs.message }}
similar_issues_text: "${{ needs.getSimilarIssues.outputs.message }}"
issue: 11305

0 comments on commit 8356b5e

Please sign in to comment.