Connect a GitHub repository
Creates a new private GitHub repository and connects the app to it.
Only the app’s owner can connect a repository, and the workspace plan has to include the GitHub integration. Read List GitHub organizations for the org_name and installation_id to send.
The call holds the connection while it creates the repository, installs the sync webhook, and pushes the app’s current code as the first commit, so it takes considerably longer than the other endpoints here. From then on the repository is where the app’s code lives: Base44 pushes each change to it, and you bring work done in GitHub back with Pull changes from GitHub.
The repository must not exist yet. Send a repo_name of 1 to 100 characters made of letters, digits, hyphens, underscores or periods, starting and ending with a letter or digit. An app that already has a connection can’t connect again, and disconnecting one happens in the builder rather than through this API.
If that first push fails, Base44 undoes the connection, but the repository it already created stays on GitHub. Delete it there or send a different repo_name before you retry, or the retry fails on the repository already existing.
The webhook is best effort. Read webhook_active from Get GitHub connection afterwards: while it is false, GitHub isn’t telling Base44 about pushes, so bring commits in with Pull changes from GitHub rather than waiting for them to arrive on their own.
Authorizations
Personal API key.
Path Parameters
ID of the app to connect to a GitHub repository.
Body
Request to connect a repository.
GitHub username or organization to create the repository under, as returned in login by List GitHub organizations.
"base44"
Name for the new repository. 1 to 100 characters made of letters, digits, hyphens, underscores or periods, starting and ending with a letter or digit, and it must not already exist on the account.
"lead-tracker"
ID of the Base44 GitHub App installation on that account, as returned in installation_id by List GitHub organizations.
"58231904"
Description for the new repository. Defaults to the app's name.
"Sales lead tracker"
Response
The repository that was created and connected.
Result of connecting a repository.
ID of the connection Base44 stored for this app.
"6890b1c4f2a7e3105d8a4472"
URL of the repository on GitHub.
"https://github.com/base44/lead-tracker"
Full repository name, as owner/repo.
"base44/lead-tracker"
URLs and CLI command for cloning the new repository.
Default branch of the new repository. Base44 pushes the app's code to this branch.
"main"