This package helps users querying their information, from their wallet address or current XP.
- GitHub Bot Integration: Built as a Cloudflare Worker that processes GitHub comment webhooks
- Supabase Database: Stores user-related data including:
- Wallet addresses
- Access Control: Supports both public queries and repository collaborator-only queries
- Type Safety: Comprehensive TypeScript implementation with runtime type validation using TypeBox
- Runtime: Cloudflare Workers (Edge Computing Platform)
- Database: Supabase (PostgreSQL)
- Framework: Hono (Lightweight web framework)
- SDK: @ubiquity-os/plugin-sdk for standardized plugin development
- Type Validation: @sinclair/typebox for runtime type checking
- GitHub Integration: @octokit/rest for GitHub API interactions
- Webhook receives GitHub comment event
- Command parser validates the syntax (/query @user)
- Access control check (if enabled)
- User data retrieval from Supabase
- Response formatting and posting as GitHub comment
The following commands are allowed:
/query @user
Response Format:
| Property | Value |
| -------- | ----- |
| Wallet | 0x... |
| Access | [...] |
You can run the type generations against a local database with
bun run supabase:generate:local
Or against an instance by setting the SUPABASE_ACCESS_TOKEN
and SUPABASE_PROJECT_ID
in your .env
file
bun run prebuild
Start the Worker by running
bun run dev
To trigger the worker, POST
requests should be made to http://localhost:4000 with a Content-Type: application/json
header and a body looking like
{
"stateId": "",
"eventName": "",
"eventPayload": "",
"settings": "",
"ref": ""
}
For convenience, you can find an .http
file with a valid request here.
allowPublicQuery
: Enable/disable public user querieslogLevel
: Set logging verbosity (INFO, ERROR, etc.)
To start Jest tests, run
bun run test
- Bun runtime
- Supabase CLI (for local development)