Skip to content

Commit 3579cd9

Browse files
committed
Workflow added for automated comments.
1 parent 389beb5 commit 3579cd9

1 file changed

Lines changed: 23 additions & 0 deletions

File tree

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
name: Automatic PR Comment
2+
3+
on:
4+
pull_request_target:
5+
types: [opened, synchronize]
6+
7+
jobs:
8+
comment:
9+
runs-on: ubuntu-latest
10+
steps:
11+
- name: Comment on PR
12+
uses: actions/github-script@v6
13+
with:
14+
script: |
15+
const issue_number = context.payload.pull_request.number;
16+
const repo = context.repo;
17+
const commentBody = `Hello, thank you for your contribution. If you are a participant, please close this pull request and open it in your own forked repository instead of here. Please read the instructions on your onboarding [Assignment Submission Guide](https://github.com/UofT-DSI/onboarding/blob/main/onboarding_documents/submissions.md) more carefully. If you are not a participant, please give us up to 72 hours to review your PR. Alternatively, you can reach out to us directly to expedite the review process.`;
18+
github.rest.issues.createComment({
19+
owner: repo.owner,
20+
repo: repo.repo,
21+
issue_number: issue_number,
22+
body: commentBody
23+
});

0 commit comments

Comments
 (0)