Skip to content

Implement Github Action Bot to welcome PR's from user #12

Implement Github Action Bot to welcome PR's from user

Implement Github Action Bot to welcome PR's from user #12

Workflow file for this run

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 pr = context.payload.pull_request;
const commentBody = `Hey there! 👋 Thanks for taking the time to send in this pull request. We are happy to have your contribution! If you have any questions or need any help, feel free to ask.`;
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
body: commentBody
});