11#!/usr/bin/env node
22
33import yargs from 'yargs' ;
4- import clipboardy from 'clipboardy' ;
54
65import {
76 JobParser ,
@@ -222,11 +221,6 @@ const args = yargs(hideBin(process.argv))
222221 handler
223222 } )
224223 . demandCommand ( 1 , 'must provide a valid command' )
225- . option ( 'copy' , {
226- describe : 'Write the results as markdown to clipboard' ,
227- default : false ,
228- type : 'boolean'
229- } )
230224 . option ( 'skip-more-than' , {
231225 describe : 'Skip jobs that fail more than <limit> builds, when --stat is true, default to 10.' ,
232226 type : 'number' ,
@@ -397,7 +391,7 @@ class CICommand {
397391 this . json = this . json . concat ( json ) ;
398392 }
399393
400- if ( ( argv . copy || argv . markdown ) && ! argv . stats ) {
394+ if ( argv . markdown && ! argv . stats ) {
401395 this . markdown += build . formatAsMarkdown ( ) ;
402396 }
403397 }
@@ -408,16 +402,6 @@ class CICommand {
408402 async serialize ( ) {
409403 const { argv, cli } = this ;
410404
411- if ( argv . copy ) {
412- if ( this . markdown ) {
413- clipboardy . writeSync ( this . markdown ) ;
414- cli . separator ( '' ) ;
415- cli . log ( 'Written markdown to clipboard' ) ;
416- } else {
417- cli . error ( 'No markdown generated' ) ;
418- }
419- }
420-
421405 if ( argv . markdown ) {
422406 if ( this . markdown ) {
423407 writeFile ( argv . markdown , this . markdown ) ;
@@ -483,7 +467,7 @@ class WalkCommand extends CICommand {
483467 cli . log ( '' ) ;
484468 aggregator . display ( ) ;
485469
486- if ( argv . markdown || argv . copy ) {
470+ if ( argv . markdown ) {
487471 this . markdown = aggregator . formatAsMarkdown ( ) ;
488472 }
489473 }
@@ -564,7 +548,7 @@ class DailyCommand extends CICommand {
564548 cli . log ( '' ) ;
565549 aggregator . display ( ) ;
566550
567- if ( argv . markdown || argv . copy ) {
551+ if ( argv . markdown ) {
568552 this . markdown = aggregator . formatAsMarkdown ( ) ;
569553 }
570554 }
0 commit comments