ci 0.1.0 icon indicating copy to clipboard operation
ci: ^0.1.0 copied to clipboard

Detect whether you're running in a CI environment and information about the CI vendor.

☁️ CI

Detect whether you're running in a CI environment and retrieve information about the CI vendor.

Melos docs.page

DocumentationLicense


About #

Example:

import 'package:ci/ci.dart' as ci;

Future<void> main() async {
  print(ci.isCI);
  print(ci.isPullRequest);
  print(ci.currentVendor);
  print(ci.currentVendor?.name);
  print(ci.currentVendor?.isPullRequest);
  print(ci.Vendor.IS_GITHUB_ACTIONS);
}

Adding support for a new CI vendor

The default CI vendors list is sourced from watson/ci-info, with an additional local vendors.json file that allows adding new vendors or overriding vendors from the default CI vendors list.

In most cases, you should make changes to the local vendors.json file and send a PR to add in support. Run dart generator/generate_vendors.dart before submitting your PR to update the generated vendor.g.dart file.


Built and maintained by Invertase.

3
likes
130
pub points
60%
popularity

Publisher

verified publisher iconinvertase.io

Detect whether you're running in a CI environment and information about the CI vendor.

Repository (GitHub)
View/report issues

Documentation

API reference

License

Icon for licenses.Apache-2.0 (LICENSE)

More

Packages that depend on ci