Create repository
Create a repository in Inspect from a GitHub repository URL. Requires repository add permission; API keys restricted to specific repositories cannot create repositories. Returns 404 when the Inspect GitHub App cannot access the repository.
Base URL
POST
Create a repository in Inspect from a GitHub repository URL. Requires repository add permission; API keys restricted to specific repositories cannot create repositories. Returns 404 when the Inspect GitHub App cannot access the repository.
bearerAuth repositories:writeheader
AuthorizationBearer <token>API key authentication. Use your API key as the bearer token.
Scope: repositories:write
application/json- body
url*Repositories.RepositoryUrlGitHub repository URL, for example https://github.com/acme/widgets. The Inspect GitHub App must have access to the repository.
Format
uriLength
1 <= lengthCreated repository
application/json- response
data*A repository configured in Inspect.
curl -X POST 'https://app.inspect.com/api/v2/repositories' \ -H 'Content-Type: application/json' \ -d '{ "url": "https://github.com/acme/web"}'Example Response
{ "data": { "id": "web", "name": "web", "description": "Acme customer dashboard and marketing site", "organization": "acme", "remote": "github", "github_host": "github", "base_branch": "main", "auto_match_enabled": true, "ci_auto_fix_ignored_checks": [ "codecov/patch" ], "merge_queue": { "provider": "github" }, "automatic_reviews": "on" }}