name: contributions
on:
pull_request_target:
types: [opened, reopened]
permissions:
pull-requests: write
jobs:
policy:
name: outside pull request
if: github.event.pull_request.head.repo.full_name != github.repository
runs-on: ubuntu-latest
steps:
- name: Explain and close
env:
GH_TOKEN: ${{ github.token }}
REPO: ${{ github.repository }}
NUMBER: ${{ github.event.pull_request.number }}
run: |
gh pr close "$NUMBER" --repo "$REPO" --comment "$(cat <<'EOF'
Thank you for taking the time. gbd is open source but not open to code contributions: it is built by one person with a specific design, and reviewing outside changes is the one thing that does not scale, so this pull request is closed automatically. That is not a judgment on the change.
Bug reports are welcome as issues, forks are welcome (open an issue with the link and it will be listed), and if you think this change belongs in gbd itself, describe it in an issue and you will get an honest answer. See CONTRIBUTING.md.
EOF
)"