feat: implement GitHub platform auto-discovery from GitHub API#506
Open
udaycodespace wants to merge 3 commits into
Open
feat: implement GitHub platform auto-discovery from GitHub API#506udaycodespace wants to merge 3 commits into
udaycodespace wants to merge 3 commits into
Conversation
|
@udaycodespace is attempting to deploy a commit to the Prashantkumar Khatri's projects Team on Vercel. A member of the Team first needs to authorize it. |
CI — Checks FailedBackend — FAIL
Mobile — SKIP
Web — SKIP
Last updated: |
Contributor
Author
Harxhit
reviewed
Jun 8, 2026
Contributor
Author
|
@Harxhit Fixed and pushed.
|
Contributor
Author
|
Hi @Harxhit, I noticed the backend CI is failing with:
The failure points to the line that was restored during the review: async (request: FastifyRequest, reply: FastifyReply) => {Would it be okay if I update it to: async (request: FastifyRequest, _reply: FastifyReply) => {This would keep the parameter in the handler signature while satisfying the lint rule. |
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 GitHub Platform Auto-Discovery (#32).
This PR adds a new authenticated endpoint,
GET /api/connect/github/autodiscover, which uses the user's connected GitHub account to discover platform links from their GitHub profile. The endpoint returns suggestions only and does not create any links automatically.To reduce unnecessary GitHub API requests, discovery results are cached in Redis for one hour. The implementation also handles missing, expired, or revoked GitHub tokens gracefully.
Closes #32
Type of Change
What Changed
GET /api/connect/github/autodiscover.github_followOAuth token flow to fetch GitHub profile data.How to Test
GET /api/connect/github/autodiscover.Checklist
pnpm -r run lintpasses).pnpm -r run typecheck).console.logor debug statements left in the code.Additional Context
Discovery Mapping
twitter_username→twitter(high confidence)dev.toURLs →devto(low confidence)hashnodeURLs →hashnode(low confidence)npmjsURLs →npm(low confidence)portfolio(high confidence)Caching
github:autodiscover:{userId}Tests Added