ci 0.1.0 copy "ci: ^0.1.0" to clipboard
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);
}
copied to clipboard

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.

7
likes
160
points
1.96M
downloads

Publisher

verified publisherinvertase.io

Weekly Downloads

2024.09.10 - 2025.03.25

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

Repository (GitHub)

Documentation

API reference

License

Apache-2.0 (license)

More

Packages that depend on ci