minor cleanup

This commit is contained in:
Michael Jerger 2023-08-17 17:10:29 +02:00
parent 17d93c34ec
commit 686c703f7d

View file

@ -224,15 +224,15 @@ class ArtifactDeploymentApi:
self.execution_api = ExecutionApi() self.execution_api = ExecutionApi()
def create_forgejo_release(self, api_endpoint_url: str, tag: str, token: str): def create_forgejo_release(self, api_endpoint_url: str, tag: str, token: str):
return self.execution_api.execute_secure( sanitized_command = (
f'curl -X "POST" "{api_endpoint_url}" ' f'curl -X "POST" "{api_endpoint_url}" '
+ '-H "accept: application/json" -H "Content-Type: application/json" ' + '-H "accept: application/json" -H "Content-Type: application/json" '
+ f'-d \'{{ "body": "Provides files for release {tag}", "tag_name": "{tag}"}}\' ' # noqa: E501 + f'-d \'{{ "body": "Provides files for release {tag}", "tag_name": "{tag}"}}\' '
+ f'-H "Authorization: token {token}"',
sanitized_command=f'curl -X "POST" "{api_endpoint_url}" '
+ '-H "accept: application/json" -H "Content-Type: application/json" '
+ f'-d \'{{ "body": "Provides files for release {tag}", "tag_name": "{tag}"}}\' ', # noqa: E501
) # noqa: E501 ) # noqa: E501
command = sanitized_command + f'-H "Authorization: token {token}"'
return self.execution_api.execute_secure(
command=command, sanitized_command=sanitized_command
)
def add_asset_to_release( def add_asset_to_release(
self, self,