Skip to content

Commit

Permalink
Update base url regex
Browse files Browse the repository at this point in the history
  • Loading branch information
JokeWaumans committed Jul 15, 2024
1 parent dd0f57e commit 0e273fa
Showing 1 changed file with 14 additions and 2 deletions.
16 changes: 14 additions & 2 deletions mlx/coverity_services.py
Original file line number Diff line number Diff line change
Expand Up @@ -85,8 +85,10 @@ def base_url(self):

@base_url.setter
def base_url(self, value):
if not re.fullmatch(r"https?://.+:\d\d\d\d/?", value):
raise ValueError(f"Invalid base URL. Expected 'http(s)://<hostname>:<port>(/)'; Got {value}")
if not re.fullmatch(r"https?://.+:\d\d\d\d/api/v\d+/?", value):
raise ValueError(
f"Invalid base URL. Expected 'http(s)://<hostname>:<port>/api/{self.version}(/)'; Got {value}"
)
self._base_url = value

@property
Expand Down Expand Up @@ -251,6 +253,16 @@ def get_defects(self, project, filters, custom, username, password):
}
]
columns = []
data = {
"filters": request_filters,
"columns": columns,
"snapshotScope": {
"show": {
"scope": "last()",
"includeOutdatedSnapshots": False
}
}
}
# TODO: make dict with all matcher types and all filters
# apply any filter on checker names
if filters['checker']:
Expand Down

0 comments on commit 0e273fa

Please sign in to comment.