Skip to content
Ona Docs

UpdateSCMIntegration

client.runners.configurations.scmIntegrations.update(ScmIntegrationUpdateParams { id, issuerUrl, oauthClientId, 3 more } body, RequestOptionsoptions?): ScmIntegrationUpdateResponse
POST/gitpod.v1.RunnerConfigurationService/UpdateSCMIntegration

Updates an existing SCM integration.

Use this method to:

  • Modify integration settings
  • Update credentials
  • Change configuration

Examples

  • Update integration:

    Updates OAuth credentials.

    id: "d2c94c27-3b76-4a42-b88c-95a85e392c68"
    oauthClientId: "new_client_id"
    oauthPlaintextClientSecret: "new_client_secret"
ParametersExpand Collapse
body: ScmIntegrationUpdateParams { id, issuerUrl, oauthClientId, 3 more }
id?: string
formatuuid
issuerUrl?: string | null

issuer_url can be set to override the authentication provider URL, if it doesn’t match the SCM host.

oauthClientId?: string | null

oauth_client_id can be set to update the OAuth app’s client ID. If an empty string is set, the OAuth configuration will be removed (regardless of whether a client secret is set), and any existing Host Authentication Tokens for the SCM integration’s runner and host that were created using the OAuth app will be deleted. This might lead to users being unable to access their repositories until they re-authenticate.

oauthPlaintextClientSecret?: string | null

oauth_plaintext_client_secret can be set to update the OAuth app’s client secret. The cleartext secret will be encrypted with the runner’s public key before being stored.

pat?: boolean | null

pat can be set to enable or disable Personal Access Tokens support. When disabling PATs, any existing Host Authentication Tokens for the SCM integration’s runner and host that were created using a PAT will be deleted. This might lead to users being unable to access their repositories until they re-authenticate.

virtualDirectory?: string | null

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’.

ReturnsExpand Collapse
ScmIntegrationUpdateResponse = unknown

UpdateSCMIntegration

import Gitpod from '@gitpod/sdk';

const client = new Gitpod({
  bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});

const scmIntegration = await client.runners.configurations.scmIntegrations.update({
  id: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
  oauthClientId: 'new_client_id',
  oauthPlaintextClientSecret: 'new_client_secret',
});

console.log(scmIntegration);
{}
Returns Examples
{}