File tree Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Expand file tree Collapse file tree 2 files changed +5
-4
lines changed Original file line number Diff line number Diff line change @@ -5,7 +5,7 @@ await new Command()
5
5
. name ( 'cf-support' )
6
6
. version ( '__APP_VERSION__' )
7
7
. description ( 'Tool to gather information for Codefresh Support' )
8
- . action ( function ( ) {
8
+ . action ( function ( ) {
9
9
this . showHelp ( ) ;
10
10
} )
11
11
. command (
Original file line number Diff line number Diff line change @@ -24,7 +24,7 @@ export async function processData(dirPath, k8sResources) {
24
24
const resources = await fetcher ( ) ;
25
25
26
26
if ( ! resources ) {
27
- continue
27
+ continue ;
28
28
}
29
29
30
30
if ( k8sType == 'pods' ) {
@@ -46,7 +46,9 @@ export async function processData(dirPath, k8sResources) {
46
46
47
47
if ( k8sType == 'events.k8s.io' ) {
48
48
const formattedEvents = resources . items . map ( ( event ) => {
49
- const lastSeen = event . metadata . creationTimestamp || 'Invalid Date' ;
49
+ const lastSeen = event . metadata . creationTimestamp
50
+ ? new Date ( event . metadata . creationTimestamp ) . toISOString ( )
51
+ : 'Invalid Date' ;
50
52
const type = event . type || 'Unknown' ;
51
53
const reason = event . reason || 'Unknown' ;
52
54
const object = `${ event . involvedObject . kind } /${ event . involvedObject . name } ` ;
@@ -63,7 +65,6 @@ export async function processData(dirPath, k8sResources) {
63
65
continue ;
64
66
}
65
67
66
-
67
68
resources . items . map ( ( data ) => {
68
69
delete data . metadata . managedFields ;
69
70
writeYaml ( data , `${ data . metadata . name } _get` , `${ dirPath } /${ k8sType } ` ) ;
You can’t perform that action at this time.
0 commit comments