From d20e47b5dc1ed0f89525e3a83f74d205d9cb4a39 Mon Sep 17 00:00:00 2001 From: Jamie Greunbaum Date: Sun, 9 Jun 2024 16:49:03 -0400 Subject: [PATCH] Gitea form post method now takes empty descriptions into account. If the description box is empty, new lines are not added between the last line and the marker data. If empty description boxes are eventually made possible, this will allow for that. --- Scripts/server_gitea_api.gd | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/Scripts/server_gitea_api.gd b/Scripts/server_gitea_api.gd index d2659c7..4a76104 100644 --- a/Scripts/server_gitea_api.gd +++ b/Scripts/server_gitea_api.gd @@ -154,10 +154,13 @@ func __send_form_data_thread(data:Dictionary, map_name:String, bug_position:Vect var post_data : Dictionary = { "title": data["title"], - "body": data["body"] + "\n\n" + JSON.stringify(marker_data, "", false), + "body": data["body"], "labels": labels } + if not post_data["body"].is_empty(): post_data["body"] += "\n\n" + post_data["body"] += JSON.stringify(marker_data, "", false) + # Post issue to Gitea api_url = __build_url_string("issues") var post_data_string : String = JSON.stringify(post_data)