Skip to content

Commit ffcc07b

Browse files
committed
feat(user-agent): rename client to socket-python-cli
Use one client name for CLI and SDK requests. Preserve the current release version and record the change under Unreleased.
1 parent 69be9f7 commit ffcc07b

3 files changed

Lines changed: 10 additions & 2 deletions

File tree

‎CHANGELOG.md‎

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,11 @@
11
# Changelog
22

3+
## Unreleased
4+
5+
### Changed: use lowercase Python CLI User-Agent
6+
7+
- Use `socket-python-cli/` consistently for CLI and SDK requests.
8+
39
## 2.11.7
410

511
### Changed: bump pinned Coana CLI to 15.13.3

‎socketsecurity/__init__.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,4 @@
11
__author__ = 'socket.dev'
22
__version__ = '2.11.7'
3-
USER_AGENT = f'SocketPythonCLI/{__version__}'
3+
USER_AGENT_NAME = 'socket-python-cli'
4+
USER_AGENT = f'{USER_AGENT_NAME}/{__version__}'

‎socketsecurity/socketcli.py‎

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,6 +12,7 @@
1212
from socketdev import socketdev
1313
from socketdev.fullscans import FullScanParams
1414

15+
from socketsecurity import USER_AGENT_NAME
1516
from socketsecurity.config import CliConfig, truncate_commit_message
1617
from socketsecurity.core import Core
1718
from socketsecurity.core.classes import Diff
@@ -240,7 +241,7 @@ def apply_git_context(config: CliConfig) -> Tuple[bool, Optional[Git]]:
240241

241242

242243
def build_socket_sdk(config: CliConfig) -> socketdev:
243-
cli_user_agent_string = f"SocketPythonCLI/{config.version}"
244+
cli_user_agent_string = f"{USER_AGENT_NAME}/{config.version}"
244245
return socketdev(
245246
token=config.api_token,
246247
timeout=get_api_request_timeout(config),

0 commit comments

Comments
 (0)