diff --git a/HISTORY.rst b/HISTORY.rst index 5d03f055..0c0b5a3b 100644 --- a/HISTORY.rst +++ b/HISTORY.rst @@ -4,6 +4,8 @@ Release History 2.0.1 (2015-??-??) ------------------ +* Pass to API requests information about Continuous Integration system. This + information will be used by PlatformIO-API. * Fixed bug with converting ``*.ino`` to ``*.cpp`` 2.0.0 (2015-05-22) diff --git a/platformio/util.py b/platformio/util.py index 6dbad199..94f3f93f 100644 --- a/platformio/util.py +++ b/platformio/util.py @@ -246,8 +246,11 @@ def get_logicaldisks(): def get_request_defheaders(): - return {"User-Agent": "PlatformIO/%s %s" % ( - __version__, requests.utils.default_user_agent())} + return {"User-Agent": "PlatformIO/%s CI/%d %s" % ( + __version__, + 1 if os.environ.get("CI", "").lower() == "true" else 0, + requests.utils.default_user_agent() + )} def get_api_result(path, params=None, data=None):