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

Query on replacing example badge_list with my data #2

Open
bennymeade opened this issue Aug 27, 2021 · 3 comments
Open

Query on replacing example badge_list with my data #2

bennymeade opened this issue Aug 27, 2021 · 3 comments
Labels

Comments

@bennymeade
Copy link

This is not a bug, just me trying to get this to work!

This is my workflow badge:

[![Upload artifacts after build completes](https://github.com/bennymeade/cypress-reporting-gh-pages/actions/workflows/upload-artifacts.yml/badge.svg)](https://github.com/bennymeade/cypress-reporting-gh-pages/actions/workflows/upload-artifacts.yml)

Should I just be replacing the corssproxy uri with my SVG path like below?
Because this doesn't work for me.

{
  type: 'badge',
	size:{x:1,y:1},
	position:{x:1,y:2},
  uri: corssproxy + 'https://github.com/bennymeade/cypress-reporting-gh-pages/actions/workflows/upload-artifacts.yml/badge.svg?event=push',
	title: "Benny Test Badge",
	description: 'Local image creation',
	link: 'http://www.bing.com',
	measure:{x:175,y:5},
	colors:[['status-warning','212,52,67'],['status-danger','197,105,30'],['status-good','48,196,82']],
},
@bennymeade bennymeade added the bug Something isn't working label Aug 27, 2021
@ccamacho
Copy link
Contributor

Hello!

Can you elaborate a little bit on the problem you are having? As "Because this doesn't work for me." is by far something impossible for me to fix without more detail, did you try the online example in the readme?

To try, do this:

  • Open https://badgeboard.pystol.org/ This is the index.html, when you open that URL you should see the headers without any badge.. This is because the cors proxy was limited because people were hammering it, so the owner limited its access.

  • Open https://cors-anywhere.herokuapp.com/ This is the CORS proxy we use in the demo, you will see the following message "To temporarily unlock access to the demo, click on the following button" so click on the button.

  • Final step, open again or refresh https://badgeboard.pystol.org/ "and voila" you should see all the badges in the example.

Make the changes to your badges in the data file and install a CORS proxy if you need it.

;) @bennymeade I hope this fixes the non-issue for you.

Also, let's leave this issue open for anyone having the same thoughts.

@ccamacho ccamacho added usage and removed bug Something isn't working labels Aug 28, 2021
@bennymeade
Copy link
Author

Thanks @ccamacho I got it working.

@ccamacho
Copy link
Contributor

@bennymeade no problem :) also if you make any improvement just let me know and we can include those in the repo, thanks for using it!

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

No branches or pull requests

2 participants