Skip to content

Commit

Permalink
Update AutoGreeting.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Durgesh4993 authored May 26, 2024
1 parent 741c480 commit e3bfade
Showing 1 changed file with 27 additions and 7 deletions.
34 changes: 27 additions & 7 deletions .github/workflows/AutoGreeting.yml
Original file line number Diff line number Diff line change
@@ -1,13 +1,33 @@
name: Auto Greeting

name: Comment and Label on Issue Opened
on:
issues:
types: [opened]
types:
- opened

jobs:
greet:
comment_and_label:
runs-on: ubuntu-latest

steps:
- name: Greet Contributor
run: |
echo "Hi there! Thanks for opening this issue. We appreciate your contribution and will look into it as soon as possible."
- 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
});



0 comments on commit e3bfade

Please sign in to comment.