File tree Expand file tree Collapse file tree 2 files changed +11
-4
lines changed
Expand file tree Collapse file tree 2 files changed +11
-4
lines changed Original file line number Diff line number Diff line change @@ -2,6 +2,7 @@ import { Command, Flags } from "@oclif/core";
22import { makeTable } from "@oclif/table" ;
33import { spawnSync } from "node:child_process" ;
44import fs from "node:fs" ;
5+ import { filenamePrefix , GIT_OUTPUT_FORMAT } from "../../config/constants.ts" ;
56import {
67 ASCI_COLOR_CODES_REGEX ,
78 filenamePrefix ,
@@ -186,6 +187,10 @@ export default class Committers extends Command {
186187 end : row . end ,
187188 totalCommits : row . totalCommits ,
188189 } ) ) ,
190+ headerOptions : {
191+ color : undefined ,
192+ bold : false ,
193+ } ,
189194 } ) ;
190195 } else {
191196 finalReport = makeTable ( {
@@ -218,6 +223,10 @@ export default class Committers extends Command {
218223 name : "Last Commit Date" ,
219224 } ,
220225 ] ,
226+ headerOptions : {
227+ color : undefined ,
228+ bold : false ,
229+ } ,
221230 } ) ;
222231 }
223232 break ;
@@ -227,7 +236,7 @@ export default class Committers extends Command {
227236 try {
228237 fs . writeFileSync (
229238 `${ filenamePrefix } .${ monthly ? "monthly" : "committers" } .${ reportFormat } ` ,
230- finalReport . replace ( ASCI_COLOR_CODES_REGEX , "" ) ,
239+ finalReport ,
231240 {
232241 encoding : "utf-8" ,
233242 } ,
Original file line number Diff line number Diff line change @@ -4,9 +4,7 @@ export const GRAPHQL_PATH = '/graphql';
44export const ANALYTICS_URL = 'https://apps.herodevs.com/api/eol/track' ;
55export const CONCURRENT_PAGE_REQUESTS = 3 ;
66export const PAGE_SIZE = 500 ;
7- export const GIT_OUTPUT_FORMAT = `"${ [ "%h" , "%an" , "%ad" ] . join ( "|" ) } "` ;
8- export const ASCI_COLOR_CODES_REGEX =
9- / [ \u001b \u009b ] [ [ ( ) # ; ? ] * (?: [ 0 - 9 ] { 1 , 4 } (?: ; [ 0 - 9 ] { 0 , 4 } ) * ) ? [ 0 - 9 A - O R Z c f - n q r y = > < ] / g;
7+ export const GIT_OUTPUT_FORMAT = `"${ [ '%h' , '%an' , '%ad' ] . join ( '|' ) } "` ;
108
119let concurrentPageRequests = CONCURRENT_PAGE_REQUESTS ;
1210const parsed = Number . parseInt ( process . env . CONCURRENT_PAGE_REQUESTS ?? '0' , 10 ) ;
You can’t perform that action at this time.
0 commit comments