File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 1111 * 'ci:' will be considered a prefix. This keeps the check simpler as we don't have to match against
1212 * every type and we don't have to check if we are part of a word e.g. 'circus'.
1313 *
14- * TODO: also support Jira number e.g. '[ABCD-123]', '[ABCD-123] my description', and '[ABCD-123]
15- * docs: my description' .
14+ * If there is no colon to indicate a type prefix, but the message looks like a Jira prefix like
15+ * '[ABCD-123]', then use that as a custom prefix .
1616 */
17- function _splitPrefixDesc ( value : string ) {
18- let prefix : string , description : string ;
17+ export function _splitPrefixDesc ( value : string ) {
18+ let prefix = ''
19+ let description = ''
1920
2021 if ( value . includes ( ":" ) ) {
2122 [ prefix , description ] = value . split ( ":" , 2 ) ;
22- } else {
23- [ prefix , description ] = [ "" , value ] ;
23+ }
24+ else {
25+ description = value ;
2426 }
2527
2628 return { prefix, description } ;
You can’t perform that action at this time.
0 commit comments