-
Notifications
You must be signed in to change notification settings - Fork 555
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
Create gists from a real github repo #637
Comments
YES YES YES! First, having the gists in a location that is tied to my ID is all kinds of wrong. Second, for maintenance reasons, it's highly problematic to have the source in 3 separate locations. Please consider adding this ability!!! |
I have been writing an executable that does something very close to that. So that it is easier to write dartpads/gist from the command line. I will try to rewrite it so that you could do exactly that. I wanted to use something like that for myself as well. I would suggest that after the first time the gist is created, the gist url will be added to the homepage field of the pubspec. So that the second time the gist can just be updated with that id (instead of creating a new id). The only problem would be then, that on which name would you put the gist? And how can you make sure the other person can also edit those gists. A solution for that could that you get a token here: https://github.com/settings/tokens which write access to gist. So if you then put all the gist on one of your two names, you could give the other person that token, and with that token, the other person has access to edit your gist (if you trust the other person enough ;)). So then if you then tell the executable to update all gists from the github repo source, then you would need to specify that token, and then you would have access to update all gists. |
I began working on this here: |
Related #788. |
Closing this in favor of #1096. Rather than processing a repo into individual gists, we cant just update DartPad to load from a repo directly. |
Instead of editing personal gists, it'd be much easier if we could create those gists automagically from a github repo. You should be able to create multiple gists from a single repo.
For example, we have a bunch of examples in https://github.com/dart-lang/dart-tutorials-samples. Shams has updated them and converted them to gists, for use in embedded dartpads. Shams was about to remove the dart-tutorials-samples copies of the gist-converted samples, but then we realized:
Having a real github repo for the samples would make the code much more maintainable for us, and give us a real change history.
Could we get a tool that'd automatically create gists from a github repo? It's OK for the gist ID to change between versions, I think. (Though it'd be good not to change the gist ID if the generated code hasn't changed.)
/cc @Sfshaza @Georgehe4
The text was updated successfully, but these errors were encountered: