3 ms·
I’ve tried to build that but GitHub doesn’t allow secrets to be stored inside browser so you can’t commit.
by huijzer 6mo ago
I’ve tried to build that but GitHub doesn’t allow secrets to be stored inside browser so you can’t commit.
- simonw 6mo agoGitHub's content API is available over CORS: https://tools.simonwillison.net/cors-fetch#method=PUT&url=https%3A%2F%2Fapi.github.com%2Frepos%2Fsimonw%2Fdatasette%2Fcontents%2FREADME.md&bodyType=json&json=%7B%22message%22%3A%22my+commit+message%22%2C%22committer%22%3A%7B%22name%22%3A%22Monalisa+Octocat%22%2C%22email%22%3A%22octocat%40github.com%22%7D%2C%22content%22%3A%22bXkgbmV3IGZpbGUgY29udGVudHM%3D%22%7D&headers=%5B%7B%22key%22%3A%22Accept%22%2C%22value%22%3A%22application%2Fvnd.github%2Bjson%22%7D%2C%7B%22key%22%3A%22Authorization%22%2C%22value%22%3A%22Bearer+%3CYOUR-TOKEN%3E%22%7D%2C%7B%22key%22%3A%22X-GitHub-Api-Version%22%2C%22value%22%3A%222026-03-10%22%7D%5D https://tools.simonwillison.net/cors-fetch#method=PUT&url=ht... I've built client-side apps that store a GitHub token in localStorage and send them with fetch() for creating Gists and that works fine: https://tools.simonwillison.net/terminal-to-html https://tools.simonwillison.net/terminal-to-html