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

Question: How can I use this on private repos? #1

Open
rlejeune opened this issue May 31, 2020 · 5 comments
Open

Question: How can I use this on private repos? #1

rlejeune opened this issue May 31, 2020 · 5 comments
Labels
enhancement New feature or request

Comments

@rlejeune
Copy link

Is your feature request related to a problem? Please describe.
I really like your idea, and was wondering what would be the best solution to use it on private repos.
I tried installing the proxy locally for some testing but it looks like GutHub is blocking it.

Describe the solution you'd like

Describe alternatives you've considered

Additional context
Thank you!

@rlejeune rlejeune added the enhancement New feature or request label May 31, 2020
@ccamacho
Copy link
Contributor

ccamacho commented May 31, 2020

Hi @rlejeune, unfortunately, you can't right now 'by default', the problem is we are using a CORS proxy to actually do the call to the GitHub endpoints but the CORS proxy is not authenticated against GitHub so it will always fail.
Ideally, the perfect solution should be to get rid of the CORS proxy and use an access token to make the requests.

  • To get rid of the CORS proxy maybe a browser extension will help to remove the browser restrictions. Something to try might be to set cors proxy to '' in https://github.com/pystol/badgeboard/blob/master/assets/data_source/badges_list.js#L19
    and try with the extension.

  • Introduce the access_token in the requests.
    This might be achieved by setting the token with something like this
    url: i['uri']+"&access_token="+getAccessToken(),

Or adding the header with the Authorization parameter like:

$.ajax({
headers: {'Authorization': 'token '+ getAccessToken()},
url: i['uri'],

From:
https://github.com/pystol/badgeboard/blob/master/index.html#L229

WDYT?

@rlejeune
Copy link
Author

Hi @ccamacho, thank you for your reply and for your work. This dashboard would certainly be better than my markdown sheet with all the badges ;)

I'll give it a try and let you know if I can make it works!

Have a great day

@ccamacho
Copy link
Contributor

@rlejeune I quickly tried but didn't work like with an easy workaround, I opened this https://github.community/t/getting-the-status-of-a-badge-from-a-private-repository/116119 so just after getting the correct syntax it would be fairly easy to have it in the code.

Thanks for the feedback!

@ccamacho
Copy link
Contributor

@rlejeune mehh not gonna happen at least now. Ill leave this open and once we have an answer Ill ping you again :)

From1:
Unfortunately private badge statuses are not exposed with our current URL structure. Sorry about that!

We are working to update the documentation to reflect the limitations of accessing a private badge status from outside the repository:

https://help.github.com/en/actions/configuring-and-managing-workflows/configuring-a-workflow#adding-a-workflow-status-badge-to-your-repository

We really appreciate feedback on how we can make GitHub even better and the best way to report any feature requests is directly to us through our feedback form: https://support.github.com/contact/feedback

Our roadmap is not publicly visible, so we recommend that you keep an eye on the GitHub Blog for the latest announcements about new features.

@rlejeune
Copy link
Author

Thank you for the follow up, lets hope that one day we will be able to something to have a nice dashboard of all our actions.

Have a great day!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

2 participants