sigma / gh.el

GitHub API library for Emacs
274 stars 74 forks source link

Fixed null content API bug #63

Closed rothmichaels closed 8 years ago

rothmichaels commented 8 years ago

This came up when I was debugging defunkt/gist.el#74


Calling gist-mode-write-file from a git-mode buffer or gist-edit-current-description from the github:gists (i.e. git-list) buffer was returning the following error: byte-code: Invalid slot type: gh-gist-gist, id, string, nil.

This error was because the GitHub v3 API does not allow null "content" properties. This functions were setting this slot to nil to delete the file. The GitHub v3 API requires a null object associated with the filename to delete a gist file (see https://developer.github.com/v3/gists/#edit-a-gist).

To fix this, gh-gist-gist-file-to-obj was updated to return length one lists containing the filename when the :content slot is nil.


Fixes defunkt/gist.el#74

rothmichaels commented 8 years ago

Checks passed with emacs24 and emacs-SNAPSHOT. It looks like some pull requests are building with different settings than others causing similar build problems for other pull requests.

rothmichaels commented 8 years ago

re. #62 I wasn't sure if I should be creating pull requests off of master or next. Since tests weren't passing here I opened a new pull requests at #64. I'm closing this one for now.