chore(cubebot): GitHub automation bot for issue triage#1361
Open
alvarosabu wants to merge 34 commits intomainfrom
Open
chore(cubebot): GitHub automation bot for issue triage#1361alvarosabu wants to merge 34 commits intomainfrom
alvarosabu wants to merge 34 commits intomainfrom
Conversation
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.5 <noreply@anthropic.com>
…and enhance issue handling with organization membership checks
…ntext - Added `analyzeFeasibility` function to assess technical feasibility of proposals. - Introduced `FEASIBILITY_SYSTEM_PROMPT` and `buildFeasibilityPrompt` for generating prompts. - Updated comment handler to fetch relevant code and provide analysis in response to user comments. - Enhanced keyword extraction for targeted code searches.
…abels - Changed package format in prompts to use pipe-separated values for clarity. - Updated issue triage logic to improve label handling, including clearer label names and conditions for adding package labels.
- Renamed `convertToDiscussion` function to `closeIssueAsFeatureRequest` to better reflect its purpose. - Updated the function to close feature request issues with a "not planned" reason and return a new discussion URL. - Modified the issue handler to utilize the new function and streamline the redirection process for feature requests.
…on for org members
❌ Deploy Preview for tresjs-docs failed. Why did it fail? →
|
❌ Deploy Preview for cientos-tresjs failed. Why did it fail? →
|
❌ Deploy Preview for tresjs-lab failed. Why did it fail? →
|
@tresjs/cientos
@tresjs/core
@tresjs/eslint-config
@tresjs/leches
@tresjs/nuxt
@tresjs/post-processing
commit: |
Contributor
There was a problem hiding this comment.
Pull request overview
Adds “CubeBot”, a Cloudflare Workers GitHub App intended to auto-triage TresJS issues and respond to @tresjs-cubebot mentions with RAG-augmented Claude analysis.
Changes:
- Scaffolds a new
apps/cubebotWorker app (Hono + D1 + Workers AI embeddings + Octokit + Anthropic Claude). - Implements webhook handling for
issues.openedtriage andissue_comment.createdmention replies. - Adds deployment automation via a GitHub Actions workflow for changes under
apps/cubebot/**.
Reviewed changes
Copilot reviewed 24 out of 25 changed files in this pull request and generated 6 comments.
Show a summary per file
| File | Description |
|---|---|
| pnpm-lock.yaml | Adds CubeBot dependencies (Hono, Octokit, Anthropic SDK, Wrangler, etc.). |
| apps/cubebot/wrangler.toml | Cloudflare Worker configuration (entrypoint, D1 binding, AI binding, observability). |
| apps/cubebot/tsconfig.json | TypeScript configuration for the Worker app. |
| apps/cubebot/src/types.ts | Defines webhook payload and triage result types. |
| apps/cubebot/src/triage/detect.ts | Issue type/package detection + heuristics for reproduction/system info/expected behavior. |
| apps/cubebot/src/triage/comments.ts | Formats maintainer/author comments and feature-redirect message. |
| apps/cubebot/src/index.ts | Hono routes: health, /admin/seed-docs, and /webhook. |
| apps/cubebot/src/github/verify.ts | Verifies GitHub webhook signature. |
| apps/cubebot/src/github/handlers/issues.ts | Handles issues.opened triage flow (labels/comments/feature redirect). |
| apps/cubebot/src/github/handlers/comments.ts | Handles bot mentions in comments and posts a RAG-powered reply. |
| apps/cubebot/src/github/code.ts | Fetches and searches TresJS repo code for feasibility context. |
| apps/cubebot/src/github/auth.ts | GitHub App installation auth via @octokit/auth-app with simple token caching. |
| apps/cubebot/src/github/api.ts | GitHub API helpers (org membership check, comment, labels, close). |
| apps/cubebot/src/ai/rag.ts | Embedding generation + in-memory similarity search over D1 rows. |
| apps/cubebot/src/ai/prompts.ts | Claude system prompts + JSON-output prompt builders. |
| apps/cubebot/src/ai/claude.ts | Anthropic client calls for issue analysis and feasibility analysis. |
| apps/cubebot/src/admin/seed-docs.ts | Admin endpoint to fetch docs, embed via Workers AI, and store chunks in D1. |
| apps/cubebot/scripts/embed-docs.ts | Local script to fetch/split docs and write chunks to JSON. |
| apps/cubebot/schema.sql | D1 schema for doc_chunks storage. |
| apps/cubebot/package.json | CubeBot package metadata + dev/deploy scripts. |
| apps/cubebot/eslint.config.js | ESLint config using @tresjs/eslint-config. |
| apps/cubebot/README.md | Setup/deploy/secret instructions for CubeBot. |
| apps/cubebot/CLAUDE.md | Local documentation for the CubeBot subproject. |
| apps/cubebot/.gitignore | Ignores data output and Wrangler local state. |
| .github/workflows/deploy-cubebot.yml | Auto-deploys CubeBot to Cloudflare Workers on pushes to main. |
Files not reviewed (1)
- pnpm-lock.yaml: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
Member
Author
|
@claude mind reviewing this one? |
…ipt configurations
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Summary
Implements CubeBot — a Cloudflare Workers GitHub App that acts as a first responder on TresJS issues.
@octokit/auth-appfor GitHub App authenticationapps/cubebot/**Test plan
issues.openedand correctly triages bug reports@tresjs-cubebotmentions in comments trigger a RAG-powered replymainwith cubebot changesCloses TRES-212
🤖 Generated with Claude Code