Skip to content

Commit

Permalink
feat: welcome developer for their first pr
Browse files Browse the repository at this point in the history
  • Loading branch information
matthieu-crouzet committed Apr 12, 2024
1 parent e0eec22 commit ee99cc4
Showing 1 changed file with 32 additions and 0 deletions.
32 changes: 32 additions & 0 deletions .github/workflows/first-pr.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
name: First PR

on:
pull_request:
types:
- opened

permissions:
contents: read

jobs:
audit:
runs-on: ubuntu-latest
steps:
- uses: actions/github-script@v7
id: my-script
with:
script: |
const reply = github.rest.issues.listForRepo({
state: 'all',
creator: context.payload.pull_request.user.login
owner: context.repo.owner,
repo: context.repo.repo,
});
const countPR = reply.data.filter((data) => data.pull_request).length;
github.rest.issues.createComment({
owner: context.repo.owner,
repo: context.repo.repo,
issue_number: context.payload.pull_request.issue.number,
body: 'Thanks so much for opening your first PR here!' + countPR
})

0 comments on commit ee99cc4

Please sign in to comment.