ci_diff_helper package

Module contents

Diff Helper for Continuous Integration (CI) Services.

Provides a set of utilities for dealing with Travis CI.

ci_diff_helper.in_travis()[source]

Detect if we are running in Travis.

See Travis env docs.

Return type:bool
Returns:Flag indicating if we are running on Travis.
ci_diff_helper.in_travis_pr()[source]

Detect if we are running in a pull request on Travis.

See Travis env docs.

Note

This assumes we already know we are running in Travis.

Return type:bool
Returns:Flag indicating if we are in a pull request on Travis.
ci_diff_helper.travis_branch()[source]

Get the current branch of the PR.

See Travis env docs.

Note

This assumes we already know we are running in Travis during a PR.

Return type:str
Returns:The name of the branch the current pull request is changed against.
Raises:OSError if the _TRAVIS_BRANCH_ENV environment variable isn’t set during a pull request build.