File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change @@ -130,14 +130,26 @@ export function registerWorkboardCli(params: { program: Command; store: Workboar
130130 . description ( "List Workboard cards" )
131131 . option ( "--board <id>" , "Board id" )
132132 . option ( "--status <status>" , "Filter by status" )
133+ . option ( "--include-archived" , "Include archived cards (default false)" )
133134 . option ( "--json" , "Print JSON" , false )
134- . action ( async ( options : JsonOptions & { board ?: string ; status ?: string } ) => {
135- let cards = await params . store . list ( { boardId : options . board } ) ;
136- if ( options . status ) {
137- cards = cards . filter ( ( card ) => card . status === options . status ) ;
138- }
139- writeCards ( cards , options ) ;
140- } ) ;
135+ . action (
136+ async (
137+ options : JsonOptions & {
138+ board ?: string ;
139+ status ?: string ;
140+ includeArchived ?: boolean ;
141+ } ,
142+ ) => {
143+ let cards = await params . store . list ( { boardId : options . board } ) ;
144+ if ( ! options . includeArchived ) {
145+ cards = cards . filter ( ( card ) => ! card . metadata ?. archivedAt ) ;
146+ }
147+ if ( options . status ) {
148+ cards = cards . filter ( ( card ) => card . status === options . status ) ;
149+ }
150+ writeCards ( cards , options ) ;
151+ } ,
152+ ) ;
141153
142154 workboard
143155 . command ( "create" )
You can’t perform that action at this time.
0 commit comments