File tree Expand file tree Collapse file tree 1 file changed +16
-2
lines changed
Expand file tree Collapse file tree 1 file changed +16
-2
lines changed Original file line number Diff line number Diff line change 5454 }
5555 }
5656 } ;
57- xhr . setRequestHeader ( 'Accept' , 'application/vnd.github.raw' ) ;
58- xhr . setRequestHeader ( 'Content-Type' , 'application/json' ) ;
57+ xhr . setRequestHeader ( 'Accept' , 'application/vnd.github.raw+json ' ) ;
58+ xhr . setRequestHeader ( 'Content-Type' , 'application/json;charset=UTF-8 ' ) ;
5959 if ( ( options . token ) || ( options . username && options . password ) ) {
6060 xhr . setRequestHeader ( 'Authorization' , options . token
6161 ? 'token ' + options . token
222222 _request ( "DELETE" , repoPath + "/git/refs/" + ref , options , cb ) ;
223223 } ;
224224
225+ // Create a repo
226+ // -------
227+
228+ this . createRepo = function ( options , cb ) {
229+ _request ( "POST" , "/user/repos" , options , cb ) ;
230+ } ;
231+
232+ // Delete a repo
233+ // --------
234+
235+ this . deleteRepo = function ( cb ) {
236+ _request ( "DELETE" , repoPath , options , cb ) ;
237+ } ;
238+
225239 // List all branches of a repository
226240 // -------
227241
You can’t perform that action at this time.
0 commit comments