Skip to content

Commit

Permalink
Create greet-contributors.yml
Browse files Browse the repository at this point in the history
Signed-off-by: Kailie Le <[email protected]>
  • Loading branch information
kailielexx authored Feb 20, 2024
1 parent f9b63c5 commit 8e42082
Showing 1 changed file with 38 additions and 0 deletions.
38 changes: 38 additions & 0 deletions .github/workflows/greet-contributors.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,38 @@
name: Greet Contributors

on:
pull_request:
types: [opened]
issues:
types: [opened]

permissions:
issues: write
pull-requests: write

jobs:
greet:
runs-on: ubuntu-latest
steps:
- name: Greet on PR
if: github.event_name == 'pull_request'
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Thank you for your first pull request! Welcome to our community!'
})
- name: Greet on Issue
if: github.event_name == 'issues'
uses: actions/github-script@v6
with:
script: |
github.rest.issues.createComment({
issue_number: context.issue.number,
owner: context.repo.owner,
repo: context.repo.repo,
body: 'Thank you for submitting your first issue. We will look into it as soon as possible.'
})

0 comments on commit 8e42082

Please sign in to comment.