[New Feature]: Test #3
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Comment and Label on Issue Opened | |
on: | |
issues: | |
types: | |
- opened | |
jobs: | |
comment_and_label: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v2 | |
- name: Add comment | |
uses: actions/github-script@v4 | |
with: | |
github-token: ${{ secrets.PERSONAL_ACCESS_TOKEN }} | |
script: | | |
const commentAuthor = context.payload.issue.user.login; | |
const commentBody = `Hey @${commentAuthor} ! \n Thanks for opening this issue. We appreciate your contribution and will look into it as soon as possible. \n Don’t Forget to star our [Community Page](https://github.com/GameSphere-MultiPlayer/Community-Page)\n Make sure you join our [Discord](https://discord.gg/rZb46cCMmK), we have created separate channals for all projects... `; | |
const { owner, repo, number } = context.issue; | |
await github.issues.createComment({ | |
owner: owner, | |
repo: repo, | |
issue_number: number, | |
body: commentBody | |
}); | |