src.integrations.label_helper module#
Helper module for managing labels in kanban-mcp.
This module provides utility functions for working with labels, handling the specific requirements of the kanban-mcp label manager including: - Using proper color names from the allowed enum - Creating labels before adding them to cards - Managing label IDs for card operations
- class src.integrations.label_helper.LabelManagerHelper[source]#
Bases:
objectHelper class for managing kanban labels.
- VALID_COLORS = ['berry-red', 'pumpkin-orange', 'lagoon-blue', 'pink-tulip', 'light-mud', 'orange-peel', 'bright-moss', 'antique-blue', 'dark-granite', 'lagune-blue', 'sunny-grass', 'morning-sky', 'light-orange', 'midnight-blue', 'tank-green', 'gun-metal', 'wet-moss', 'red-burgundy', 'light-concrete', 'apricot-red', 'desert-sand', 'navy-blue', 'egg-yellow', 'coral-green', 'light-cocoa']#
- DEFAULT_LABEL_COLORS = {'api': 'berry-red', 'authentication': 'midnight-blue', 'backend': 'berry-red', 'bug': 'midnight-blue', 'complex': 'berry-red', 'database': 'pumpkin-orange', 'deployment': 'pumpkin-orange', 'design': 'lagune-blue', 'devops': 'tank-green', 'django': 'bright-moss', 'documentation': 'sunny-grass', 'enhancement': 'bright-moss', 'feature': 'pink-tulip', 'frontend': 'lagoon-blue', 'fullstack': 'midnight-blue', 'high': 'berry-red', 'high-priority': 'red-burgundy', 'implementation': 'berry-red', 'infrastructure': 'tank-green', 'javascript': 'egg-yellow', 'low': 'bright-moss', 'medium': 'egg-yellow', 'moderate': 'egg-yellow', 'nodejs': 'sunny-grass', 'performance': 'orange-peel', 'python': 'bright-moss', 'react': 'lagoon-blue', 'refactor': 'light-concrete', 'security': 'midnight-blue', 'setup': 'pink-tulip', 'simple': 'bright-moss', 'testing': 'sunny-grass', 'ui': 'lagune-blue', 'urgent': 'red-burgundy', 'ux': 'lagune-blue'}#
- async ensure_label_exists(name, color=None)[source]#
Ensure a label exists, creating it if necessary.
- Parameters:
- Returns:
ID of the label (existing or newly created)
- Return type:
- Raises:
ValueError – If the color is not in the valid colors list
- async add_labels_to_card(card_id, label_names)[source]#
Add multiple labels to a card, creating them if necessary.