Skip to content

Commit

Permalink
common/redmine: get project_id from the identifier by default
Browse files Browse the repository at this point in the history
  • Loading branch information
kreatoo committed Sep 16, 2024
1 parent b9f5622 commit ab0efaf
Showing 1 changed file with 1 addition and 10 deletions.
11 changes: 1 addition & 10 deletions common/redmine.go
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
Expand Down

0 comments on commit ab0efaf

Please sign in to comment.