Skip to content

Commit

Permalink
Create similarissues.yml (#4035)
Browse files Browse the repository at this point in the history
<!-- 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:


microsoft/terminal#16482 (comment)

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)
  • Loading branch information
craigloewen-msft authored Jan 8, 2024
1 parent da64cce commit 7310865
Show file tree
Hide file tree
Showing 2 changed files with 35 additions and 0 deletions.
4 changes: 4 additions & 0 deletions .github/actions/spelling/expect.txt
Original file line number Diff line number Diff line change
Expand Up @@ -79,6 +79,7 @@ count'th
countof
countryregion
CPIL
craigloewen
createmanifestmetadata
cswinrt
ctc
Expand Down Expand Up @@ -184,6 +185,7 @@ isable
IServer
ishelp
ISQ
issuetitle
ISVs
itr
IWin
Expand Down Expand Up @@ -387,6 +389,8 @@ SHGDN
SHOWNORMAL
Sideload
SIGNATUREHASH
similarissues
similaritytolerance
Sku
SMTO
sortof
Expand Down
31 changes: 31 additions & 0 deletions .github/workflows/similarissues.yml
Original file line number Diff line number Diff line change
@@ -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 }}

0 comments on commit 7310865

Please sign in to comment.