Skip to content

Commit

Permalink
Merge pull request #100 from SeanAverS/feature-92-github-action-bot-w…
Browse files Browse the repository at this point in the history
…elcome-message

Implement Github Action Bot to welcome PR's from user
  • Loading branch information
Bashamega authored Jun 26, 2024
2 parents 2c56227 + ea5f6b6 commit 45861ca
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions .github/workflows/greet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,10 @@ on:
pull_request:
types: [opened]

permissions:
issues: write
pull-requests: write

jobs:
greet:
runs-on: ubuntu-latest
Expand All @@ -12,13 +16,10 @@ jobs:
uses: actions/github-script@v6
with:
script: |
const github = require('@actions/github');
const context = github.context;
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.`;
github.rest.issues.createComment({
await github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: pr.number,
Expand Down

0 comments on commit 45861ca

Please sign in to comment.