Looks for locale files in a repository, so the setup form can be filled in.
HTTP
GET /integrations/github/scanAccess: Session token only. API keys get 403 with insufficient_scope.
Role: Organisation owner or admin.
Query parameters #
| Parameter | Required | Description |
|---|---|---|
repo | yes | The repository, such as acme/shop. |
installationId | yes | The installationId of a connected account, from the overview. |
sourceLanguage | no | The language code of the source file. Default en. |
Response 200 #
What was found.
JSON
{
"defaultBranch": "main",
"name": "shop",
"source": "locales/en.json",
"pattern": "locales/{lang}.json",
"languages": ["de", "fr"],
"ignored": []
}Response fields #
| Field | Type | Description |
|---|---|---|
defaultBranch | string | The default branch. |
name | string | The name of the repository. |
source | string or null | The guessed path of the source file, such as locales/en.json. |
pattern | string or null | The guessed pattern of the translation files, with {lang}. |
languages | list of string | Languages that already have a file. |
ignored | list | Paths that look like locale files but were not used. |
Errors #
| Status | error | When |
|---|---|---|
| 401 | unauthenticated | The token is missing or not valid. |
| 403 | forbidden | You are not an owner or admin. |
| 503 | github_not_configured | The GitHub integration is not set up on this server. |
| 404 | not_found | The account is not connected to your organisation. |
| 422 | invalid_request | repo is not valid. |
| 502 | github_error | GitHub refused the request. message says why. |
| 429 | rate_limited | Too many requests, see Rate limiting. |
See Errors for the error format.