Skip to content

feat: implement GitHub repository dropdown selector with organization support (v0.2.2)#25

Merged
fanux merged 3 commits intoFullAgent:mainfrom
Che-Zhu:feat/github-repo-dropdown
Oct 23, 2025
Merged

feat: implement GitHub repository dropdown selector with organization support (v0.2.2)#25
fanux merged 3 commits intoFullAgent:mainfrom
Che-Zhu:feat/github-repo-dropdown

Conversation

@Che-Zhu
Copy link
Copy Markdown
Collaborator

@Che-Zhu Che-Zhu commented Oct 23, 2025

Summary

Implements a comprehensive GitHub repository dropdown selector that replaces manual repository name input with an intuitive two-tier dropdown system. Users can now browse and select from their personal and organization repositories through an elegant interface.

Fixes #11

Test plan

  • Verify repository dropdown loads with user's repositories
  • Test account switching between personal and organization accounts
  • Verify repository filtering by selected account works correctly
  • Test repository connection flow with success toast
  • Test repository disconnection flow
  • Verify error handling for missing GitHub token
  • Test empty states for no repositories
  • Verify organization detection works after OAuth re-authentication
  • Test backward compatibility for users without organizations

Implementation details

Features Added

  • Two-tier dropdown system: Account selector → Repository selector
  • Organization support: Browse both personal and organization repositories
  • OAuth scope fix: Added read:org scope for proper organization detection
  • Comprehensive error handling: Graceful handling of API failures, network issues
  • Real-time UI updates: Loading states, connected/disconnected states, toast notifications
  • Performance optimization: Parallel API calls, efficient filtering with useMemo

Technical Changes

  • New API endpoint: GET /api/github/repositories - Fetches user accounts and repositories
  • Enhanced GitHub service: Added organization listing and parallel API calls
  • OAuth scope update: Changed from 'read:user user:email repo' to 'read:user user:email repo read:org'
  • Documentation: Comprehensive changelog and use case documentation
  • Custom commands: Added /changelog and /usecase commands for future documentation

Files Changed

  • app/api/github/repositories/route.ts - New API endpoint
  • components/github-repository-selector.tsx - Main UI component
  • lib/github.ts - Enhanced GitHub service with organization support
  • lib/auth.ts - Fixed OAuth scope for organization detection
  • app/projects/[id]/github/page.tsx - Updated to use new component
  • package.json - Version bump to v0.2.2
  • Documentation files with comprehensive technical details

Breaking Changes

None. Fully backward compatible enhancement.

Migration Notes

  • Users with organizations must re-authenticate with GitHub to get new OAuth token with read:org scope
  • Users without organizations see no change in functionality
  • Existing repository connections are preserved

🤖 Generated with Claude Code

Che-Zhu and others added 3 commits October 22, 2025 23:44
- Replace manual text input with dropdown menu
- Show all user-owned repositories from GitHub API
- Add repository selection and disconnection functionality
- Create new API endpoint for fetching user repositories
- Update version to 0.2.0

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add parallel GitHub API calls for user info, organizations, and repositories
- Build accounts array with personal account and organizations
- Filter repositories by selected account (personal or organization)
- Auto-select personal account by default on component mount
- Add account type indicator "(Org)" for organization accounts
- Update UI to show two-tier dropdown system (account selector → repository selector)
- Enhance empty states to show "No repositories found in [account]"
- Maintain backward compatibility for users without organizations
- Add comprehensive documentation with use case and changelog
- Update GitHub service with listOrganizations() method

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
- Add /changelog and /usecase custom commands for documentation
- Fix OAuth scope to include read:org for organization detection
- Update documentation to reflect OAuth scope fix
- Remove commit hashes from changelog format
- Upgrade package version to v0.2.2

Fixes issue where organizations weren't detected despite user having access
on GitHub. Users must re-authenticate to get new OAuth token with read:org scope.

🤖 Generated with [Claude Code](https://claude.com/claude-code)

Co-Authored-By: Claude <noreply@anthropic.com>
@fanux fanux merged commit 5d9ee15 into FullAgent:main Oct 23, 2025
@Che-Zhu Che-Zhu deleted the feat/github-repo-dropdown branch November 9, 2025 07:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

GitHub Project Association

2 participants