Merge pull request #89 from SeanAverS/main #4
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: Greet New PRs | ||
on: | ||
pull_request: | ||
types: [opened] | ||
jobs: | ||
greet: | ||
runs-on: ubuntu-latest | ||
steps: | ||
- name: Greet the user | ||
uses: actions/github-script@v6 | ||
with: | ||
script: | | ||
const { context } = require('@actions/github'); | ||
const github = require('@actions/github'); | ||
const pr = context.payload.pull_request; | ||
const commentBody = `Hey there! 👋 | ||
Thanks for taking the time to send in this pull request. We're happy to have your contribution! If you have any questions or need any help, feel free to ask.`; | ||
github.rest.issues.createComment({ | ||
owner: context.repo.owner, | ||
repo: context.repo.repo, | ||
issue_number: pr.number, | ||
body: commentBody | ||
}); |