ListSCMOrganizations
client.runners.listScmOrganizations(RunnerListScmOrganizationsParams { token, pageSize, pagination, 3 more } params, RequestOptionsoptions?): OrganizationsPage<RunnerListScmOrganizationsResponse { isAdmin, name, url } >
POST/gitpod.v1.RunnerService/ListSCMOrganizations
Lists SCM organizations the user belongs to.
Use this method to:
- Get all organizations for a user on a specific SCM host
- Check organization admin permissions for webhook creation
Examples
-
List GitHub organizations:
Lists all organizations the user belongs to on GitHub.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" scmHost: "github.com" -
Search GitLab groups:
Returns the first page of GitLab groups matching the substring.
runnerId: "d2c94c27-3b76-4a42-b88c-95a85e392c68" scmHost: "gitlab.com" query: "platform" pagination: pageSize: 25
ListSCMOrganizations
import Gitpod from '@gitpod/sdk';
const client = new Gitpod({
bearerToken: process.env['GITPOD_API_KEY'], // This is the default and can be omitted
});
// Automatically fetches more pages as needed.
for await (const runnerListScmOrganizationsResponse of client.runners.listScmOrganizations({
runnerId: 'd2c94c27-3b76-4a42-b88c-95a85e392c68',
scmHost: 'github.com',
})) {
console.log(runnerListScmOrganizationsResponse.isAdmin);
}{
"organizations": [
{
"isAdmin": true,
"name": "name",
"url": "url"
}
],
"pagination": {
"nextToken": "nextToken"
}
}Returns Examples
{
"organizations": [
{
"isAdmin": true,
"name": "name",
"url": "url"
}
],
"pagination": {
"nextToken": "nextToken"
}
}