diff --git a/doc/notes.txt b/doc/notes.txt index 502d6017..3dc7117a 100644 --- a/doc/notes.txt +++ b/doc/notes.txt @@ -167,7 +167,6 @@ TODO: - re-publish repo (bug: doesn't put all files in local repo after publishing) - allow text/binary change - importing from subtree commits to root anyway - - after publishing, only one file remaining - astrocade - keyboard shortcuts - ctrl+alt+l on ubuntu locks screen diff --git a/src/services.ts b/src/services.ts index 9255d614..84e7df1f 100644 --- a/src/services.ts +++ b/src/services.ts @@ -284,13 +284,8 @@ export class GithubService { content: btoa(s) } return repo.contents('README.md').add(config); - }) - .then( () => { + }).then( () => { return this.getGithubSession(repo.htmlUrl); - }) - .then( (sess) => { - this.bind(sess, true); - return sess; }); } diff --git a/src/ui.ts b/src/ui.ts index 80b49a4f..4731c709 100644 --- a/src/ui.ts +++ b/src/ui.ts @@ -533,14 +533,14 @@ function _publishProjectToGithub(e) { getGithubService().login().then( () => { setWaitProgress(0.25); return getGithubService().publish(name, desc, license, priv); - }).then( (sess) => { + }).then( (_sess) => { + sess = _sess; setWaitProgress(0.5); repo_id = qs['repo'] = sess.repopath; return pushChangesToGithub('initial import from 8bitworkshop.com'); }).then( () => { - setWaitProgress(1.0); gaEvent('sync', 'publish', priv?"":name); - reloadProject(current_project.stripLocalPath(current_project.mainPath)); + importProjectFromGithub(sess.url, false); }).catch( (e) => { setWaitDialog(false); console.log(e); diff --git a/test/cli/testgithub.js b/test/cli/testgithub.js index 242b0858..be3faa09 100644 --- a/test/cli/testgithub.js +++ b/test/cli/testgithub.js @@ -108,7 +108,7 @@ describe('Store', function() { var reponame = 'testrepo'+t0; // should fail gh.publish(reponame, "new description", "mit", false).then( (sess) => { - assert.ok(serv.getRepos()[sess.repopath]); + //assert.ok(serv.getRepos()[sess.repopath]); return gh.deleteRepository(sess.url); }).then( () => { done();