-
Notifications
You must be signed in to change notification settings - Fork 683
38 lines (35 loc) · 1.24 KB
/
similar-issues-bot.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
name: GitGudSimilarIssues comments
on:
issues:
types: [opened]
jobs:
getsimilarissues:
runs-on: ubuntu-latest
outputs:
message: ${{ steps.getbody.outputs.message }}
steps:
- uses: actions/checkout@v4
- id: getbody
uses: craigloewen-msft/GitGudSimilarIssues@main
with:
issueTitle: ${{ github.event.issue.title }}
issueBody: ${{ github.event.issue.body }}
repo: ${{ github.repository }}
similaritytolerance: "0.81"
commentBody: |
Hi I'm an AI powered bot that finds similar issues based off the issue title.
Please view the issues below to see if they solve your problem, and if the issue describes your problem please consider closing this one. Thank you!
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 }}