-
-
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
[Travis] Add travis-ci.com support #1711
Conversation
Generated by 🚫 dangerJS |
Thanks for the PR! But could you merge this with the current travis.org implementation please? As there is only a couple lines difference.-camp.route(/^\/travis(-ci)?\/([^/]+\/[^/]+)(?:\/(.+))?\.(svg|png|gif|jpg|json)$/,
+camp.route(/^\/travis(-ci)?\/com\/([^/]+\/[^/]+)(?:\/(.+))?\.(svg|png|gif|jpg|json)$/,
cache(function(data, match, sendBadge, request) {
var userRepo = match[2]; // eg, espadrine/sc
var branch = match[3];
var format = match[4];
var options = {
method: 'HEAD',
- uri: 'https://api.travis-ci.org/' + userRepo + '.svg',
+ uri: 'https://api.travis-ci.com/' + userRepo + '.svg',
};
if (branch != null) {
options.uri += '?branch=' + branch;
}
var badgeData = getBadgeData('build', data);
request(options, function(err, res) {
if (err != null) {
log.error('Travis error: ' + err.stack);
if (res) { log.error(''+res); }
}
if (checkErrorResponse(badgeData, err, res)) {
sendBadge(format, badgeData);
return;
}
try {
var state = res.headers['content-disposition']
.match(/filename="(.+)\.svg"/)[1];
badgeData.text[1] = state;
if (state === 'passing') {
badgeData.colorscheme = 'brightgreen';
} else if (state === 'failing') {
badgeData.colorscheme = 'red';
} else {
badgeData.text[1] = state;
}
sendBadge(format, badgeData);
} catch(e) {
badgeData.text[1] = 'invalid';
sendBadge(format, badgeData);
}
});
})); |
Merged done. |
I've read that you're trying to implement |
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 the update,
Changes look good to me!
👍
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.
Looks good to me as well, thanks for your contribution! 😉
One small observation: we're specifying "(.com)" in the new badge examples, should we add "(.org)" to the old ones to make it extra clear?
@ivandelabeldad Do you have a moment to address the review comment? It would be great to get this merged. 😁 |
@paulmelnikow Do you mean add "(.org)" as extra-clarification on the old badges? |
Yea, that's what I noticed that was outstanding. |
This will only show when shields.io releases it (see badges/shields#1711)
This change is done for the travis-ci.com migration, its further described over here badges/shields#1711. Fixes #7
This change is done for the travis-ci.com migration, its further described over here badges/shields#1711. Fixes #7
* documentation: update multiple manifest references in scripts * fix: throw semantic release error for unwritable manifests * chore: add log to confirm completion * documentation: use new travis badge that works This change is done for the travis-ci.com migration, its further described over here badges/shields#1711. Fixes #7 * documentation: update multiple manifest references in scripts * fix: throw semantic release error for unwritable manifests * chore: add log to confirm completion * documentation: use new travis badge that works This change is done for the travis-ci.com migration, its further described over here badges/shields#1711. Fixes #7 * fix: add missing manifest identification for write errors * refactor: remove some duplicate code reported by code climate * chore: use spammy behavior for codecov This helps making the PR more understandable when fixing multiple issues.
@pyves When this will go online? |
@simonepri it has not yet been deployed, as indicated by the badge posted by our shields-deployment bot. We've got ongoing work to make deployments smoother (#1774), so I'll expect this to go live sooner rather than later. 😉 |
This change is done for the travis-ci.com migration, its further described over here badges/shields#1711.
## [1.2.2](1.2.1...1.2.2) (2019-04-25) ### Code refactors * clean up excessive or replaced dependencies ([7719ec3](7719ec3)) * replace old release configuration with new version ([29ea01a](29ea01a)) * replace url parse and format with simple split ([46c1cac](46c1cac)) * restructure the package file ([0ba5f05](0ba5f05)) * separate linting and testing and simplify codecov ([fdd12ae](fdd12ae)) * upgrade all dependencies to their latest versions ([e16177c](e16177c)) * upgrade commit-types-peakfijn to version 0.6.0 ([#20](#20)) ([919fb5a](919fb5a)) * upgrade commit-types-peakfijn to version 0.8.0 ([#28](#28)) ([7a39db2](7a39db2)) * upgrade commitizen to version 3.0.2 ([#31](#31)) ([e41b646](e41b646)) * upgrade conventional-changelog-peakfijn to version 0.6.0 ([#21](#21)) ([d3f4335](d3f4335)) * upgrade conventional-changelog-peakfijn to version 0.7.0 ([#29](#29)) ([682a575](682a575)) * upgrade cz-changelog-peakfijn to version 0.6.0 ([#22](#22)) ([2628fdb](2628fdb)) * upgrade cz-changelog-peakfijn to version 0.8.0 ([#30](#30)) ([e839a80](e839a80)) * upgrade debug to version 4.0.0 ([#27](#27)) ([d6127b0](d6127b0)) * upgrade execa to version 0.11.0 ([#23](#23)) ([79ed060](79ed060)) * upgrade execa to version 1.0.0 ([#24](#24)) ([51bfb73](51bfb73)) * upgrade get-stream to version 4.0.0 ([#19](#19)) ([ef2fa56](ef2fa56)) * upgrade xo to version 0.22.0 ([#18](#18)) ([1d1cb64](1d1cb64)) * upgrade xo to version 0.23.0 ([#25](#25)) ([fb9421b](fb9421b)) * use new peakfijn commitizen package ([5b86613](5b86613)) * use new peakfijn commitlint package ([75047e4](75047e4)) * use new peakfijn semantic release package ([3d458e1](3d458e1)) ### Code style changes * fix all new styling issues ([9c4ca04](9c4ca04)) * fix latest styling issues caused by the ava refactor ([fe9600b](fe9600b)) ### Documentation changes * use new travis badge that works ([96be688](96be688)), closes [badges/shields#1711](badges/shields#1711) ### Other chores * configure proper pull request titles for greenkeeper ([93416af](93416af)) * simplify the issue and pull request templates ([#26](#26)) ([dd17cde](dd17cde)) ### Pipeline changes * dryrun a release on develop as test before release ([8f05142](8f05142)) * use lts node versions and switch to npm ci with audit ([a5cec66](a5cec66)) ### Testing updates * update ava async usage to latest release ([4df0c72](4df0c72))
Add new badges for
travis-ci.com
using two new possible paths (maintaining consistency with travis-ci.org badges):/travis/com/USER/REPO.(svg|png|gif|jpg|json)
/travis-ci/com/USER/REPO.(svg|png|gif|jpg|json)
close #1674 #1710