-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
feat: welcome developer for their first pr
- Loading branch information
1 parent
e0eec22
commit ee99cc4
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
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
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 | ||
}) | ||