-
Couldn't load subscription status.
- Fork 7.3k
feat: add command to create gist #543
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you for the contribution!
As per our CONTRIBUTING doc, we currently don't accept PRs for new featuers, especially if it's something that is not on our roadmap at all (and gist isn't, at least not yet).
We might leave this open and revisit when we do choose to prioritize gist.
|
Closing for now, as we can reopen later if we still decide to use this. Thanks again! |
|
During an issue audit we noticed this and decided I'm going to mark this as open and ready for review. |
|
Before proceeding with a full review I wanted to clean up the conflict and use existing scope authorization code to have users re-authenticate for I don't want to ship a new "asks for reauth" PR until we have #914 fixed; I've stared at it and thought I had a fix but it's not working. I think it might be good for @mislav and I to pair on that this week. |
Our code had an unspoken assumption that only one apiClient is created during the course of a command. Violating this assumption is fine in almost all cases, but not when we need to do a re-auth to add a new oauth scope to a user's token. There is likely a more elegant solution to the problem but until then this changes determineBaseRepo to use an existing apiClient.
This reverts commit 08e9cda.
|
@mislav 👋 I've added a first pass at |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This feels like it's almost ready to ship! I feel the command/flag docs need more work, and I have some feature suggestions that could be addressed in this PR or follow-up:
- Should we consider allowing passing multiple files, i.e.
-f <file1> -f <file2>? - If so, would we consider passing files as arguments instead of
-fflags, so we can allow usage likegh gist create *.logto upload all*.logfiles to a gist? - Would we consider allowing uploading text that is not found in a file, e.g. text passed via standard input from clipboard or from another script? E.g.
echo hello | gh gist create -
|
closing this in favor of #981 (commit history preserved) |
Addressing #397
Gist is not available in GraphQL API v4 so it is built using V3 instead as @mislav suggested.
If it looks fine, I'll work on other parts for Gist and submit in separate PRs.