Skip to content

Built for people who want to own their automations. Join the waitlist for an invite.

Package listing

@kody/gitlab

src/accounts.ts

33 lines · 914 B · TypeScript
export type {
	GitlabAuthInput,
	GitlabAuthLaneInfo,
	GitlabAuthMode,
	GitlabResolvedAuth,
} from './types.ts'
export {
	DEFAULT_GITLAB_INTEGRATION_NAME,
	DEFAULT_GITLAB_SECRET_NAME,
	GITLAB_OAUTH_CONNECT_URL,
	GITLAB_PAT_SETUP_URL,
	accounts,
	buildOauthConnectUrl,
	buildPatSetupUrl,
	resolveGitlabAuth,
} from './core.ts'
import { accounts } from './core.ts'

/**
 * List GitLab auth lanes (OAuth vs PAT) and selection guidance.
 *
 * Multi-account: connect extra GitLab identities under distinct integration
 * names (`gitlab-work`, …) and pass `integrationName` on each call. There are
 * no hard-coded personal aliases or project paths.
 *
 * @example
 * import listGitlabAccounts from 'kody:@kody/gitlab/accounts'
 * const lanes = listGitlabAccounts()
 * // => [{ lane: 'oauth', integrationName: 'gitlab', default: true, ... }, ...]
 */
export default function listGitlabAccounts() {
	return accounts()
}