gbd 1.9.0

The Beads agent workflow on GitHub Issues and Projects
Documentation
name: contributions

# gbd is open source, not open contribution (CONTRIBUTING.md). A pull
# request from outside the project is answered at once with the policy
# and closed, instead of sitting open until someone notices.
#
# `pull_request_target` runs in the base repo with a write token, which a
# fork's `pull_request` event does not get. Nothing from the PR is checked
# out or executed here; the job only comments and closes.
on:
  pull_request_target:
    types: [opened, reopened]

permissions:
  pull-requests: write

jobs:
  policy:
    name: outside pull request
    # Outside means from a fork. Only collaborators can push a branch to
    # this repository, so a pull request whose head lives here is the
    # project's own (a person's or Dependabot's). `author_association` is
    # not used: it reads as CONTRIBUTOR for a member whose org membership
    # is private, and closed the maintainer's own PR once.
    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
          )"