Skip to main content

Interface: RoadmapPluginOptions

Plugin options interface

These options can be configured in config/plugins/robojs/roadmap.* files to customize the roadmap plugin behavior.

Examples

Basic configuration with Jira provider:

// config/plugins/robojs/roadmap.ts
export default {
provider: {
type: 'jira',
options: {
url: process.env.JIRA_URL,
email: process.env.JIRA_EMAIL,
apiToken: process.env.JIRA_API_TOKEN,
jql: '(issuetype = Epic AND (labels NOT IN ("Private") OR labels IS EMPTY)) OR labels IN ("Public")'
}
}
}

Advanced configuration with pre-instantiated provider:

import { JiraProvider } from '@robojs/roadmap'

const customProvider = new JiraProvider({
type: 'jira',
options: {
url: 'https://company.atlassian.net',
email: '[email protected]',
apiToken: 'secret-token',
jql: 'project = MYPROJECT'
}
})

export default {
provider: customProvider,
autoSync: true,
autocompleteCacheTtl: 600000 // 10 minutes
}

Properties

autocompleteCacheTtl?

optional autocompleteCacheTtl: number;

Time-to-live in milliseconds for autocomplete cache entries (issue types, columns, labels).

Controls how long autocomplete suggestions are cached before being refreshed from the provider. Lower values provide fresher data but increase API calls; higher values reduce API load but may show stale data.

Default Value

300000 (5 minutes)

Remarks

This setting affects all autocomplete handlers in roadmap commands. The cache is per-guild and shared across all autocomplete options.

Example

export default {
autocompleteCacheTtl: 600000 // 10 minutes
}

autoSync?

optional autoSync: boolean;

Whether to automatically sync on startup.

Default Value

false

Remarks

Currently not implemented - reserved for future enhancement


provider?

optional provider: ProviderConfig | RoadmapProvider<ProviderConfig>;

Provider configuration or pre-instantiated provider instance.

Can be either:

  • A ProviderConfig object with type and options
  • A pre-instantiated RoadmapProvider instance (for advanced customization)

If not provided, falls back to environment variables (JIRA_URL, JIRA_EMAIL, JIRA_API_TOKEN).


syncInterval?

optional syncInterval: number;

Interval in milliseconds for automatic syncing.

Remarks

Reserved for future implementation