ci_env
Detects CI information from the current environment.
Usage
To start, detect if in a CI environment.
is_ci;
Or detect which CI provider is being used.
detect_ci_provider; // GithubActions
And most importantly, extract information about the CI environment and CI provider. This includes branch, commit, and pull request information.
use get_ci_environment;
if let Some = get_ci_environment
This library will properly take into account source and target branches when a pull request is involved. Do note though that not all providers provide this information.