File tree Expand file tree Collapse file tree
Expand file tree Collapse file tree Original file line number Diff line number Diff line change 11module . exports = {
2- Authorization : "" ,
3- } ;
2+ Authorization : "msaaddev:525de88db1b12ade6800e5d0cd52e0d6455bff32 " ,
3+ }
Original file line number Diff line number Diff line change @@ -21,9 +21,6 @@ module.exports = async () => {
2121 io . write ( cyan ( "> Enter GitHub Username" ) ) ;
2222 username = await io . read ( ) ;
2323 io . write ( "" ) ;
24- io . write ( cyan ( "> Enter GitHub Password" ) ) ;
25- password = await io . read ( ) ;
26- io . write ( "" ) ;
2724 }
2825 io . write ( cyan ( "> Enter Repo Title" ) ) ;
2926 const title = await io . read ( ) ;
@@ -40,17 +37,17 @@ module.exports = async () => {
4037 const auto_init = await io . read ( ) ;
4138 io . write ( "" ) ;
4239
43- /* const head = {
44- Authorization: `Basic ${username}:${password}`,
45- }; */
40+ const payLoad = {
41+ name : title ,
42+ description,
43+ private,
44+ auto_init,
45+ } ;
4646
4747 await axios
48- . post ( `https://api.github.com/user/repos` , {
48+ . post ( `https://api.github.com/user/repos? ${ headers . Authorization } ` , {
4949 headers : headers ,
50- name : title ,
51- description,
52- private,
53- auto_init,
50+ body : JSON . stringify ( payLoad ) ,
5451 } )
5552 . then ( ( res ) => {
5653 const name = "π DONE" ;
Original file line number Diff line number Diff line change 11module . exports = {
2- username : "" ,
3- } ;
2+ username : "msaaddev " ,
3+ }
You canβt perform that action at this time.
0 commit comments