OndraM / ci-detector

Detect continuous integration environment and get information of current build
MIT License
212 stars 12 forks source link

Describe all detected values in human-readable form #96

Closed OndraM closed 3 years ago

OndraM commented 3 years ago

Could be used for simple dump of all detected properties.

$ci = $ciDetector->detect();
print_r($ci->describe());
[
    [ci-name] => Travis CI
    [build-number] => 33.3
    [build-url] => https://travis-ci.org/OndraM/ci-detector/jobs/148395000
    [commit] => abcdf7bdbf3515d1e9285b8aa80feeff74507bdd
    [branch] => feature/foo-bar
    [target-branch] => main
    [repository-name] => OndraM/ci-detector
    [repository-url] => https://github.com/OndraM/ci-detector/
    [is-pull-request] => Yes
]