feat: create resources for staffwiki #137
Workflow file for this run
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: GitHub -- No Forks | |
on: | |
pull_request_target: | |
types: [opened, synchronize, reopened] | |
jobs: | |
no-forks: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Comment and Close | |
uses: actions/github-script@d7906e4ad0b1822421a7e6a35d5ca353c962f410 # v6 | |
if: ${{ github.event.pull_request.head.repo.full_name != 'freeCodeCamp/infra' }} | |
with: | |
script: | | |
github.rest.issues.createComment({ | |
issue_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
body: "This is a quick reminder that we can not accept pull requests from forks (including staff and prior contributors).\n\nThis repo is a \"special\" case because of how we build, test and deploy the codebase. If you are working on something, Please open a new pull request from a branch on this repository." | |
}) | |
github.rest.pulls.update({ | |
pull_number: context.issue.number, | |
owner: context.repo.owner, | |
repo: context.repo.repo, | |
state: 'closed' | |
}) |