Skip to content

Test Issue

Test Issue #1

Workflow file for this run

name: Auto Comment on Issues and PRs
on:
issues:
types: [opened]
pull_request:
types: [opened]
jobs:
auto-comment:
runs-on: ubuntu-latest
permissions:
issues: write
pull-requests: write
steps:
- name: Auto Comment
uses: actions/github-script@v7
with:
github-token: ${{secrets.GITHUB_TOKEN}}
script: |
const issueComment = context.payload.issue
? `Thank you for opening an issue, @${context.payload.issue.user.login}! We'll review it soon.`
: `Thank you for creating this pull request, @${context.payload.pull_request.user.login}! A reviewer will check it shortly.`;
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.issue.number,
body: issueComment,
});