You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@devlake.apache.org by ab...@apache.org on 2024/01/05 04:37:03 UTC
(incubator-devlake) branch release-v0.20 updated: fix: gitlab incident (#6748) (#6750)
This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch release-v0.20
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/release-v0.20 by this push:
new c10065dca fix: gitlab incident (#6748) (#6750)
c10065dca is described below
commit c10065dca6f9a14993dc08c8f41dcb1f0a078771
Author: github-actions[bot] <41...@users.noreply.github.com>
AuthorDate: Fri Jan 5 12:36:59 2024 +0800
fix: gitlab incident (#6748) (#6750)
Co-authored-by: abeizn <zi...@merico.dev>
---
backend/plugins/gitlab/tasks/issue_convertor.go | 11 +++++++----
1 file changed, 7 insertions(+), 4 deletions(-)
diff --git a/backend/plugins/gitlab/tasks/issue_convertor.go b/backend/plugins/gitlab/tasks/issue_convertor.go
index 6d09b4b19..879c0df0a 100644
--- a/backend/plugins/gitlab/tasks/issue_convertor.go
+++ b/backend/plugins/gitlab/tasks/issue_convertor.go
@@ -18,6 +18,10 @@ limitations under the License.
package tasks
import (
+ "reflect"
+ "strconv"
+ "strings"
+
"github.com/apache/incubator-devlake/core/dal"
"github.com/apache/incubator-devlake/core/errors"
"github.com/apache/incubator-devlake/core/models/domainlayer"
@@ -26,9 +30,6 @@ import (
"github.com/apache/incubator-devlake/core/plugin"
helper "github.com/apache/incubator-devlake/helpers/pluginhelper/api"
"github.com/apache/incubator-devlake/plugins/gitlab/models"
- "reflect"
- "strconv"
- "strings"
)
func init() {
@@ -76,7 +77,6 @@ func ConvertIssues(taskCtx plugin.SubTaskContext) errors.Error {
Title: issue.Title,
Description: issue.Body,
Priority: issue.Priority,
- Type: issue.StdType,
OriginalType: issue.Type,
LeadTimeMinutes: int64(issue.LeadTimeMinutes),
Url: issue.Url,
@@ -93,6 +93,9 @@ func ConvertIssues(taskCtx plugin.SubTaskContext) errors.Error {
AssigneeId: accountIdGen.Generate(data.Options.ConnectionId, issue.AssigneeId),
AssigneeName: issue.AssigneeName,
}
+ if strings.ToUpper(issue.Type) == ticket.INCIDENT {
+ domainIssue.Type = ticket.INCIDENT
+ }
if strings.ToUpper(issue.State) == "OPENED" {
domainIssue.Status = ticket.TODO