Manual
CLI
API
Log in Get started free

Create a project from a GitHub repository

Creates a project, links the repository and opens a pull request that sets up the pipeline.

Creates a project, links the repository and opens a pull request that sets up the pipeline.

HTTP
POST /integrations/github/projects

Access: Session token only. API keys get 403 with insufficient_scope.

Role: Organisation owner or admin.

Request body #

JSON.

FieldTypeRequiredDescription
repostringyesThe repository, such as acme/shop.
installationIdintegeryesThe installationId of a connected account, from the overview.
sourcestringyesPath of the source file in the repository, for example locales/en.json. No leading / or ... At most 200 characters.
translationsstringyesPattern of the translation files, which must contain {lang}, for example locales/{lang}.json.
namestringnoThe name of the project. Default: the name of the repository.
sourceLanguagestringnoDefault en.
targetLanguageslist of stringyesLanguage codes. At least one besides the source language.
JSON
{ "repo": "acme/shop", "installationId": 123, "source": "locales/en.json", "translations": "locales/{lang}.json", "targetLanguages": ["de", "fr"] }

Response 201 #

The project and the link of the pull request.

JSON
{
  "project": { ... },
  "pullRequestUrl": "https://github.com/acme/shop/pull/1"
}

Response fields #

FieldTypeDescription
projectobjectThe project, see Get a project.
pullRequestUrlstringThe pull request that was opened.

Errors #

StatuserrorWhen
401unauthenticatedThe token is missing or not valid.
403forbiddenYou are not an owner or admin.
503github_not_configuredThe GitHub integration is not set up on this server.
409repository_linkedThe repository is linked to another project. projectId says which.
404not_foundThe account is not connected to your organisation.
422invalid_requestrepo is not valid, or source or translations is not a valid path (invalid_path, needs_lang).
502github_errorGitHub refused the request. message says why.
429rate_limitedToo many requests, see Rate limiting.

See Errors for the error format.

Notes #

If linking fails, the project is deleted again.