From ab0efaf76085511762c43e68a2dd8f8a35742b23 Mon Sep 17 00:00:00 2001 From: "Kreato (Work)" Date: Mon, 16 Sep 2024 17:52:56 +0300 Subject: [PATCH] common/redmine: get project_id from the identifier by default --- common/redmine.go | 11 +---------- 1 file changed, 1 insertion(+), 10 deletions(-) diff --git a/common/redmine.go b/common/redmine.go index b6746a1..fe0abd5 100644 --- a/common/redmine.go +++ b/common/redmine.go @@ -135,17 +135,8 @@ func RedmineCreate(service string, subject string, message string) { priorityId = Config.Redmine.Priority_id } - hostname, err := os.Hostname() - - if err != nil { - LogError("os.Hostname error: " + err.Error()) - if Config.Redmine.Project_id == "" { - return - } - } - if Config.Redmine.Project_id == "" { - projectId = strings.Split(hostname, "-")[0] + projectId = strings.Split(Config.Identifier, "-")[0] } else { projectId = Config.Redmine.Project_id }