github: import after publish to get all files

This commit is contained in:
Steven Hugg 2019-08-28 22:12:45 -04:00
parent 96d8953460
commit 44389d8e52
4 changed files with 5 additions and 11 deletions

View File

@ -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

View File

@ -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;
});
}

View File

@ -509,14 +509,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);

View File

@ -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();