Skip to content

No more Q&A In the discussion section #17

No more Q&A In the discussion section

No more Q&A In the discussion section #17

Workflow file for this run

name: Create a comment on new issues
on:
issues:
types: [opened]
jobs:
comment-with-action:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: "dump github context"
run: echo '${{ toJSON(github.event) }}' | jq
shell: bash
- name: Create comment
uses: peter-evans/create-or-update-comment@v3
with:
issue-number: ${{ github.event.issue.number }}
body: |
Just kidding :laughing: will get back to you
reactions: 'laugh'
comment-with-api:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Create comment with API
run: |
gh api -X POST \
https://api.github.com/repos/${ORGANIZATION}/${REPOSITORY}/issues/${ISSUE_NUMBER}/comments \
-f body="
Brooo! you're creating an issue in here 😒
"
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ORGANIZATION: ${{ github.event.repository.owner.login }}
REPOSITORY: ${{ github.event.repository.name }}
ISSUE_NUMBER: ${{ github.event.issue.number }}