feat: add read_github_data MCP tool for Supabase Postgres#3771
Merged
feat: add read_github_data MCP tool for Supabase Postgres#3771
read_github_data MCP tool for Supabase Postgres#3771Conversation
…ithub schema) Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
✅ Deploy Preview for hyprnote canceled.
|
✅ Deploy Preview for hyprnote-storybook canceled.
|
Contributor
Author
🤖 Devin AI EngineerI'll be helping with this pull request! Here's what you should know: ✅ I will automatically:
Note: I can only respond to comments from users who have write access to this repository. ⚙️ Control Options:
|
…amp limit/offset Co-Authored-By: yujonglee <yujonglee.dev@gmail.com>
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.
feat: add
read_github_dataMCP tool for Supabase PostgresSummary
Adds a new MCP tool to read GitHub data (issues, pull requests, comments, tags) from the
hyprnote_githubschema in Supabase Postgres, usingsqlx. This schema is populated by the Airbyte GitHub source connector.Changes:
sqlx(withpostgres,runtime-tokio,tls-rustls,jsonfeatures) as a dependencySupabaseDbEnvconfig struct expecting asupabase_db_urlenv varAppStateto hold aPgPool, makingAppState::new()androuter()asyncread_github_dataMCP tool that querieshyprnote_github.{issues,pull_requests,comments,tags}with optionalstatefilter, pagination (limit/offset), returning rows as JSONapps/aito wire through the new config and handle the async routerReview & Testing Checklist for Human
supabase_db_urlenv var: Must be configured in all deployment environments (local.env, CI, production). Server will panic on startup if missing or if DB is unreachable (state.rs:34uses.expect()). Consider whether a graceful fallback is preferred._airbyte_extracted_atcolumn: All queries ORDER BY this column — verify it exists on all four Airbyte-synced tables (issues,pull_requests,comments,tags). If any table lacks it, the tool will return a runtime error.statefilter on non-applicable tables: Thestateparam will be applied even tocommentsandtagstables (which likely lack astatecolumn), causing a SQL error. Consider validating the filter against the selected table.Notes
format!()but is safe from injection sinceGitHubTable::as_str()only returns hardcoded string literals.unwrap_or(0)).Link to Devin run: https://app.devin.ai/sessions/4d00ea2dde3946b09f27d0f45c0ff3b7
Requested by: @yujonglee