ValidateRunnerConfiguration
client.runners.configurations.validate(ConfigurationValidateParams { environmentClass, runnerId, scmIntegration } body, RequestOptionsoptions?): ConfigurationValidateResponse { environmentClass, scmIntegration }
POST/gitpod.v1.RunnerConfigurationService/ValidateRunnerConfiguration
Validates a runner configuration.
Use this method to:
- Check configuration validity
- Verify integration settings
- Validate environment classes
Examples
-
Validate SCM integration:
Checks if an SCM integration is valid.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" scmIntegration: id: "integration-id" scmId: "github" host: "github.com" oauthClientId: "client_id" oauthPlaintextClientSecret: "client_secret"
ValidateRunnerConfiguration
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
const response = await client.runners.configurations.validate({
runnerId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
scmIntegration: {
host: 'github.com',
id: 'integration-id',
oauthClientId: 'client_id',
oauthPlaintextClientSecret: 'client_secret',
scmId: 'github',
},
});
console.log(response.environmentClass);{
"environmentClass": {
"configurationErrors": [
{
"error": "error",
"key": "key"
}
],
"descriptionError": "descriptionError",
"displayNameError": "displayNameError",
"valid": true
},
"scmIntegration": {
"hostError": "hostError",
"oauthError": "oauthError",
"patError": "patError",
"scmIdError": "scmIdError",
"valid": true
}
}Returns Examples
{
"environmentClass": {
"configurationErrors": [
{
"error": "error",
"key": "key"
}
],
"descriptionError": "descriptionError",
"displayNameError": "displayNameError",
"valid": true
},
"scmIntegration": {
"hostError": "hostError",
"oauthError": "oauthError",
"patError": "patError",
"scmIdError": "scmIdError",
"valid": true
}
}