mirror of
https://github.com/microsoft/PowerToys.git
synced 2025-12-15 19:27:56 +01:00
[GitHub]Add action to use a bot to detect similar issues (#32026)
* Create similarIssues.yml * Update names.txt
This commit is contained in:
2
.github/actions/spell-check/allow/names.txt
vendored
2
.github/actions/spell-check/allow/names.txt
vendored
@@ -46,6 +46,7 @@ chrdavis
|
|||||||
Chrzan
|
Chrzan
|
||||||
clayton
|
clayton
|
||||||
Coplen
|
Coplen
|
||||||
|
craigloewen
|
||||||
crutkas
|
crutkas
|
||||||
damienleroy
|
damienleroy
|
||||||
davidegiacometti
|
davidegiacometti
|
||||||
@@ -87,6 +88,7 @@ martinchrzan
|
|||||||
martinmoene
|
martinmoene
|
||||||
Melman
|
Melman
|
||||||
Mikhayelyan
|
Mikhayelyan
|
||||||
|
msft
|
||||||
Myrvold
|
Myrvold
|
||||||
Nemeth
|
Nemeth
|
||||||
nielslaute
|
nielslaute
|
||||||
|
|||||||
33
.github/workflows/similarIssues.yml
vendored
Normal file
33
.github/workflows/similarIssues.yml
vendored
Normal file
@@ -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.75"
|
||||||
|
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 }}
|
||||||
Reference in New Issue
Block a user