-
Notifications
You must be signed in to change notification settings - Fork 71
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
741c480
commit e3bfade
Showing
1 changed file
with
27 additions
and
7 deletions.
There are no files selected for viewing
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
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 | ||
}); | ||
|
||
|
||
|