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

Gist by different user #2

Closed
simon-k opened this issue Feb 3, 2021 · 4 comments
Closed

Gist by different user #2

simon-k opened this issue Feb 3, 2021 · 4 comments

Comments

@simon-k
Copy link

simon-k commented Feb 3, 2021

Hi

Is it possible to specify the user of the gist? Let's say the gist is created by another user than the owner of the github repo?

@simon-k
Copy link
Author

simon-k commented Feb 3, 2021

I'm talking about the in

https://gist.githubusercontent.com///raw/test.json

@Schneegans
Copy link
Owner

Reading the gist by another user is obviously possible. So you can create a badge in your README.md based on my gist. Like this badge:

![badge](https://img.shields.io/endpoint?url=https://gist.githubusercontent.com/schneegans/2ab8f1d386f13aaebccbd87dac94068d/raw/hello-world.json)

Writing the gist by another user is something I never tried. You would definitely need a personal access token (https://github.com/settings/tokens) by that user to be able to write to her gists. Then it may work! I think the gist ID is unique over all users of GitHub.

@simon-k
Copy link
Author

simon-k commented Feb 4, 2021

I tried it out and it works.

The repo running the task is on an organization X and the gist belongs to user Y. No problem as long as I created the access token that allows to write to the gist and used the gist id.

@simon-k
Copy link
Author

simon-k commented Feb 4, 2021

The question has been answered and everything is good. Closing this issue.

@simon-k simon-k closed this as completed Feb 4, 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

2 participants