commit 731086523d982dffb39aaea1dc4d6abccf6ae871
parent da64ccee1c380aa7df05dfec7e37ea14435cd68f
Author: Craig Loewen <crloewen@microsoft.com>
Date: Mon, 8 Jan 2024 11:17:04 -0500
Create similarissues.yml (#4035)
<!-- To check a checkbox place an "x" between the brackets. e.g: [x] -->
- [X] I have signed the [Contributor License
Agreement](https://cla.opensource.microsoft.com/microsoft/winget-pkgs).
- [ ] This pull request is related to an issue.
-----
<!-- Enter a brief description/summary of your PR here. What does it
fix/what does it change/how was it tested (even manually, if necessary)?
-->
## Summary of the Pull Request
Creates a new GitHub action that makes a bot that will automatically
comment on new issues letting them know about similarly titled issues
using AI. Comments will look like this:
https://github.com/microsoft/terminal/issues/16482#issuecomment-1867797451
The advantage is that users will be able to find related issues faster,
and be able to resolve themselves quicker, with you as a maintainer
having to close out less issues.
<!-- Provide a more detailed description of the PR, other things fixed
or any additional comments/features here -->
## Detailed Description of the Pull Request / Additional comments
The bot code is [open sourced
here](https://github.com/craigloewen-msft/GitGudSimilarIssues).
<!-- Describe how you validated the behavior. Add automated tests
wherever possible, but list manual validation steps taken as well -->
## Validation Steps Performed
Validated on other repos. You can manually validate queries like so:
https://gitgudissues.azurewebsites.net/api/getsimilarissues/microsoft/powertoys/record%20gifs%20in%20file%20explorer
###### Microsoft Reviewers: [Open in
CodeFlow](https://microsoft.github.io/open-pr/?codeflow=https://github.com/microsoft/winget-cli/pull/4035)
Diffstat:
2 files changed, 35 insertions(+), 0 deletions(-)
diff --git a/.github/actions/spelling/expect.txt b/.github/actions/spelling/expect.txt
@@ -79,6 +79,7 @@ count'th
countof
countryregion
CPIL
+craigloewen
createmanifestmetadata
cswinrt
ctc
@@ -184,6 +185,7 @@ isable
IServer
ishelp
ISQ
+issuetitle
ISVs
itr
IWin
@@ -387,6 +389,8 @@ SHGDN
SHOWNORMAL
Sideload
SIGNATUREHASH
+similarissues
+similaritytolerance
Sku
SMTO
sortof
diff --git a/.github/workflows/similarissues.yml b/.github/workflows/similarissues.yml
@@ -0,0 +1,31 @@
+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 }}
+ repo: ${{ github.repository }}
+ similaritytolerance: "0.7"
+ add-comment:
+ needs: getSimilarIssues
+ runs-on: ubuntu-latest
+ permissions:
+ issues: write
+ 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 }}