Skip to content

Commit 4ec5fdf

Browse files
committed
gogogo
1 parent e38c792 commit 4ec5fdf

File tree

1 file changed

+31
-11
lines changed

1 file changed

+31
-11
lines changed

.github/workflows/comment_pr.yml

Lines changed: 31 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -3,23 +3,43 @@ name: Comment on PR
33
on: pull_request
44

55
jobs:
6-
diff:
6+
welcome:
77
runs-on: ubuntu-latest
88
steps:
99
- uses: actions/github-script@v3
1010
with:
1111
github-token: ${{secrets.GITHUB_TOKEN}}
1212
script: |
13-
context.pulls.createReview({
13+
await context.pulls.createReview({
1414
pull_number: 14,
1515
owner: context.repo.owner,
1616
repo: context.repo.repo,
17-
body: 'thanks'
18-
event: 'REQUEST_CHANGES'
19-
comments: [
20-
{
21-
path: gitlab/workflows/comment_pr.yml,
22-
line: 1,
23-
body: 'thanks'
24-
}
25-
})
17+
}
18+
19+
20+
// Get a list of all issues created by the PR opener
21+
// See: https://octokit.github.io/rest.js/#pagination
22+
//const creator = context.payload.sender.login
23+
//const opts = github.issues.listForRepo.endpoint.merge({
24+
// ...context.issue,
25+
// creator,
26+
// state: 'all'
27+
//})
28+
//const issues = await github.paginate(opts)
29+
30+
//for (const issue of issues) {
31+
// if (issue.number === context.issue.number) {
32+
// continue
33+
// }
34+
35+
// if (issue.pull_request) {
36+
// return // Creator is already a contributor.
37+
// }
38+
//}
39+
40+
//await github.issues.createComment({
41+
// issue_number: context.issue.number,
42+
// owner: context.repo.owner,
43+
// repo: context.repo.repo,
44+
// body: 'Welcome, new contributor!'
45+
//})

0 commit comments

Comments
 (0)