daytonaio / devcontainer-generator

devcontainer.ai - AI generated standardized dev environments
https://devcontainer.ai/
Apache License 2.0
15 stars 12 forks source link

Add GitHub Login and Create PR Button for Committing Devcontainer #9

Open nkkko opened 2 months ago

nkkko commented 2 months ago

Is your feature request related to a problem? Please describe. Currently, users can generate devcontainer.json but have to manually commit it to the repository. Adding a GitHub login and an option to create a pull request (PR) directly from the interface will streamline the process.

Describe the solution you'd like

Describe alternatives you've considered

Additional context

  1. GitHub Login Integration:

    • Use OAuth to handle GitHub authentication.
    • Store user tokens securely for subsequent API calls.
  2. Frontend Changes:

    • Add the "Create PR" button after successful login and devcontainer.json generation.
  3. Backend Changes:

    • Update main.py to handle OAuth callback and store user token.
    • Implement a function to fork the repository, commit changes, and create a pull request using GitHub API.

Example Flow:

Security Considerations: