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

Preparation of 3.6.0 release #42

Merged
merged 2 commits into from
Jan 29, 2024
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
2 changes: 2 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,6 +12,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0

## Unreleased

## [3.6.0] - 2024-01-29

## [3.5.1] - 2023-10-17
### Fixed
- add workaround for Erratum shipped_dt which is marked as non-nullable
Expand Down
2 changes: 1 addition & 1 deletion osidb_bindings/bindings/pyproject.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[tool.poetry]
name = "bindings"
version = "3.5.1"
version = "3.6.0"
description = "A client library for accessing OSIDB API"

authors = []
Expand Down
4 changes: 4 additions & 0 deletions osidb_bindings/bindings/python_client/api/osidb/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,17 +28,21 @@
from .osidb_api_v1_flaws_package_versions_list import *
from .osidb_api_v1_flaws_package_versions_retrieve import *
from .osidb_api_v1_flaws_package_versions_update import *
from .osidb_api_v1_flaws_promote_create import *
from .osidb_api_v1_flaws_references_create import *
from .osidb_api_v1_flaws_references_destroy import *
from .osidb_api_v1_flaws_references_list import *
from .osidb_api_v1_flaws_references_retrieve import *
from .osidb_api_v1_flaws_references_update import *
from .osidb_api_v1_flaws_reject_create import *
from .osidb_api_v1_flaws_retrieve import *
from .osidb_api_v1_flaws_update import *
from .osidb_api_v1_manifest_retrieve import *
from .osidb_api_v1_schema_retrieve import *
from .osidb_api_v1_status_retrieve import *
from .osidb_api_v1_trackers_create import *
from .osidb_api_v1_trackers_list import *
from .osidb_api_v1_trackers_retrieve import *
from .osidb_api_v1_trackers_update import *
from .osidb_healthy_retrieve import *
from .osidb_whoami_retrieve import *
Original file line number Diff line number Diff line change
Expand Up @@ -3,23 +3,23 @@
import requests

from ...client import AuthenticatedClient
from ...models.taskman_api_v1_task_flaw_create_response_200 import (
TaskmanApiV1TaskFlawCreateResponse200,
from ...models.osidb_api_v1_flaws_promote_create_response_200 import (
OsidbApiV1FlawsPromoteCreateResponse200,
)
from ...types import UNSET, Response, Unset

QUERY_PARAMS = {}


def _get_kwargs(
flaw_uuid: str,
flaw_id: str,
*,
client: AuthenticatedClient,
jira_api_key: str,
) -> Dict[str, Any]:
url = "{}/taskman/api/v1/task/flaw/{flaw_uuid}".format(
url = "{}/osidb/api/v1/flaws/{flaw_id}/promote".format(
client.base_url,
flaw_uuid=flaw_uuid,
flaw_id=flaw_id,
)

headers: Dict[str, Any] = client.get_headers()
Expand All @@ -34,14 +34,14 @@ def _get_kwargs(

def _parse_response(
*, response: requests.Response
) -> Optional[TaskmanApiV1TaskFlawCreateResponse200]:
) -> Optional[OsidbApiV1FlawsPromoteCreateResponse200]:
if response.status_code == 200:
_response_200 = response.json()
response_200: TaskmanApiV1TaskFlawCreateResponse200
response_200: OsidbApiV1FlawsPromoteCreateResponse200
if isinstance(_response_200, Unset):
response_200 = UNSET
else:
response_200 = TaskmanApiV1TaskFlawCreateResponse200.from_dict(
response_200 = OsidbApiV1FlawsPromoteCreateResponse200.from_dict(
_response_200
)

Expand All @@ -51,7 +51,7 @@ def _parse_response(

def _build_response(
*, response: requests.Response
) -> Response[TaskmanApiV1TaskFlawCreateResponse200]:
) -> Response[OsidbApiV1FlawsPromoteCreateResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
Expand All @@ -61,13 +61,13 @@ def _build_response(


def sync_detailed(
flaw_uuid: str,
flaw_id: str,
*,
client: AuthenticatedClient,
jira_api_key: str,
) -> Response[TaskmanApiV1TaskFlawCreateResponse200]:
) -> Response[OsidbApiV1FlawsPromoteCreateResponse200]:
kwargs = _get_kwargs(
flaw_uuid=flaw_uuid,
flaw_id=flaw_id,
client=client,
jira_api_key=jira_api_key,
)
Expand All @@ -84,28 +84,31 @@ def sync_detailed(


def sync(
flaw_uuid: str,
flaw_id: str,
*,
client: AuthenticatedClient,
jira_api_key: str,
) -> Optional[TaskmanApiV1TaskFlawCreateResponse200]:
"""Create a task in Jira from a Flaw"""
) -> Optional[OsidbApiV1FlawsPromoteCreateResponse200]:
"""workflow promotion API endpoint

try to adjust workflow classification of flaw to the next state available
return its workflow:state classification or errors if not possible to promote"""

return sync_detailed(
flaw_uuid=flaw_uuid,
flaw_id=flaw_id,
client=client,
jira_api_key=jira_api_key,
).parsed


async def async_detailed(
flaw_uuid: str,
flaw_id: str,
*,
client: AuthenticatedClient,
jira_api_key: str,
) -> Response[TaskmanApiV1TaskFlawCreateResponse200]:
) -> Response[OsidbApiV1FlawsPromoteCreateResponse200]:
kwargs = _get_kwargs(
flaw_uuid=flaw_uuid,
flaw_id=flaw_id,
client=client,
jira_api_key=jira_api_key,
)
Expand All @@ -122,16 +125,19 @@ async def async_detailed(


async def async_(
flaw_uuid: str,
flaw_id: str,
*,
client: AuthenticatedClient,
jira_api_key: str,
) -> Optional[TaskmanApiV1TaskFlawCreateResponse200]:
"""Create a task in Jira from a Flaw"""
) -> Optional[OsidbApiV1FlawsPromoteCreateResponse200]:
"""workflow promotion API endpoint

try to adjust workflow classification of flaw to the next state available
return its workflow:state classification or errors if not possible to promote"""

return (
await async_detailed(
flaw_uuid=flaw_uuid,
flaw_id=flaw_id,
client=client,
jira_api_key=jira_api_key,
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,54 +3,59 @@
import requests

from ...client import AuthenticatedClient
from ...models.taskman_api_v1_task_comment_create_response_200 import (
TaskmanApiV1TaskCommentCreateResponse200,
from ...models.osidb_api_v1_flaws_reject_create_response_200 import (
OsidbApiV1FlawsRejectCreateResponse200,
)
from ...models.reject import Reject
from ...types import UNSET, Response, Unset

QUERY_PARAMS = {
"content": str,
}
QUERY_PARAMS = {}
REQUEST_BODY_TYPE = Reject


def _get_kwargs(
task_key: str,
flaw_id: str,
*,
client: AuthenticatedClient,
content: str,
form_data: Reject,
multipart_data: Reject,
json_body: Reject,
jira_api_key: str,
) -> Dict[str, Any]:
url = "{}/taskman/api/v1/task/{task_key}/comment".format(
url = "{}/osidb/api/v1/flaws/{flaw_id}/reject".format(
client.base_url,
task_key=task_key,
flaw_id=flaw_id,
)

headers: Dict[str, Any] = client.get_headers()

headers["jira-api-key"] = jira_api_key

params: Dict[str, Any] = {
"content": content,
}
params = {k: v for k, v in params.items() if v is not UNSET and v is not None}
json_json_body: Dict[str, Any] = UNSET
if not isinstance(json_body, Unset):
json_body.to_dict()

multipart_multipart_data: Dict[str, Any] = UNSET
if not isinstance(multipart_data, Unset):
multipart_data.to_multipart()

return {
"url": url,
"headers": headers,
"params": params,
"data": form_data.to_dict(),
}


def _parse_response(
*, response: requests.Response
) -> Optional[TaskmanApiV1TaskCommentCreateResponse200]:
) -> Optional[OsidbApiV1FlawsRejectCreateResponse200]:
if response.status_code == 200:
_response_200 = response.json()
response_200: TaskmanApiV1TaskCommentCreateResponse200
response_200: OsidbApiV1FlawsRejectCreateResponse200
if isinstance(_response_200, Unset):
response_200 = UNSET
else:
response_200 = TaskmanApiV1TaskCommentCreateResponse200.from_dict(
response_200 = OsidbApiV1FlawsRejectCreateResponse200.from_dict(
_response_200
)

Expand All @@ -60,7 +65,7 @@ def _parse_response(

def _build_response(
*, response: requests.Response
) -> Response[TaskmanApiV1TaskCommentCreateResponse200]:
) -> Response[OsidbApiV1FlawsRejectCreateResponse200]:
return Response(
status_code=response.status_code,
content=response.content,
Expand All @@ -70,16 +75,20 @@ def _build_response(


def sync_detailed(
task_key: str,
flaw_id: str,
*,
client: AuthenticatedClient,
content: str,
form_data: Reject,
multipart_data: Reject,
json_body: Reject,
jira_api_key: str,
) -> Response[TaskmanApiV1TaskCommentCreateResponse200]:
) -> Response[OsidbApiV1FlawsRejectCreateResponse200]:
kwargs = _get_kwargs(
task_key=task_key,
flaw_id=flaw_id,
client=client,
content=content,
form_data=form_data,
multipart_data=multipart_data,
json_body=json_body,
jira_api_key=jira_api_key,
)

Expand All @@ -95,33 +104,43 @@ def sync_detailed(


def sync(
task_key: str,
flaw_id: str,
*,
client: AuthenticatedClient,
content: str,
form_data: Reject,
multipart_data: Reject,
json_body: Reject,
jira_api_key: str,
) -> Optional[TaskmanApiV1TaskCommentCreateResponse200]:
"""Create a new comment in a task"""
) -> Optional[OsidbApiV1FlawsRejectCreateResponse200]:
"""workflow promotion API endpoint

try to reject a flaw / task"""

return sync_detailed(
task_key=task_key,
flaw_id=flaw_id,
client=client,
content=content,
form_data=form_data,
multipart_data=multipart_data,
json_body=json_body,
jira_api_key=jira_api_key,
).parsed


async def async_detailed(
task_key: str,
flaw_id: str,
*,
client: AuthenticatedClient,
content: str,
form_data: Reject,
multipart_data: Reject,
json_body: Reject,
jira_api_key: str,
) -> Response[TaskmanApiV1TaskCommentCreateResponse200]:
) -> Response[OsidbApiV1FlawsRejectCreateResponse200]:
kwargs = _get_kwargs(
task_key=task_key,
flaw_id=flaw_id,
client=client,
content=content,
form_data=form_data,
multipart_data=multipart_data,
json_body=json_body,
jira_api_key=jira_api_key,
)

Expand All @@ -137,19 +156,25 @@ async def async_detailed(


async def async_(
task_key: str,
flaw_id: str,
*,
client: AuthenticatedClient,
content: str,
form_data: Reject,
multipart_data: Reject,
json_body: Reject,
jira_api_key: str,
) -> Optional[TaskmanApiV1TaskCommentCreateResponse200]:
"""Create a new comment in a task"""
) -> Optional[OsidbApiV1FlawsRejectCreateResponse200]:
"""workflow promotion API endpoint

try to reject a flaw / task"""

return (
await async_detailed(
task_key=task_key,
flaw_id=flaw_id,
client=client,
content=content,
form_data=form_data,
multipart_data=multipart_data,
json_body=json_body,
jira_api_key=jira_api_key,
)
).parsed
Loading
Loading