Skip to content

Commit

Permalink
feat:fixed issue responder (#561)
Browse files Browse the repository at this point in the history
  • Loading branch information
dylanpulver authored Aug 2, 2024
1 parent 83a07ec commit a7b20b3
Showing 1 changed file with 16 additions and 19 deletions.
35 changes: 16 additions & 19 deletions .github/workflows/issue_responder.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,28 +7,25 @@ on:
jobs:
respond:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Respond to new issues
uses: actions/github-script@v7
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const issueNumber = context.issue.number;
const issueAuthor = context.payload.issue.user.login;
- name: Checkout repository
uses: actions/checkout@v3

const commentBody = `
Hi @${issueAuthor}, thank you for opening this issue!
- name: Install GitHub CLI
run: sudo apt-get install gh

We appreciate your effort in reporting this. Our team will review it and get back to you soon.
If you have any additional details or updates, feel free to add them to this issue.
- name: Respond to new issues
run: gh issue comment ${{ github.event.issue.number }} --body "$BODY"
env:
GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BODY: |
Hi @${{ github.event.issue.user.login }}, thank you for opening this issue!
**Note:** If this is a serious security issue that could impact the security of Safety CLI users, please email [email protected] immediately.
We appreciate your effort in reporting this. Our team will review it and get back to you soon.
If you have any additional details or updates, feel free to add them to this issue.
Thank you for contributing to Safety CLI!
`;
**Note:** If this is a serious security issue that could impact the security of Safety CLI users, please email [email protected] immediately.
await github.issues.createComment({
...context.repo,
issue_number: issueNumber,
body: commentBody
});
Thank you for contributing to Safety CLI!

0 comments on commit a7b20b3

Please sign in to comment.