I don't think the editor allows you to create new files.
Yes.
The trick is that lib/gitlab/file_editor.rb checks the file out, modifies it, commits it, and removes it. I read this from one of the comments in the original post.
I don't think the editor allows you to create new files.