Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Check for explicit PIP_IS_CI environment variable to report automated installs to Warehouse. #6522

Merged
merged 1 commit into from
May 24, 2019
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions news/5499.feature
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
Report to Warehouse that pip is running under CI if the ``PIP_IS_CI`` environment variable is set.
2 changes: 2 additions & 0 deletions src/pip/_internal/download.py
Original file line number Diff line number Diff line change
Expand Up @@ -95,6 +95,8 @@
'BUILD_ID',
# AppVeyor, CircleCI, Codeship, Gitlab CI, Shippable, Travis CI
'CI',
# Explicit environment variable.
'PIP_IS_CI',
)


Expand Down
1 change: 1 addition & 0 deletions tests/unit/test_download.py
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,7 @@ def test_user_agent():
('BUILD_BUILDID', True),
('BUILD_ID', True),
('CI', True),
('PIP_IS_CI', True),
# Test a prefix substring of one of the variable names we use.
('BUILD', False),
])
Expand Down