Find out if an IP belongs to a CI service.
We use this internally on Surge, since you can publish via Travis CI, Wercker, or other CI services.
To use this module, install it as a dependency using npm:
npm install --save ip-to-ci
Then, pass it an IP address and you’ll get a CI service name in return:
var ipci = require('ip-to-ci')
ipci('192.168.1.1') // 192.168.1.1
ipci('54.172.141.90') // Travis CI
ipci('54.175.201.227') // Wercker
Services that we’d still like to figure out how to support:
Thanks for considering contributing! Run the following commands to get started locally:
# Clone the project
git clone https://github.com/surge-sh/ip-to-ci
# Move into the project directory
cd ip-to-ci
# Install dependencies
npm install
# Run the tests
npm test
We’d love to add support for CircleCI, Codeship, or other CI services to this module, but haven’t found a good way to do that yet. If you want to open an issue or pull request for this, we’re more than happy to discuss it. Thanks!
Copyright © 2015 Chloi Inc.