Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- var execute = function(table) {
- var gh = new GitHub({
- username: config.username,
- password: config.password
- });
- var db = gh.getRepo(config.username, config.repo);
- console.log(db);
- options = {
- name: config.name,
- email: config.email,
- encode: false
- }
- db.writeFile(config.branch, "new_file", btoa("new_file content"), "added new_file", options).then(
- function(succ) {
- // GitHub.bundle.js:1065 Uncaught (in promise) TypeError: Cannot read property '__currentTree' of undefined
- db.move(config.branch, "new_file", "new_fn").then(
- function(succ) {
- console.log(succ);
- }, function(fail) {
- console.log("failure");
- console.log(fail);
- }
- )
- }, function(fail) {
- console.log(fail);
- }
- );
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement