Skip to content

Commit

Permalink
Create ConnentOnOpernPR.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
Durgesh4993 authored May 29, 2024
1 parent 60d529a commit d33f7ec
Showing 1 changed file with 29 additions and 0 deletions.
29 changes: 29 additions & 0 deletions .github/workflows/ConnentOnOpernPR.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
name: PR Comment
on:
pull_request:
types: [opened]

jobs:
comment:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v2

- name: Comment on PR
uses: actions/github-script@v4
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
script: |
const { context, github } = require('@actions/github');
const prNumber = context.payload.pull_request.number;
const owner = context.repo.owner;
const repo = context.repo.repo;
const message = 'Thanks for opening this pull request! We will review it soon.';
github.issues.createComment({
owner,
repo,
issue_number: prNumber,
body: message
});

0 comments on commit d33f7ec

Please sign in to comment.