This repository was archived by the owner on Nov 11, 2025. It is now read-only.
File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -33,16 +33,17 @@ async function addTask(cardId) {
3333 throw new Error ( 'Card has multiple project labels.' ) ;
3434 }
3535 const taskPrefix = taskPrefixes [ 0 ] ;
36- const taskName = `${ taskPrefix } _${ card . idShort } ` ;
37- const cardTaskName = card . name . match ( / (?< = # ) [ a - z 0 - 9 ] + _ [ 0 - 9 ] + / ) ?. [ 0 ] ;
36+
37+ let taskName = card . name . match ( / (?< = # ) [ a - z 0 - 9 _ - ] + / ) ?. [ 0 ] ;
38+
39+ if ( taskName === undefined ) {
40+ taskName = `${ taskPrefix } _${ card . idShort } ` ;
3841
39- if ( cardTaskName === undefined ) {
4042 await trektor . trelloGateway . updateCard ( card . id , {
4143 name : `${ card . name } #${ taskName } ` ,
4244 } ) ;
43- } else if ( cardTaskName !== taskName ) {
44- throw new Error ( 'Card name includes invalid tracking task.' ) ;
4545 }
46+
4647 const workspaces = await trektor . togglGateway . getWorkspaces ( ) ;
4748
4849 if ( workspaces . length === 0 ) {
You can’t perform that action at this time.
0 commit comments