Make sure we read the appname from JSON rageshakes, so that issues are
correctly filed into github.
(This was affecting riot-web 0.9.9 and earlier; later versions are using the
multipart interface; riot-android was special-cased anyway; riot-ios has never
used the JSON interface.)
I got fed up with shoving everything into the structure the JSON api uses for
upload, so now parseRequest returns its own structure, and saves the log files
to disk in the same way as the other attachments.
This also means that we can test the saving of log files more representatively.
* Create report dir before reading POST body
... so that we can stream uploaded files straight to disk, instead of reading
them into memory first.
* Add support for attaching files to reports
If a 'file' parameter is provided, save it as a file on disk. Also include a
link to it from the github issue.
current riot-android stuffs everything into the 'version' field; I don't really
want that ending up in the github issue (especially the mxid), and I don't want
to have to wait for an update to riot-android to land, so let's unpick
it into 'data'.
* Run the checks against the git index (ie, what you're about to commit),
rather than the working copy
* Add the changes made by `go fmt` back to the index, so that they are included
in the commit, as well as the working copy.