Skip to main content

writeTeam

Callable

  • writeTeam(catalogDir: string): (team: Team, options?: { override?: boolean }) => Promise<void>

  • Write a team to EventCatalog.

    @example
    import utils from '@eventcatalog/utils';

    const { writeTeam } = utils('/path/to/eventcatalog');

    // Write a team to the catalog
    // team would be written to teams/EventCatalogCoreTeam
    await writeTeam({
    id: 'eventcatalog-core-team',
    name: 'EventCatalogCoreTeam',
    members: ['dboyne', 'asmith', 'msmith'],
    email: 'test@test.com',
    slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
    });

    // Write a team to the catalog and override the existing content (if there is any)
    await writeTeam({
    id: 'eventcatalog-core-team',
    name: 'EventCatalogCoreTeam',
    members: ['dboyne', 'asmith', 'msmith'],
    email: 'test@test.com',
    slackDirectMessageUrl: https://yourteam.slack.com/channels/boyney123
    }, { override: true });