Skip to content

Conversation

Nirvana77
Copy link

@Nirvana77 Nirvana77 commented May 10, 2025

Summary

This PR adds GitHub OAuth App support for indexing repositories using the existing pipeline (github_to_entries.py). It allows users to authenticate via GitHub and select repositories for indexing using access tokens.

This is primarily a self-contained feature and does not affect other parts of the codebase outside the GitHub integration.


What’s Included

  • New API endpoints for GitHub OAuth authentication and repo selection (api_github.py)
  • .env support for:
    • GITHUB_CLIENT_ID
    • GITHUB_CLIENT_SECRET
    • GITHUB_REDIRECT_URI
  • Integration with the existing GitHub content processor (github_to_entries.py)
  • GitHub helper logic to handle OAuth exchange and repo listing

Notes

  • Repo data is only updated when the user reselects the repository from the /settings/content/github UI.
  • A background job for auto-refresh is being experimented with but is not included in this PR.

Testing

To test this PR, you'll need to create a GitHub OAuth App and add the following environment variables:

GITHUB_CLIENT_ID=your-client-id
GITHUB_CLIENT_SECRET=your-client-secret
GITHUB_REDIRECT_URI=http://localhost:42110/api/github/callback

Let me know if you'd like me to include setup instructions or a sample .env file in the repo/docs.


Related

@Nirvana77 Nirvana77 marked this pull request as ready for review May 12, 2025 07:05
@Nirvana77 Nirvana77 marked this pull request as draft May 12, 2025 07:09
@Nirvana77 Nirvana77 marked this pull request as ready for review May 12, 2025 07:09
@Nirvana77
Copy link
Author

Hi @debanjum, the PR is ready for review whenever you have time. Let me know if you'd like any changes or additional tests.

PR link: #1175

@debanjum debanjum force-pushed the master branch 2 times, most recently from 535f353 to 0f0cfba Compare July 9, 2025 06:27
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.

1 participant