☁️ 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.

Libraries

ci