CreateSCMIntegration
Creates a new SCM integration for a runner.
Use this method to:
- Configure source control access
- Set up repository integrations
- Enable code synchronization
Examples
-
Create GitHub integration:
Sets up GitHub SCM integration.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" scmId: "github" host: "github.com" oauthClientId: "client_id" oauthPlaintextClientSecret: "client_secret"
Body ParametersJSON
issuer_url can be set to override the authentication provider URL, if it doesn’t match the SCM host.
oauth_client_id is the OAuth app’s client ID, if OAuth is configured. If configured, oauth_plaintext_client_secret must also be set.
oauth_plaintext_client_secret is the OAuth app’s client secret in clear text. This will first be encrypted with the runner’s public key before being stored.
scm_id references the scm_id in the runner’s configuration schema that this integration is for
virtual_directory is the virtual directory path for Azure DevOps Server (e.g., “/tfs”). This field is only used for Azure DevOps Server SCM integrations and should be empty for other SCM types. Azure DevOps Server APIs work without collection when PAT scope is ‘All accessible organizations’.
CreateSCMIntegration
curl https://app.gitpod.io/api/gitpod.v1.RunnerConfigurationService/CreateSCMIntegration \
-H 'Content-Type: application/json' \
-H "Authorization: Bearer $GITPOD_API_KEY" \
-d '{}'{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}Returns Examples
{
"id": "182bd5e5-6e1a-4fe4-a799-aa6d9a6ab26e"
}