feat(go/github-bots): add stale-issues bot + reusable workflow
Draft, stacked on #2079. This branch builds on the issue-triage PR (#2079), so until that merges this diff also shows #2079's files. Review/merge #2079 first; afterward this PR's diff reduces to just
go/github-bots/stale-issues/+.github/workflows/go-stale-issues.yml(plus a one-line entry ingo/github-bots/README.mdandgo/README.md).
Summary
Adds the second bot in the go/github-bots/ category: stale-issues, an autonomous stale-issue auditor.
Unlike a timestamp-only "stale bot", it reconstructs each issue's conversation history (one GraphQL query) and uses an LLM to distinguish a maintainer asking the author a question (a stale candidate) from a status update (still active). It warns, then closes issues left waiting on the author.
It's a standalone Go module pinning the released google.golang.org/adk v1.4.0, and demonstrates:
- an
llmagent.Newagent driven by typedfunctiontool.New[Args, Result]tools; - headless execution via
runner.Runner+ an in-memory session (iter.Seq2stream); - GitHub REST (
go-github) + GraphQL from inside tools; - bounded concurrency with
errgroup,Temperature: 0, and a pure/impure split (state.govsgithub.go); - safe re-runs (ordered mutations) and self-recognition (ignores its own prior comments to avoid spam).
It also supports Vertex AI (ADC) in addition to a Gemini API key, for parity with the issue-triage bot.
Run it on any repo (no code copy)
Adds a reusable workflow .github/workflows/go-stale-issues.yml (on: workflow_call). A target repo adds a thin caller workflow; the bot writes with the caller's own GITHUB_TOKEN (reusable workflows run in the caller's context). Maintainer logins are passed as an input (the repo-scoped token can't list collaborators).
Testing
go build+go test -race ./...against released v1.4.0 — pass.gofumpt -extra,golangci-lint(default config),go vet,go mod tidy -diff— clean.- Reusable workflow:
actionlintclean. - Manual dry-run against
google/adk-govia Vertex AI: reconstructs history, resolves bot identity, and decides correctly (e.g. #948 → "ACTIVE, last action by author, no action"); zero writes.
Notes
- Ported and hardened from the Python ADK stale-issue agent.
- Adds deps
github.com/google/go-github/v66,github.com/joho/godotenv,golang.org/x/sync(this module only).