Files
huly-platform/services/github/pod-github/src/collaborator.ts
T
2024-12-25 11:53:01 +07:00

18 lines
595 B
TypeScript

//
// Copyright © 2024 Hardcore Engineering Inc.
//
//
import { CollaboratorClient, getClient as getCollaboratorClient } from '@hcengineering/collaborator-client'
import { systemAccountEmail, WorkspaceId } from '@hcengineering/core'
import { generateToken } from '@hcengineering/server-token'
import config from './config'
/**
* @public
*/
export function createCollaboratorClient (workspaceId: WorkspaceId): CollaboratorClient {
const token = generateToken(systemAccountEmail, workspaceId, { mode: 'github' })
return getCollaboratorClient(workspaceId, token, config.CollaboratorURL)
}