DefaultObjectiveMapping returns the built-in default label-to-value mapping.
()
| 120 | |
| 121 | // DefaultObjectiveMapping returns the built-in default label-to-value mapping. |
| 122 | func DefaultObjectiveMapping() *ObjectiveMapping { |
| 123 | return &ObjectiveMapping{ |
| 124 | LabelToValue: map[string]int{ |
| 125 | "critical": 100, |
| 126 | "p0": 100, |
| 127 | "high-priority": 50, |
| 128 | "copilot-opt": 50, |
| 129 | "p1": 50, |
| 130 | "security-fix": 75, |
| 131 | "p2": 25, |
| 132 | "medium-priority": 25, |
| 133 | "performance": 30, |
| 134 | "p3": 10, |
| 135 | "low-priority": 10, |
| 136 | "documentation": 5, |
| 137 | }, |
| 138 | MultiLabelLogic: "max", |
| 139 | PriorityLabels: []string{"critical", "p0", "copilot-opt", "high-priority", "security-fix", "p1", "performance"}, |
| 140 | } |
| 141 | } |
| 142 | |
| 143 | // LoadObjectiveMappingFromConfig loads the mapping from environment, config file, or defaults. |
| 144 | // Precedence: |
no outgoing calls