Skip to content

Testing - Create auto-comment.yml #1

Testing - Create auto-comment.yml

Testing - Create auto-comment.yml #1

Workflow file for this run

name: Auto Comment on Issues
on:
issues:
types: [opened]
jobs:
comment:
runs-on: ubuntu-latest
permissions:
issues: write
steps:
- name: Comment on new issue
uses: actions/github-script@v7
with:
script: |
const issueNumber = context.payload.issue.number;
const username = context.payload.issue.user.login;
const comment = `
👋 Hey @${username} — thanks for opening an issue!

Check failure on line 22 in .github/workflows/auto-comment.yml

View workflow run for this annotation

GitHub Actions / .github/workflows/auto-comment.yml

Invalid workflow file

You have an error in your yaml syntax on line 22
Before we dive in, make sure to check out our [contributing guide](CONTRIBUTING.md) and see if this has already been reported.
We appreciate your help! 💖
`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: issueNumber,
body: comment
});