joemccann/dillinger — pull request #174 by swang (2014-05-06 20:42:49+00:00)
Title: Save to Github feature, support for GH Organizations.

This is in a workable state, but probably should not just auto merge it until we can clarify some things out.

Addresses #5,

#### Things that need to be done, but probably not needed to merge this into master

- [ ] Need big refactoring/cleanup
- [ ] Refactor "unloading" of Github URL when user loads file from another service.

> Right now requires "unloading" of the Github URL when loading from Dropbox/GoogleDrive so we don’t accidentally do something like, "Load Github file, load Dropbox file, click save to Github, file from Dropbox overwrites file on Github" This code requires it to be in the Dropbox/Google Drive sections in dillinger.js. Need to figure out a way to separate them out.

- [ ] Refactoring of the modal/dialog chooser
a. Why a refactor? Cannot “save” to Github, must load a file on Github and save using that method. Probably the same with the other plugins.
b. Instead of depending on jQuery click event, refactor so that it is a function with a callback (with chosen value).
c. Allows also the option of saving into any folder in Dropbox

- [ ] Shows all repositories, instead of repositories that they user has write access to.

> Not a big problem except user will not be able to save a file in which they only have read access. Something should be changed to reflect this now that we are including organizations.

#### Things probably need to be done in the short-term.
- [ ] Cannot save file to a different name (aka "moving a file"). Requires a bit more manipulation in GitHub's API.
- [ ] Support for calling past ~30 repos. Right now Github limits to first 30 or so repos.