Skip to content

Commit 98ffd85

Browse files
committed
Fixing support for pr number with API change
1 parent a758670 commit 98ffd85

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

pyproject.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ build-backend = "hatchling.build"
44

55
[project]
66
name = "socketdev"
7-
version = "3.0.26"
7+
version = "3.0.27"
88
requires-python = ">= 3.9"
99
dependencies = [
1010
'requests',

socketdev/fullscans/__init__.py

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -789,6 +789,14 @@ def post(
789789
org_slug = str(params.org_slug)
790790
params_dict = params.to_dict()
791791
params_dict.pop("org_slug")
792+
# Remove pull_request param if it's None, 0, or not an integer
793+
if hasattr(params, 'pull_request') and (
794+
params.pull_request is None or
795+
not isinstance(params.pull_request, int) or
796+
params.pull_request == 0
797+
):
798+
print("Removing pull_request param from FullScanParams as it is None, 0, or not an integer")
799+
params_dict.pop("pull_request")
792800
params_arg = urllib.parse.urlencode(params_dict)
793801
path = "orgs/" + org_slug + "/full-scans?" + str(params_arg)
794802

socketdev/version.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
__version__ = "3.0.26"
1+
__version__ = "3.0.27"

0 commit comments

Comments
 (0)