Skip to content

Commit b1daf2f

Browse files
Create similarIssues.yml (#12576)
1 parent 17706c6 commit b1daf2f

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

.github/workflows/similarIssues.yml

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
name: GitGudSimilarIssues comments
2+
3+
on:
4+
issues:
5+
types: [opened]
6+
7+
jobs:
8+
getSimilarIssues:
9+
runs-on: ubuntu-latest
10+
permissions: read-all
11+
outputs:
12+
message: ${{ steps.getbody.outputs.message }}
13+
steps:
14+
- id: getbody
15+
uses: craigloewen-msft/GitGudSimilarIssues@main
16+
with:
17+
issuetitle: ${{ github.event.issue.title }}
18+
repo: ${{ github.repository }}
19+
similaritytolerance: "0.7"
20+
add-comment:
21+
needs: getSimilarIssues
22+
runs-on: ubuntu-latest
23+
permissions:
24+
issues: write
25+
if: needs.getSimilarIssues.outputs.message != ''
26+
steps:
27+
- name: Add comment
28+
run: gh issue comment "$NUMBER" --repo "$REPO" --body "$BODY"
29+
env:
30+
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
31+
NUMBER: ${{ github.event.issue.number }}
32+
REPO: ${{ github.repository }}
33+
BODY: ${{ needs.getSimilarIssues.outputs.message }}

0 commit comments

Comments
 (0)