-
-
Notifications
You must be signed in to change notification settings - Fork 5.5k
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
Badge For Visual Studio Marketplace added. #1074
Conversation
Build was falling due to #979 . |
server.js
Outdated
{ filterType: 7, value: repo }, | ||
{ filterType: 12, value: '4096' }] | ||
}], | ||
flags: 914 |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
What are these values? Could you add a comment?
Are the options identical between these three badges? If so could you make a createVscodeOptions
to DRY this up?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Yep identical! this is for API request. Okay I will separate it. 😃
service-tests/vscode.js
Outdated
.get('/rating/ritwickdey.LiveServer.json') | ||
.expectJSONTypes(Joi.object().keys({ | ||
name: Joi.equal('rating', 'Rating'), | ||
value: Joi.string() |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This is very broad, and matches e.g. the string 'undefined'
. What are the expected values here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Ok! I'll add validation
Hi, @paulmelnikow I've separated the identical code and fixed a test case. Please review the changes. |
7e3ecbe
to
4d48a8f
Compare
service-tests/vscode.js
Outdated
})); | ||
|
||
t.create('version') | ||
t.create('version should be formatted. eg. v7.2.5') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Love these.
service-tests/vscode.js
Outdated
module.exports = t; | ||
|
||
t.create('installs should be formatted. eg. 72M') | ||
.get('/installs/ritwickdey.LiveServer.json') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you change installs
to d
, version
to v
, and rating
to r
for consistency? Sorry I missed this before!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Okay. no problem.. I'll 😄
return 0; //In case required statistic is not found means ZERO. | ||
} | ||
} | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for refactoring this!
Thinking this through a little more, would |
Yep, conventionally [I am totally newbie, I'll do what you suggest me] 😄 |
I don't think it's too long. 😄 |
😄 Okay. No Problem (Thanks for the suggestion).. I am now out of home. As soon as I reach to my home, I'll change all the url path. 😄 |
Hi @paulmelnikow, I have a question. If I want to add download badge in 3 different format (eg 7K, 7.45K or 7458). What should be routing? Should I add 3 different format? |
I'd prefer to use our standard number formatting using |
yep! I used the |
server.js
Outdated
break; | ||
} | ||
case 'v': { | ||
badgeData.text[0] = getLabel('Visual Studio Marketplace', data); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Could you make this lower case, like we do for the other app stores? Sorry I didn't notice it before.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
You mean that the label 'Visual Studio Marketplace' to 'visual studio marketplace'. Right?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Correct!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Changes look good!
Changed to lower case 😊 |
Thanks a bunch! |
Thanks a lot to you. 😃 |
Badge for Version
![Version](https://user-images.githubusercontent.com/18099464/30257723-b3966e46-96d1-11e7-8d83-52a5b6319618.png)
Badge for Total No of Installs
![Installs](https://user-images.githubusercontent.com/18099464/30257724-b3972660-96d1-11e7-8425-058ba7afc909.png)
Badge for Rating
![rating](https://user-images.githubusercontent.com/18099464/30257725-b3972912-96d1-11e7-8e63-68ec8567681c.png)
Issue Request #1067