name: Issue & PR Automation on: issues: types: [opened] pull_request_target: types: [opened] issue_comment: types: [created] pull_request_review_comment: types: [created] permissions: contents: read env: # GitHub Models (models.github.ai) was retired on 2026-07-30, and every call # to it here had degraded since. Both AI jobs now ask GitHub Copilot through # the workflow token (`copilot-requests: write`). `auto` lets Copilot pick: # it is the only value every Copilot plan accepts and it cannot go stale the # way the pinned `openai/gpt-4.1` did. COPILOT_MODEL: auto jobs: # Decides what happens to a new issue before triage answers it. Minor # problems never close an issue: a feature filed as a bug (or the reverse) # gets the right label and stays open. Only an issue with no description, # or one nobody could debug, is closed. An issue that insults the # maintainer or the project is deleted. Maintainers' own issues are exempt: # they open quick tracking issues without the template on purpose. check-issue: if: >- github.repository == 'zhom/donutbrowser' && github.event_name == 'issues' && github.event.issue.author_association != 'OWNER' && github.event.issue.author_association != 'MEMBER' runs-on: ubuntu-latest timeout-minutes: 10 permissions: contents: read issues: write copilot-requests: write outputs: action: ${{ steps.decide.outputs.action }} steps: - name: Checkout repository uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 #v7.0.1 with: persist-credentials: false - name: Gather context env: ISSUE_TITLE: ${{ github.event.issue.title }} ISSUE_BODY: ${{ github.event.issue.body }} run: | printf '%s' "$ISSUE_TITLE" | node scripts/redact-sensitive-text.mjs > /tmp/issue-title.txt printf '%s' "${ISSUE_BODY:-}" | node scripts/redact-sensitive-text.mjs --issue-body > /tmp/issue-body.txt - name: Build prompt run: | cat > /tmp/system.txt <<'PROMPT' You are checking a new GitHub issue for Donut Browser. Return ONLY a single JSON object, no prose, no markdown fences. There are two issue templates, and GitHub renders each field as a "###