File tree Expand file tree Collapse file tree 5 files changed +19
-7
lines changed Expand file tree Collapse file tree 5 files changed +19
-7
lines changed Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const io = require("console-read-write");
10
10
const { cyan, green } = require ( "chalk" ) ;
11
11
const axios = require ( "axios" ) ;
12
12
const box = require ( "./box.js" ) ;
13
+ const exit = require ( "./exit.js" ) ;
13
14
let headers ;
14
15
try {
15
16
headers = require ( `${ pwd } /auth.js` ) ;
@@ -53,11 +54,13 @@ module.exports = async () => {
53
54
box ( name , msg ) ;
54
55
55
56
io . write ( "" ) ;
56
- io . write ( green ( `Issue Link -> ${ res . data . html_url } \n` ) ) ;
57
+ io . write ( green ( `Issue Link -> ${ res . data . html_url } ` ) ) ;
58
+ exit ( ) ;
57
59
} )
58
60
. catch ( ( err ) => {
59
61
const name = "⚠️ WARNING" ;
60
62
const msg = "Issue Creation Failed!!" ;
61
63
box ( name , msg ) ;
64
+ exit ( ) ;
62
65
} ) ;
63
66
} ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const io = require("console-read-write");
10
10
const { cyan, green } = require ( "chalk" ) ;
11
11
const axios = require ( "axios" ) ;
12
12
const box = require ( "./box.js" ) ;
13
+ const exit = require ( "./exit.js" ) ;
13
14
let headers ;
14
15
try {
15
16
headers = require ( `${ pwd } /auth.js` ) ;
@@ -63,11 +64,13 @@ module.exports = async () => {
63
64
const msg = "Repo Successfully Created!!" ;
64
65
box ( name , msg ) ;
65
66
io . write ( "" ) ;
66
- io . write ( green ( `Repo Link -> ${ res . data . html_url } \n` ) ) ;
67
+ io . write ( green ( `Repo Link -> ${ res . data . html_url } ` ) ) ;
68
+ exit ( ) ;
67
69
} )
68
70
. catch ( ( err ) => {
69
71
const name = "⚠️ WARNING" ;
70
72
const msg = "Repo Creation Failed!!" ;
71
73
box ( name , msg ) ;
74
+ exit ( ) ;
72
75
} ) ;
73
76
} ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const io = require("console-read-write");
10
10
const { cyan } = require ( "chalk" ) ;
11
11
const axios = require ( "axios" ) ;
12
12
const box = require ( "./box.js" ) ;
13
+ const exit = require ( "./exit.js" ) ;
13
14
let headers ;
14
15
try {
15
16
headers = require ( `${ pwd } /auth.js` ) ;
@@ -27,20 +28,23 @@ module.exports = async () => {
27
28
. then ( ( res ) => {
28
29
for ( let i = 0 ; i < res . data . length ; i ++ ) {
29
30
if ( res . data [ i ] . type === "PushEvent" ) {
30
- const name = "✉️ EMAIL" ;
31
+ const name = "✉️ EMAIL" ;
31
32
box ( name , res . data [ i ] . payload . commits [ 0 ] . author . email ) ;
33
+ exit ( ) ;
32
34
break ;
33
35
}
34
36
if ( i === res . data . length - 1 ) {
35
37
const name = "⚠️ WARNING" ;
36
38
const msg = "No Email Found!!" ;
37
39
box ( name , msg ) ;
40
+ exit ( ) ;
38
41
}
39
42
}
40
43
} )
41
44
. catch ( ( err ) => {
42
45
const name = "⚠️ WARNING" ;
43
46
const msg = "Cannot Access Email!!" ;
44
47
box ( name , msg ) ;
48
+ exit ( ) ;
45
49
} ) ;
46
50
} ;
Original file line number Diff line number Diff line change @@ -10,7 +10,7 @@ const io = require("console-read-write");
10
10
const { cyan } = require ( "chalk" ) ;
11
11
const axios = require ( "axios" ) ;
12
12
const box = require ( "./box.js" ) ;
13
- const table = require ( "./repoOutput.js" ) ;
13
+ const display = require ( "./repoOutput.js" ) ;
14
14
const clear = require ( "clear" ) ;
15
15
const exit = require ( "./exit" ) ;
16
16
@@ -38,7 +38,7 @@ module.exports = async () => {
38
38
io . write ( "" ) ;
39
39
40
40
for ( let i = 0 ; i < res . data . length ; i ++ ) {
41
- table (
41
+ display (
42
42
i + 1 ,
43
43
res . data [ i ] . name ,
44
44
res . data [ i ] . fork ,
@@ -52,10 +52,9 @@ module.exports = async () => {
52
52
exit ( ) ;
53
53
} )
54
54
. catch ( ( err ) => {
55
- console . log ( err ) ;
56
-
57
55
const name = "⚠️ WARNING" ;
58
56
const msg = "Couldn't Get Repos!!" ;
59
57
box ( name , msg ) ;
58
+ exit ( ) ;
60
59
} ) ;
61
60
} ;
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ const io = require("console-read-write");
10
10
const { cyan } = require ( "chalk" ) ;
11
11
const axios = require ( "axios" ) ;
12
12
const box = require ( "./box.js" ) ;
13
+ const exit = require ( "./exit.js" ) ;
13
14
let headers ;
14
15
try {
15
16
headers = require ( `${ pwd } /auth.js` ) ;
@@ -32,10 +33,12 @@ module.exports = async () => {
32
33
const name = "⭐️ STARS" ;
33
34
const data = res . data . stargazers_count ;
34
35
box ( name , data ) ;
36
+ exit ( ) ;
35
37
} )
36
38
. catch ( ( err ) => {
37
39
const name = "⚠️ WARNING" ;
38
40
const msg = "Cannot Access Stars!!" ;
39
41
box ( name , msg ) ;
42
+ exit ( ) ;
40
43
} ) ;
41
44
} ;
You can’t perform that action at this time.
0 commit comments