Skip to content

Discussion Auto-Reply #471

Discussion Auto-Reply

Discussion Auto-Reply #471

name: Discussion Auto-Reply
on:
discussion:
types: [created]
jobs:
auto-reply:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v6
with:
github-token: ${{ secrets.TEAM_DEEPGRAM_BOT_PAT }}
script: |
dg_users = ['U_kgDOCOcF3A']
if (!dg_users.includes(context.payload.sender.node_id)) {
const mutation = `mutation AddComment($input: AddDiscussionCommentInput!) {
addDiscussionComment(input: $input){
comment {
id
body
}
}
}`;
const variables = {
input: {
body: 'Thanks for asking your question about Deepgram! If you didn\'t already include it in your post, please be sure to add as much detail as possible so we can assist you efficiently, such as:\n- The `request_id` if you have a question about your requests or transcription responses.\n- The features you used or the full `api.deepgram.com` URL you sent your request to, including parameters.\n- Any code snippets you can share.',
discussionId: context.payload.discussion.node_id,
}
}
const result = await github.graphql(mutation, variables)
}