Skip to content

Commit

Permalink
Create similarIssues.yml (#22170)
Browse files Browse the repository at this point in the history
  • Loading branch information
craigloewen-msft committed May 2, 2024
1 parent ff5f3f0 commit 2fc4774
Showing 1 changed file with 33 additions and 0 deletions.
33 changes: 33 additions & 0 deletions .github/workflows/similarIssues.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: GitGudSimilarIssues comments

on:
issues:
types: [opened]

jobs:
getSimilarIssues:
runs-on: ubuntu-latest
outputs:
message: ${{ steps.getBody.outputs.message }}
steps:
- id: getBody
uses: craigloewen-msft/GitGudSimilarIssues@main
with:
issueTitle: ${{ github.event.issue.title }}
issueBody: ${{ github.event.issue.body }}
repo: ${{ github.repository }}
similaritytolerance: "0.70"
add-comment:
needs: getSimilarIssues
runs-on: ubuntu-latest
permissions:
issues: write
if: needs.getSimilarIssues.outputs.message != ''
steps:
- name: Add comment
run: gh issue comment "$NUMBER" --repo "$REPO" --body "$BODY"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
NUMBER: ${{ github.event.issue.number }}
REPO: ${{ github.repository }}
BODY: ${{ needs.getSimilarIssues.outputs.message }}

0 comments on commit 2fc4774

Please sign in to comment.