Gitea bugs are now considered to be "in progress" if someone is assigned to the bug.
This commit is contained in:
parent
7cdd6d239d
commit
cf1c6a3632
@ -14,6 +14,7 @@ const DEFAULT_HARDWARE_LABEL_PREFIX : StringName = &"Hardware/"
|
|||||||
const DEFAULT_OS_LABEL_PREFIX : StringName = &"OS/"
|
const DEFAULT_OS_LABEL_PREFIX : StringName = &"OS/"
|
||||||
const DEFAULT_COMPONENT_LABEL_PREFIX : StringName = &"Component/"
|
const DEFAULT_COMPONENT_LABEL_PREFIX : StringName = &"Component/"
|
||||||
const DEFAULT_PRIORITY_LABEL_PREFIX : StringName = &"Priority/"
|
const DEFAULT_PRIORITY_LABEL_PREFIX : StringName = &"Priority/"
|
||||||
|
const DEFAULT_SHOW_ASSIGNED_AS_IN_PROGRESS : bool = true
|
||||||
|
|
||||||
const UNRESOLVED_TAG : StringName = &"Status/Unresolved"
|
const UNRESOLVED_TAG : StringName = &"Status/Unresolved"
|
||||||
const IN_PROGRESS_TAG : StringName = &"Status/In Progress"
|
const IN_PROGRESS_TAG : StringName = &"Status/In Progress"
|
||||||
@ -52,7 +53,8 @@ func __return_list_of_bugs_thread(map_name:String, callback:Callable) -> void:
|
|||||||
"resolved_labels": ProjectSettings.get_setting("bugbot/reporting/gitea/status_labels/resolved_statuses", Array()),
|
"resolved_labels": ProjectSettings.get_setting("bugbot/reporting/gitea/status_labels/resolved_statuses", Array()),
|
||||||
}
|
}
|
||||||
for bug_in:Dictionary in response_data:
|
for bug_in:Dictionary in response_data:
|
||||||
var bug : BugbotBugData = __create_bug_data_from_server_response(bug_in, map_name, label_dict, true)
|
var assigned_as_in_progress : bool = ProjectSettings.get_setting("bugbot/reporting/gitea/status_labels/show_assigned_as_in_progress", DEFAULT_SHOW_ASSIGNED_AS_IN_PROGRESS)
|
||||||
|
var bug : BugbotBugData = __create_bug_data_from_server_response(bug_in, map_name, label_dict, true, assigned_as_in_progress)
|
||||||
if bug:
|
if bug:
|
||||||
bug_array.append(bug)
|
bug_array.append(bug)
|
||||||
|
|
||||||
@ -172,7 +174,8 @@ func __send_form_data_thread(data:Dictionary, map_name:String, bug_position:Vect
|
|||||||
"in_progress_labels": ProjectSettings.get_setting("bugbot/reporting/gitea/status_labels/in_progress_statuses", Array()),
|
"in_progress_labels": ProjectSettings.get_setting("bugbot/reporting/gitea/status_labels/in_progress_statuses", Array()),
|
||||||
"resolved_labels": ProjectSettings.get_setting("bugbot/reporting/gitea/status_labels/resolved_statuses", Array()),
|
"resolved_labels": ProjectSettings.get_setting("bugbot/reporting/gitea/status_labels/resolved_statuses", Array()),
|
||||||
}
|
}
|
||||||
var bug_data : BugbotBugData = __create_bug_data_from_server_response(post_response_data, map_name, label_dict, false)
|
var assigned_as_in_progress : bool = ProjectSettings.get_setting("bugbot/reporting/gitea/status_labels/show_assigned_as_in_progress", DEFAULT_SHOW_ASSIGNED_AS_IN_PROGRESS)
|
||||||
|
var bug_data : BugbotBugData = __create_bug_data_from_server_response(post_response_data, map_name, label_dict, false, assigned_as_in_progress)
|
||||||
|
|
||||||
callback.call_deferred(bug_data)
|
callback.call_deferred(bug_data)
|
||||||
__bugbot_server_thread.call_deferred("wait_to_finish")
|
__bugbot_server_thread.call_deferred("wait_to_finish")
|
||||||
@ -214,7 +217,7 @@ func __validate_server_response(_response:Variant) -> int:
|
|||||||
return Error.FAILED
|
return Error.FAILED
|
||||||
return Error.OK
|
return Error.OK
|
||||||
|
|
||||||
func __create_bug_data_from_server_response(bug_in:Dictionary, map_name:String, label_dict:Dictionary, validate_labels:bool) -> BugbotBugData:
|
func __create_bug_data_from_server_response(bug_in:Dictionary, map_name:String, label_dict:Dictionary, validate_labels:bool, assigned_as_in_progress:bool) -> BugbotBugData:
|
||||||
var bugbot_marker_string : String = bug_in["body"].split("\n")[-1]
|
var bugbot_marker_string : String = bug_in["body"].split("\n")[-1]
|
||||||
if not bugbot_marker_string.begins_with("{") and not bugbot_marker_string.ends_with("}"):
|
if not bugbot_marker_string.begins_with("{") and not bugbot_marker_string.ends_with("}"):
|
||||||
return null
|
return null
|
||||||
@ -241,6 +244,8 @@ func __create_bug_data_from_server_response(bug_in:Dictionary, map_name:String,
|
|||||||
bug.is_open = (bug_in["state"] == "open")
|
bug.is_open = (bug_in["state"] == "open")
|
||||||
if not bug.is_open:
|
if not bug.is_open:
|
||||||
resolved_tag_found = true
|
resolved_tag_found = true
|
||||||
|
elif assigned_as_in_progress and bug_in["assignees"] is Array:
|
||||||
|
in_progress_tag_found = true
|
||||||
else:
|
else:
|
||||||
for labels:Dictionary in bug_in["labels"]:
|
for labels:Dictionary in bug_in["labels"]:
|
||||||
bug_labels.append(labels["name"] as String)
|
bug_labels.append(labels["name"] as String)
|
||||||
|
|||||||
@ -65,6 +65,7 @@ func __initialise_project_settings() -> void:
|
|||||||
__add_project_setting("bugbot/reporting/gitea/status_labels/os_label_prefix", TYPE_STRING, BugbotServerGiteaAPI.DEFAULT_OS_LABEL_PREFIX)
|
__add_project_setting("bugbot/reporting/gitea/status_labels/os_label_prefix", TYPE_STRING, BugbotServerGiteaAPI.DEFAULT_OS_LABEL_PREFIX)
|
||||||
__add_project_setting("bugbot/reporting/gitea/status_labels/component_label_prefix", TYPE_STRING, BugbotServerGiteaAPI.DEFAULT_COMPONENT_LABEL_PREFIX)
|
__add_project_setting("bugbot/reporting/gitea/status_labels/component_label_prefix", TYPE_STRING, BugbotServerGiteaAPI.DEFAULT_COMPONENT_LABEL_PREFIX)
|
||||||
__add_project_setting("bugbot/reporting/gitea/status_labels/priority_label_prefix", TYPE_STRING, BugbotServerGiteaAPI.DEFAULT_PRIORITY_LABEL_PREFIX)
|
__add_project_setting("bugbot/reporting/gitea/status_labels/priority_label_prefix", TYPE_STRING, BugbotServerGiteaAPI.DEFAULT_PRIORITY_LABEL_PREFIX)
|
||||||
|
__add_project_setting("bugbot/reporting/gitea/status_labels/show_assigned_as_in_progress", TYPE_BOOL, BugbotServerGiteaAPI.DEFAULT_SHOW_ASSIGNED_AS_IN_PROGRESS)
|
||||||
#endregion
|
#endregion
|
||||||
#region Jira
|
#region Jira
|
||||||
__add_project_setting("bugbot/reporting/jira/server", TYPE_STRING, "https://jira.example.com")
|
__add_project_setting("bugbot/reporting/jira/server", TYPE_STRING, "https://jira.example.com")
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user