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

Add github.com as badge provider #389

Closed
andreujuanc opened this issue Oct 2, 2019 · 16 comments · Fixed by #396
Closed

Add github.com as badge provider #389

andreujuanc opened this issue Oct 2, 2019 · 16 comments · Fixed by #396
Assignees
Labels
feature-request Request for new features or functionality
Milestone

Comments

@andreujuanc
Copy link

Now with Github Actions having badges, we've got a new provider to add to the whitelist.
I'm removing my badges for now.

@joaomoreno
Copy link
Member

Since 84f537a there is no more whitelist. Please update to the latest vsce.

@andreujuanc
Copy link
Author

@joaomoreno Well, when i had GitHub badges it stated that it was an invalid badge.

I will try again next week and create another issue if it occurs again.

Cheers

@andreujuanc
Copy link
Author

@joaomoreno
https://code.visualstudio.com/api/working-with-extensions/publishing-extension#publishing-extensions
https://code.visualstudio.com/api/references/extension-manifest#approved-badges

All these doc articles does not reflect the fact that the badges are not whitelisted anymore.

And this part of the doc , actually states the problem I have now:
Images in README.md and CHANGELOG.md may not be SVGs unless they are from trusted badge providers.

@joaomoreno
Copy link
Member

joaomoreno commented Oct 16, 2019

@andreujuanc Thanks for the ping.

We've actually just had a discussion yesterday in the team that this list should be brought back: #395

I will fix it asap and release a new VSCE version.

@joaomoreno
Copy link
Member

joaomoreno commented Oct 16, 2019

@andreujuanc Can you show me an example badge from Github?

@joaomoreno joaomoreno reopened this Oct 16, 2019
@joaomoreno joaomoreno self-assigned this Oct 16, 2019
@joaomoreno joaomoreno added the feature-request Request for new features or functionality label Oct 16, 2019
@andreujuanc
Copy link
Author

Sorry for the delay @joaomoreno it was a busy day.
Here is the badge I was trying to use:

[![Actions Status](https://github.com/DigitalMolecules/vscode-servicebus-explorer/workflows/Build/badge.svg)](https://github.com/DigitalMolecules/vscode-servicebus-explorer/actions)

Thanks for reopening this, it'd be really cool to show the badge :)

@joaomoreno
Copy link
Member

We can't add that source as a trusted badge provider, since this would enable anyone to simply use any badge by simply uploading it to Github.

@joaomoreno
Copy link
Member

joaomoreno commented Oct 17, 2019

Hm... I see that's actually the Actions badge. We might need to improve the pattern here, since we currently filter on domain only.

So we're currently blocked by the Marketplace first and then by VSCE.

cc @viradhamMS @pkuma-msft

@felangel
Copy link

@joaomoreno had to remove my badges as well 😞@joaomoreno do you know what security concerns warrant a whitelist? I haven't seen other package/plugin discovery platforms have this requirement.

@edgardmessias
Copy link

edgardmessias commented Feb 8, 2020

A temporary solution:
Instead of
https://github.com/<:user>/<:repo>/workflows/<:workflow>/badge.svg
Use the:
https://img.shields.io/github/workflow/status/<:user>/<:repo>/<:workflow>.svg or
https://img.shields.io/github/workflow/status/<:user>/<:repo>/<:workflow>/<:branch>.svg

Example:
Build Status vs Build Status

Appending ?logo=github
https://img.shields.io/github/workflow/status/<:user>/<:repo>/<:workflow>.svg?logo=github or
https://img.shields.io/github/workflow/status/<:user>/<:repo>/<:workflow>/<:branch>.svg?logo=github
Build Status

Appending ?label=<label>
https://img.shields.io/github/workflow/status/<:user>/<:repo>/<:workflow>.svg?label=<label> or
https://img.shields.io/github/workflow/status/<:user>/<:repo>/<:workflow>/<:branch>.svg?label=<label>
Build Status, or with logo Build Status

Source: https://github.com/badges/shields/blob/c455993a4d307823a1f551955e9300cd3bc6e2c2/services/github/github-workflow-status.service.js

axelson added a commit to elixir-lsp/vscode-elixir-ls that referenced this issue Feb 15, 2020
Otherwise we are unable to publish a new version of the extension:
microsoft/vscode-vsce#389 (comment)

also very small elixir-ls update
auchenberg added a commit to auchenberg/vscode-browser-preview that referenced this issue Mar 23, 2020
Gama11 added a commit to lix-pm/lix.vscode that referenced this issue Mar 29, 2020
Xanewok added a commit to rust-lang/vscode-rust that referenced this issue Apr 17, 2020
Work around microsoft/vscode-vsce#389.
Currently, we can't use SVG shields directly from github.com, so
let's temporarily use whitelisted img.shields.io.
philnash added a commit to philnash/ngrok-for-vscode that referenced this issue May 12, 2020
@Stanzilla
Copy link

@joaomoreno what's the long term plan here?

@joaomoreno
Copy link
Member

It's to resolve the issue. 👍 Still waiting on the upstream Marketplace implementation.

@Stanzilla
Copy link

That's not a public issue we can follow, right?

@joaomoreno
Copy link
Member

Unfortunately right, but I can tell you it's getting done!

@joaomoreno
Copy link
Member

This is finally in! Both the server side changes and VSCE changes were deployed. Starting with vsce@1.77.0, you can now use github workflow badges.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
feature-request Request for new features or functionality
Projects
None yet
Development

Successfully merging a pull request may close this issue.

6 participants