Package for inline commit notes


#1

I’m using Github for collaborative writing (of books), and I’d love it if I could use inline commit notes for commenting on writing.
I can’t seem to find a package that will pull down inline commit notes and show them in the gutter, as well as allow me to add them from inside atom.

Any chance this might be done, or is there no API or other infrastructural problems?

Ps.: Another problem: inline notes are – as might make sense for software dev - linked to commits, but they don#t persist if the line in question has changed (right?) (this is a github problem, obviously). Any thoughts on how comments might be made to persist over changes to the respective line?


#2

Let me first establish my understanding of your use of the word “persist”, since it is different from the way I would use it. It appears that your definition of “persist” is that the comment on a line would follow that line through successive commits, so long as the line itself isn’t deleted.

As you stated, the way the GitHub API is written, a comment is tied to a particular file, line within the file and commit:

https://developer.github.com/v3/repos/comments/#create-a-commit-comment

Whenever the contents of a Git repository are changed in any way, it creates a new commit … even if all you’re changing is the metadata on a commit like author name or commit date. So it is actually a little worse than the way you put it. The code comments don’t “persist” past a given commit … even if the entire file that the comment is in has not changed between commits.

Now, you could kind of patch your way around that by doing a text comparison and pull the comments forward on the client end using a diff algorithm of some sort. It sounds though like you’re trying to recreate Microsoft Word-style document comments using the GitHub API … which sounds like a bad fit. Perhaps you might consider creating a metadata file to the side of the actual file and check that in to the repository? It means that you wouldn’t be able to use the GitHub website to edit the comments … but it might fit what you’re trying to do better?


#3

Thanks so much for the reply, and sorry for being late to respond.

Yes, correct, that is what I meant with “persistent” line notes – that they persist past successive commits.

Something like that seems to be missing to use Git/hub for collaboratively writing prose.

What we ended up doing was just to write our comments inside the files (in our case, Markdown, then LaTeX) and comment them out accordingly. That works ok, especially with git blame to establish authorship, but it really pollutes the commit history because now every comment requires a commit when really nothing in the project has changed.

This seems like a bigger/deeper possible misfit of git/hub for writing prose.

I’d just love to use the FOSS, solid git instead of some proprietary, half-assed prose solution, but there are still these and other wrinkles to be sorted out.

Wonder whether github might show us prose-writing people some love at some point …


#4

I look for a similar solution:

I think this tool may turn out to be helpful, but there is no easy GUI yet for atom.