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

invalid query parameter: flag #6653

Closed
1 of 3 tasks
bubkoo opened this issue Jun 23, 2021 · 4 comments
Closed
1 of 3 tasks

invalid query parameter: flag #6653

bubkoo opened this issue Jun 23, 2021 · 4 comments
Labels
bug Bugs in badges and the frontend service-badge New or updated service badge

Comments

@bubkoo
Copy link
Contributor

bubkoo commented Jun 23, 2021

Are you experiencing an issue with...

🪲 Description

badge with codecov's link https://codecov.io/gh/antvis/x6/branch/master/graph/badge.svg?flag=x6-vector
codecov

badge generated by shields.io throw error: https://img.shields.io/codecov/c/github/antvis/x6?flag=x6-vector&label=codecov&logo=codecov&token=15CO54WYUV
codecov

🔗 Link to the badge

https://img.shields.io/codecov/c/github/antvis/x6?flag=x6-vector&label=codecov&logo=codecov&token=15CO54WYUV

💡 Possible Solution

@bubkoo bubkoo added the question Support questions, usage questions, unconfirmed bugs, discussions, ideas label Jun 23, 2021
@PyvesB
Copy link
Member

PyvesB commented Jun 23, 2021

Hello @bubkoo ! 👋🏻

Well yes, this is expected, Shields.io defines its own set of query parameters, flag is not a valid one for our badges. Only the ones indicated in the Shields.io frontend for the Codecov badge will be available. If you'd like new features to be added to the Codecov badge, feel free to submit a pull request or create a separate feature request issue. 😉

@bubkoo
Copy link
Contributor Author

bubkoo commented Jun 23, 2021

But the url was generated by Shields.io.

Flag with name "x6-vector" throw errors.
image

Flag with name "x6_vector" will render the badge.
image

@PyvesB
Copy link
Member

PyvesB commented Jun 23, 2021

Ah okay, sorry for the confusion! I hadn't clocked that we did also support a flag parameter for Codecov.

Our code enforces the following constraints for this parameter:

flag: Joi.string().regex(/^[a-z0-9_]{1,45}$/),

However, things have loosened up according to the Codecov documentation, upper case letters as well as hyphens and dots now seem to be supported. Could you please submit a pull request to fix this?

@PyvesB PyvesB added bug Bugs in badges and the frontend service-badge New or updated service badge and removed question Support questions, usage questions, unconfirmed bugs, discussions, ideas labels Jun 23, 2021
bubkoo added a commit to bubkoo/shields that referenced this issue Jun 23, 2021
Flags Must consist only of alphanumeric characters, '_', '-', or '.' and not exceed 45 characters.
Flag names will be validated against the following regex. ^[\w\.\-]{1,45}$

re badges#6653
@calebcartwright
Copy link
Member

Resolved via acdbe7e

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Bugs in badges and the frontend service-badge New or updated service badge
Projects
None yet
Development

No branches or pull requests

3 participants