From 47808f3b7d214fb765e09723f22c9d6155e1ed9b Mon Sep 17 00:00:00 2001 From: Craig Loewen Date: Thu, 2 May 2024 14:21:39 -0400 Subject: [PATCH] Create similarIssues.yml --- .github/workflows/similarIssues.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/similarIssues.yml diff --git a/.github/workflows/similarIssues.yml b/.github/workflows/similarIssues.yml new file mode 100644 index 000000000000..a5592cfcc6ce --- /dev/null +++ b/.github/workflows/similarIssues.yml @@ -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.70" + 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 }}