This is an automated email from the ASF dual-hosted git repository.
abeizn pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/incubator-devlake.git
The following commit(s) were added to refs/heads/main by this push:
new 44c3ecb81 fix(domainlayer): simplify codes (#7794)
44c3ecb81 is described below
commit 44c3ecb8194d008dd4e3914bb534d2a26eeefdae
Author: Lynwee <[email protected]>
AuthorDate: Tue Jul 30 19:16:28 2024 +0800
fix(domainlayer): simplify codes (#7794)
---
backend/core/models/domainlayer/ticket/issue.go | 7 -------
1 file changed, 7 deletions(-)
diff --git a/backend/core/models/domainlayer/ticket/issue.go
b/backend/core/models/domainlayer/ticket/issue.go
index 816571a4a..25039e8df 100644
--- a/backend/core/models/domainlayer/ticket/issue.go
+++ b/backend/core/models/domainlayer/ticket/issue.go
@@ -18,7 +18,6 @@ limitations under the License.
package ticket
import (
- "errors"
"github.com/apache/incubator-devlake/core/models/domainlayer"
"time"
)
@@ -111,9 +110,6 @@ func (issue Issue) IsIncident() bool {
}
func (issue Issue) ToIncidentAssignee() (*IncidentAssignee, error) {
- if !issue.IsIncident() {
- return nil, errors.New("issue type is not INCIDENT, cannot
generate incident_assignee")
- }
return &IncidentAssignee{
IncidentId: issue.Id,
AssigneeId: issue.AssigneeId,
@@ -123,9 +119,6 @@ func (issue Issue) ToIncidentAssignee() (*IncidentAssignee,
error) {
}
func (issue Issue) ToIncident() (*Incident, error) {
- if !issue.IsIncident() {
- return nil, errors.New("issue type is not INCIDENT, cannot
generate incident")
- }
incident := &Incident{
DomainEntity: issue.DomainEntity,
Url: issue.Url,