Skip to content
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

When updating a gist, the URL returned for --raw is not specific to the file #329

Open
travisdowns opened this issue Feb 23, 2021 · 0 comments

Comments

@travisdowns
Copy link

When updating a gist, the URL returns simple contains the hash of the gist itself, not the file. So for example --raw will return a value that shows the last updated or "top" file in the gist, not necessarily the added file, like so:

https://gist.github.com/travisdowns/50c6fb04cf1e6fdbd03471361a2b317e/raw

To link to the specific file uploaded, you add the filename, like:

https://gist.github.com/travisdowns/50c6fb04cf1e6fdbd03471361a2b317e/raw/foo.txt

or the commit and filename:

https://gist.githubusercontent.com/travisdowns/50c6fb04cf1e6fdbd03471361a2b317e/raw/79f49165d8259c3b595f081f23360e74e3245456/foo.txt

The latter format refers to the specific version of the file even if it is updated, while the former shows the newest version of the file.

Without this, the link returned by gist isn't useful for multi-file gists.

@travisdowns travisdowns changed the title When updating a gist, the URL returned for --raw is not specific too the file When updating a gist, the URL returned for --raw is not specific to the file Feb 26, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant