From 8d4921ea704bd13d35446c488ad46f526b6e9cf7 Mon Sep 17 00:00:00 2001 From: bom Date: Fri, 4 Aug 2023 11:47:32 +0200 Subject: [PATCH] Switch order of function parameters --- .../python/ddadevops/infrastructure/infrastructure.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/src/main/python/ddadevops/infrastructure/infrastructure.py b/src/main/python/ddadevops/infrastructure/infrastructure.py index 95b5105..3279430 100644 --- a/src/main/python/ddadevops/infrastructure/infrastructure.py +++ b/src/main/python/ddadevops/infrastructure/infrastructure.py @@ -212,7 +212,7 @@ class ArtifactDeploymentApi: def __init__(self): self.execution_api = ExecutionApi() - def post_release(self, target_url: str, token: str, tag: str): + def post_release(self, target_url: str, tag: str, token: str): self.execution_api.execute_secure(f'curl -X "POST" "{target_url}" ' + '-H "accept: application/json" -H "Content-Type: application/json" ' + f'-d "{{ "body": "Provides files for release {tag} Attention: The "Source Code"-files below are not up-to-date!", "tag_name": "{tag}"}}" ' # noqa: E501 @@ -221,12 +221,12 @@ class ArtifactDeploymentApi: + '-H "accept: application/json" -H "Content-Type: application/json" ' + f'-d "{{ "body": "Provides files for release {tag} Attention: The "Source Code"-files below are not up-to-date!", "tag_name": "{tag}"}}" ') # noqa: E501 - def post_asset(self, target_url: str, release_id: str, token: str, attachment: str, attachment_type: str): - self.execution_api.execute_secure(f'curl -X "POST" "{target_url}/{release_id}/assets" ' + def post_asset(self, target_url: str, release_id: str, attachment: str, attachment_type: str, token: str): + self.execution_api.execute_secure(f'curl -X "POST" "{target_url}/{release_id}/assets" ' # {target_url}/{release_id}/assets move to Domain + f'-H "accept: application/json" -H "Authorization: token {token}" ' + '-H "Content-Type: multipart/form-data" ' + f'-F "attachment=@{attachment};type={attachment_type}"', - sanitized_command=f'curl -X "POST" "{target_url}/{release_id}/assets" ' + sanitized_command=f'curl -X "POST" "{target_url}/{release_id}/assets" ' # see above + '-H "accept: application/json" ' + '-H "Content-Type: multipart/form-data" ' + f'-F "attachment=@{attachment};type={attachment_type}"')