KBAISE/ for lovable
Library
Docs

Connect your app to GitHub API

about 5 minBuildingchecked 2d agoOfficial page
The short version

You can connect your Lovable app to GitHub to read and update things like repositories, issues, and pull requests. This lets you build tools and automations that use your GitHub data.

Anyone building an app that needs to interact with GitHub data, like showing issue dashboards or automating tasks, needs this.

Do this, in order

  1. 1

    Go to the 'Connectors' section in Lovable and choose 'GitHub API'.

    This is where you start the process of setting up a connection to GitHub.

  2. 2

    Select 'Use the connector' when prompted, then click 'Add connection' and choose 'App + chat connector'.

    This tells Lovable you want to create a shared connection for your app and chat, not sync code.

  3. 3

    Give your connection a clear name, like 'GitHub Production'.

    This name helps you identify this specific GitHub connection within Lovable.

  4. 4

    Choose how you want to connect: either 'GitHub' to sign in with your GitHub account (easiest) or 'Use your own credentials' if you have a personal access token.

    This determines the method Lovable uses to securely access your GitHub account.

  5. 5

    If using your GitHub account, review the requested permissions (scopes) and click 'Connect' to authorize Lovable through GitHub's pop-up window.

    This grants Lovable the necessary access to perform actions on your behalf in GitHub. Make sure your browser allows pop-ups.

  6. 6

    If using a personal access token, paste your token into the 'Personal access token' field and click 'Connect'.

    This provides Lovable with the specific key to access your GitHub account with the permissions you set for that token.

  7. 7

    Optionally, share the connection with other members of your workspace.

    By default, the connection is private, but you can make it available to your team if they also need to use it in their projects.

Paste this into your project

Use GitHub and build a dashboard that lists open issues across my repositories, grouped by label.

Words decoded

Personal Access Token
A special password-like key you create in GitHub that allows other applications, like Lovable, to access your GitHub account with specific permissions, without needing your main GitHub password.
OAuth
A secure way for you to give Lovable permission to access your GitHub account without sharing your username and password directly with Lovable. You sign in through GitHub, and GitHub tells Lovable it's okay to access certain things.
Scopes
These are specific permissions you grant to Lovable when connecting to GitHub, like 'read repositories' or 'create issues'. You choose what Lovable is allowed to do.
REST API
A standard way for different computer programs to talk to each other over the internet. Lovable uses the GitHub REST API to send and receive information from GitHub.
Repository
Often shortened to 'repo', this is where your project's code, files, and history are stored on GitHub.
Pull Request (PR)
A way to propose changes to a project's code on GitHub. It allows others to review and discuss your changes before they are added to the main project.
Issue
A way to track tasks, bugs, or enhancements for a project on GitHub.
App + chat connector
A type of connection in Lovable that is shared across your projects and can be used by your apps and in the project chat.
App user connector
A type of connection in Lovable where each person using your app connects their *own* GitHub account, so they only see and interact with their own GitHub data.

Where people get stuck

  • Forgetting to allow pop-ups in your browser, which can prevent the GitHub authorization window from appearing.
  • Not granting the necessary permissions (scopes) for your app to do what you want on GitHub, leading to errors.
  • Sharing your personal access token publicly, as it functions like a password and should be kept secure.
  • Using a personal access token that has expired or been revoked, which will stop your app from working with GitHub.
  • Confusing this 'App + chat connector' with 'GitHub Git sync', which is for syncing your Lovable project's code to GitHub, not for your app to interact with GitHub data.

The short version, steps, decoder and prompt on this page are written automatically from Lovable's own documentation and can lag or misread it. The official page is always the authority.