-
Notifications
You must be signed in to change notification settings - Fork 8
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
Add --skip-download option to print the archive URL rather than download it #17
Add --skip-download option to print the archive URL rather than download it #17
Conversation
@timrogers : Thanks for opening up this pull request! ✨ Yeah, ideally |
if [[ $GH_HOST != "" ]]; then | ||
if [[ "$GH_HOST" == "github.com" ]]; then | ||
BASE_URL="https://api.github.com" | ||
else | ||
BASE_URL="https://$GH_HOST/api/v3" | ||
fi | ||
else | ||
BASE_URL="https://api.github.com" | ||
fi |
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.
I know something like this is necessary because the GitHub CLI doesn't expose commands that generate these urls based on the host authenticated and selected here.
Doesn't mean I have to like it 😠
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.
I feel the same 😦 It feels like it would be great for the CLI to have a way to expose the base URLs.
Agreed! |
@timrogers : thank you again for your contribution! I'll see about cutting a new release with this https://github.com/andyfeller/gh-repo-export/releases/tag/v1.2.0 |
This adds a new
--skip-download
option to the extension, allowing you to output the archive's URL to stdout rather than automatically downloading it. This is useful if you want to use the URL, rather than use the file.Due to limitations with
gh api
, I've been forced to usecurl
to make the request to the GitHub API to get the archive URL. It isn't possible to do this bit withgh api
because it automatically follows the redirect and doesn't give you an opportunity to grab the URL.