How rust-lang/triagebot works
Triagebot is the Rust organization’s triage and team-assistance web service. Its principal workflow is to accept GitHub or Zulip webhooks, load repository configuration, parse and dispatch event-driven actions, then update GitHub or notify Zulip; PostgreSQL retains operational state and jobs. It also serves agenda, PR-comment, diff, and CI-log pages, and supports review coordination, release notes, crates.io yanks, and other repository automation. The map follows documented routes and sampled dispatch/API code; unsampled handler wiring is represented only at the documented subsystem level.
Main entry points: main.rs HTTP server · handlers.rs Event dispatch · client.rs GitHub API · handlers Review coordination
Components 21
Web ingress
- HTTP server
src/main.rs - GitHub webhook
src/github/webhook.rs - Zulip webhook
src/zulip.rs
Triage automation
- Event dispatch
src/handlers.rs - Repository config
src/config.rs - Command parser
parser/src/command.rs - Issue and PR actions
src/handlers - Review coordination
src/handlers - Release automation
src/handlers - Scheduled jobs
src/jobs.rs
State and jobs
- PostgreSQL
src/db.rs
User views
- Agenda endpoints
src/agenda.rs - Comment views
src/gh_comments.rs - Review diff view
src/gh_range_diff.rs - CI log view
src/gha_logs.rs
External integrations
- GitHub API
src/github/client.rs - Zulip API
src/zulip/client.rs - Team data
src/team_data.rs - crates.io API
src/crates_io/mod.rs
Other components
- GitHub
- Zulip users
Connections 29
- GitHub → HTTP server: sends hooks
- Zulip users → HTTP server: sends hooks
- HTTP server → GitHub webhook: routes hooks
- HTTP server → Zulip webhook: routes hooks
- HTTP server → Agenda endpoints: serves pages
- HTTP server → Comment views: serves pages
- HTTP server → Review diff view: serves diffs
- HTTP server → CI log view: serves logs
- GitHub webhook → Event dispatch: dispatches events
- Zulip webhook → Event dispatch: dispatches events
- Event dispatch → Repository config: loads config
- Event dispatch → Command parser: parses commands
- Event dispatch → Issue and PR actions: runs handlers
- Event dispatch → Review coordination: runs handlers
- Event dispatch → Release automation: runs handlers
- Issue and PR actions → GitHub API: updates issues
- Review coordination → GitHub API: reads reviews
- Release automation → GitHub API: manages releases
- Release automation → crates.io API: yanks versions
- Issue and PR actions → Zulip API: sends notifications
- Review coordination → PostgreSQL: reads preferences
- Review coordination → Scheduled jobs: schedules work
- Scheduled jobs → PostgreSQL: stores jobs
- Agenda endpoints → PostgreSQL: reads state
- Agenda endpoints → GitHub API: queries issues
- Comment views → GitHub API: fetches comments
- Review diff view → GitHub API: fetches changes
- CI log view → GitHub API: fetches logs
- Event dispatch → Team data: loads team data