Skip to content

chore(deps): update hashicorp/tfc-workflows-github action to v1.0.4 #139

chore(deps): update hashicorp/tfc-workflows-github action to v1.0.4

chore(deps): update hashicorp/tfc-workflows-github action to v1.0.4 #139

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'
})