-
Notifications
You must be signed in to change notification settings - Fork 813
feat: add support for private GitHub repository cloning with OAuth authentication #193
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: main
Are you sure you want to change the base?
Conversation
- Implement token-based authentication for cloning private GitHub repositories. - Modify _check_repo_exists to use GitHub API for repo existence check with authentication. - Update clone_repo to handle token-based URLs for private repos. - Add .qodo/ to .gitignore.
- Introduce OAuth authentication with GitHub to handle private repositories. - Modify clone_repo to accept a token for authenticated cloning. - Implement OAuth routes for login and logout in src/server/oauth.py. - Update navbar to display login/logout options based on authentication status. - Add session middleware to manage user sessions. - Update query_processor to pass user token for private repo access. - Add Authlib and itsdangerous to requirements.txt for OAuth functionality.
I'm still working on adding new tests and updating the existing ones |
…clone options - Update clone_repo tests to verify that the private repository token is correctly passed to _check_repo_exists. - Refactor test_clone_repo_with_commit and test_clone_repo_without_commit to inspect git command arguments (e.g. ensuring --recurse-submodules, shallow clone flags, and checkout behavior). - Update error message expectations for nonexistent repositories. - Streamline assertions in tests for invalid URLs and local paths. - Refactor tests for custom branches and commit checkouts to verify proper argument order and flag usage. - Add new tests to validate proper behavior for private repositories: one for a valid token scenario and one for missing token handling.
…/failure, logout) and update template directory path to src/server/templates.
cool ! |
Hi, Thanks for your work on implementing private repository access via GitHub OAuth. I’ve been exploring a slightly different approach that uses directly provided Personal Access Tokens (PATs) via a new I noticed that both approaches modify some of the same core files, so they wouldn’t be compatible right away. That being said, I'm perfectly fine with closing my PR if the OAuth approach is preferred, but I wanted to throw this idea out there for discussion or potential collaboration. Thanks again for all your efforts! |
GitHub OAuth Integration for Private Repositories
This update introduces comprehensive support for handling private GitHub repositories by integrating GitHub OAuth authentication. The key updates include:
🔑 Authentication & Repository Access
1. Secure Repository Cloning
clone_repo
function: Now accepts an optional OAuth token._check_repo_exists
now verifies the repository using authentication headers.2. OAuth Authentication Routes
src/server/oauth.py
.3. Session Middleware for Token Management
src/server/main.py
.query_processor
) to access and pass tokens toclone_repo
.🖥️ UI & User Experience
4. Authentication UI Updates
navbar.jinja
:📖 Documentation & Configuration
5. Updated README.md
🛠️ Miscellaneous Enhancements
6. Additional Improvements
.gitignore
updates: Ignores new directories.requirements.txt
updates: Adds dependencies for:Authlib
itsdangerous
These changes enhance security, usability, and documentation, enabling seamless private repository integration via GitHub OAuth. 🚀
