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

[Travis] Add travis-ci.com support #1711

Merged
merged 7 commits into from
Jun 17, 2018
Merged

[Travis] Add travis-ci.com support #1711

merged 7 commits into from
Jun 17, 2018

Conversation

ivanbeldad
Copy link

@ivanbeldad ivanbeldad commented May 29, 2018

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

@shields-ci
Copy link

shields-ci commented May 29, 2018

Messages
📖

✨ Thanks for your contribution to Shields, @ivandelabeldad!

📖

Thanks for contributing to our documentation. We ❤️ our documentarians!

Generated by 🚫 dangerJS

@RedSparr0w
Copy link
Member

Thanks for the PR!

But could you merge this with the current travis.org implementation please?

As there is only a couple lines difference.

com org diff

-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);
    }
  });
}));

@ivanbeldad
Copy link
Author

Merged done.
Thanks to you for maintain this amazing project!

@ivanbeldad
Copy link
Author

I've read that you're trying to implement const and let instead of var. So because I've changed travis integration I've updated it in this same pull request. Also the travis-php integration now use template literals (so much easier to read).

Copy link
Member

@RedSparr0w RedSparr0w left a 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!
👍

Copy link
Member

@PyvesB PyvesB left a 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?

@PyvesB PyvesB added the service-badge New or updated service badge label Jun 15, 2018
@paulmelnikow
Copy link
Member

@ivandelabeldad Do you have a moment to address the review comment? It would be great to get this merged. 😁

@ivanbeldad
Copy link
Author

@paulmelnikow Do you mean add "(.org)" as extra-clarification on the old badges?

@paulmelnikow
Copy link
Member

Yea, that's what I noticed that was outstanding.

@PyvesB PyvesB merged commit 4308b60 into badges:master Jun 17, 2018
@shields-deployment
Copy link

shields-deployment bot commented Jun 17, 2018

This pull request was merged to master branch. Now this change is waiting for deployment.
Deploys usually happen every few weeks. After deployment changes are copied to gh-pages branch.

This badge displays deployment status:

webknjaz added a commit to aio-libs/multidict that referenced this pull request Jun 17, 2018
astorije added a commit to thelounge/thelounge-theme-classic that referenced this pull request Jun 20, 2018
This will only show when shields.io releases it (see badges/shields#1711)
byCedric added a commit to byCedric/semantic-release-expo that referenced this pull request Jun 28, 2018
This change is done for the travis-ci.com migration, its further described over here badges/shields#1711.

Fixes #7
byCedric added a commit to byCedric/semantic-release-expo that referenced this pull request Jul 11, 2018
This change is done for the travis-ci.com migration, its further described over here badges/shields#1711.

Fixes #7
byCedric added a commit to byCedric/semantic-release-expo that referenced this pull request Jul 11, 2018
* 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.
@simonepri
Copy link

@pyves When this will go online?

@PyvesB
Copy link
Member

PyvesB commented Jul 12, 2018

@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. 😉

byCedric added a commit to byCedric/semantic-release-git-branches that referenced this pull request Aug 4, 2018
This change is done for the travis-ci.com migration, its further described over here badges/shields#1711.
byCedric pushed a commit to byCedric/semantic-release-git-branches that referenced this pull request Apr 25, 2019
## [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))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
service-badge New or updated service badge
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Travis-ci.com support
6 participants