Shell Assignment 1 #2
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
name: UofT-DSI Main Repository PR Workflow | |
on: | |
pull_request_target: | |
types: [opened, synchronize] | |
jobs: | |
comment: | |
if: github.repository_owner == 'UofT-DSI' | |
runs-on: ubuntu-latest | |
steps: | |
- name: Comment on PR | |
uses: actions/github-script@v6 | |
with: | |
script: | | |
const issue_number = context.payload.pull_request.number; | |
const repo = context.repo; | |
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.`; | |
// Check if the PR is made to a repo in the UofT-DSI organization | |
github.rest.issues.createComment({ | |
owner: repo.owner, | |
repo: repo.repo, | |
issue_number: issue_number, | |
body: commentBody | |
}); |