How does GitHub Saving Work (programming-wise)?

57 views
Skip to first unread message

Finn Lancaster

unread,
Feb 10, 2021, 6:00:08 PM2/10/21
to tiddl...@googlegroups.com
Hello!

I have a question not directly related to TiddlyWiki, and probably better suited to StackOverflow— how does GitHub saving in TW5 work? 
I don’t need to know how to fill out the suitable inputs or setting it up in TW, I would just like to know how TW uses the GitHub API and a mix of JS/HTML etc to accomplish the updating of the GitHub repository with the Tiddler edits. 

Thanks so much! 

Regards, 
     Finn Lancaster 
     

Jeremy Ruston

unread,
Feb 11, 2021, 8:38:41 AM2/11/21
to TiddlyWiki Group
Hi Finn

The code that TW5 uses for saving to GitHub is fairly self contained in this file:


There are two HTTP requests: one to get the hash of the current file in the repo, and a second one quoting that hash to commit the change to the file.

Best wishes

Jeremy

--
You received this message because you are subscribed to the Google Groups "TiddlyWiki" group.
To unsubscribe from this group and stop receiving emails from it, send an email to tiddlywiki+...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/tiddlywiki/CALXL%2BrMaO8kr85JfjaAL_tdWowvZLULeTZcvc26g0TuFxpkjFw%40mail.gmail.com.

Reply all
Reply to author
Forward
0 new messages