|
|
|
@ -224,15 +224,15 @@ class ArtifactDeploymentApi:
|
|
|
|
|
self.execution_api = ExecutionApi()
|
|
|
|
|
|
|
|
|
|
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}" '
|
|
|
|
|
+ '-H "accept: application/json" -H "Content-Type: application/json" '
|
|
|
|
|
+ f'-d \'{{ "body": "Provides files for release {tag}", "tag_name": "{tag}"}}\' ' # noqa: E501
|
|
|
|
|
+ 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
|
|
|
|
|
+ f'-d \'{{ "body": "Provides files for release {tag}", "tag_name": "{tag}"}}\' '
|
|
|
|
|
) # 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(
|
|
|
|
|
self,
|
|
|
|
|