Summary
Build a workflow that periodically fetches high-priority issues from Sentry, filters by severity/frequency/priority, and automatically creates corresponding GitHub issues in the relevant repo — keeping the engineering team's bug backlog in sync with what Sentry is actually seeing in production without manual triage overhead.
Problem
High-priority errors surfaced in Sentry are often not acted on quickly because they require a developer to manually check Sentry, decide it's worth filing, copy the details, and create a GitHub issue. This manual step means critical issues can sit in Sentry untracked on GitHub for days. An automated workflow closes that gap.
Solution
A scheduled (or webhook-triggered) workflow that:
- Queries the Sentry API for unresolved issues above a priority/frequency threshold
- Deduplicates against existing open GitHub issues (don't create duplicates)
- Creates a well-formatted GitHub issue for each new Sentry issue, with all relevant context
- Optionally assigns priority labels and links back to the Sentry issue URL
Workflow steps
1. Fetch from Sentry
- Query Sentry API: unresolved issues, filtered by:
- Priority:
critical and high (configurable)
- First seen: within the last N hours (configurable, default 24h)
- Minimum event count or user count threshold (configurable)
- Supported trigger modes:
- Scheduled: run every hour / every 6 hours via cron
- Webhook: Sentry alert webhook fires the workflow in real time
2. Deduplicate
- Before creating a GitHub issue, check if one already exists for this Sentry issue ID
- Store a mapping of
sentry_issue_id → github_issue_number in workflow state
- Or search GitHub issues for a tag/label containing the Sentry issue ID
- Skip if a GitHub issue already exists (open or closed)
3. Create GitHub issue
Each created GitHub issue should include:
- Title:
[Sentry] <Sentry issue title>
- Body:
- Sentry issue URL (direct link)
- Error type and message
- First seen / last seen / event count / affected users
- Top stack frame (file + line)
- Sentry project and environment (production / staging)
- Reproduction steps if available from Sentry's context
- Labels:
bug, sentry, and a priority label (priority: critical / priority: high)
- Repo routing: map Sentry project name → GitHub repo (e.g.
openhuman-rust → tinyhumansai/openhuman, backend → tinyhumansai/backend)
4. Comment back to Sentry (optional)
- Post a comment on the Sentry issue with the GitHub issue URL so the two are cross-linked
Implementation checklist
Acceptance criteria
Related
- Automate Discord → GitHub issues pipeline: openhuman #3675
- Social media workflow (same orchestration framework): tinyhumansai/tinyflows (companion issue)
- Sentry is already integrated in the backend:
src/config/sentry.ts
Summary
Build a workflow that periodically fetches high-priority issues from Sentry, filters by severity/frequency/priority, and automatically creates corresponding GitHub issues in the relevant repo — keeping the engineering team's bug backlog in sync with what Sentry is actually seeing in production without manual triage overhead.
Problem
High-priority errors surfaced in Sentry are often not acted on quickly because they require a developer to manually check Sentry, decide it's worth filing, copy the details, and create a GitHub issue. This manual step means critical issues can sit in Sentry untracked on GitHub for days. An automated workflow closes that gap.
Solution
A scheduled (or webhook-triggered) workflow that:
Workflow steps
1. Fetch from Sentry
criticalandhigh(configurable)2. Deduplicate
sentry_issue_id → github_issue_numberin workflow state3. Create GitHub issue
Each created GitHub issue should include:
[Sentry] <Sentry issue title>bug,sentry, and a priority label (priority: critical/priority: high)openhuman-rust→tinyhumansai/openhuman,backend→tinyhumansai/backend)4. Comment back to Sentry (optional)
Implementation checklist
/api/0/projects/{org}/{project}/issues/Acceptance criteria
criticalSentry issue appearing in production automatically creates a GitHub issue within one workflow cycleRelated
src/config/sentry.ts