-
-
Notifications
You must be signed in to change notification settings - Fork 61
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Import a single Gist by ID #76
Conversation
Someone is attempting to deploy a commit to a Personal Account owned by @MaxLeiter on Vercel. @MaxLeiter first needs to authorize it. |
Thanks for this! What's the problem with /mine and created_at? I think it makes sense to set created_at to the original Gist date and updated_at to the time of the import. Then we can change Re your discussion points, I'm fine with erroring on both cases as long as we make it clear to the user why: |
Not a problem, so much as weird UX. Say you have an old Gist, and you created 10 Drift Posts.
Sorting by Given that importing a gist should be much less common than updating an existing post; I left the |
Do you mean Alternatively, we add a |
6706783
to
c477010
Compare
I wouldn't add a |
Dunno why it is still flagging as "need changes". I though I resolved all requests 😕
There are 2 "discussion points":
Limitations
The
1
is easy enough, as you can fetch theraw_url
direct.The
2
is a bit tricky, as one should clone the git repo. I was not about to make the server clone a repo to get the 301th file 😅 so I opted to simplythrow
. We can improve on it later 🤷Gists to test these limits:
Creation date
I opted to import the creation date of a gist, but not the
updated_at
. It is a bit weird that you can import an old gist, and not see it in the/mine
, but I felt it was more convenient to keep thecreated_at
. We can make the creation date be the imported date. I don't have a good reason for either one 😸Pending
A UI. I wanted to push this first part, discuss the endpoint, then make a bulk import (maybe a queue? so we don't overload the server. Or even push the
fetching
to the frontend 🤔)