mirror of
				https://gitee.com/gitea/gitea
				synced 2025-11-04 08:30:25 +08:00 
			
		
		
		
	Move issues related files into models/issues (#19931)
* Move access and repo permission to models/perm/access * fix test * fix git test * Move functions sequence * Some improvements per @KN4CK3R and @delvh * Move issues related code to models/issues * Move some issues related sub package * Merge * Fix test * Fix test * Fix test * Fix test * Rename some files
This commit is contained in:
		@@ -7,69 +7,69 @@ package forms
 | 
			
		||||
import (
 | 
			
		||||
	"math/big"
 | 
			
		||||
 | 
			
		||||
	"code.gitea.io/gitea/models"
 | 
			
		||||
	issues_model "code.gitea.io/gitea/models/issues"
 | 
			
		||||
	"code.gitea.io/gitea/modules/context"
 | 
			
		||||
	"code.gitea.io/gitea/modules/log"
 | 
			
		||||
)
 | 
			
		||||
 | 
			
		||||
type hiddenCommentTypeGroupsType map[string][]models.CommentType
 | 
			
		||||
type hiddenCommentTypeGroupsType map[string][]issues_model.CommentType
 | 
			
		||||
 | 
			
		||||
// hiddenCommentTypeGroups maps the group names to comment types, these group names comes from the Web UI (appearance.tmpl)
 | 
			
		||||
var hiddenCommentTypeGroups = hiddenCommentTypeGroupsType{
 | 
			
		||||
	"reference": {
 | 
			
		||||
		/*3*/ models.CommentTypeIssueRef,
 | 
			
		||||
		/*4*/ models.CommentTypeCommitRef,
 | 
			
		||||
		/*5*/ models.CommentTypeCommentRef,
 | 
			
		||||
		/*6*/ models.CommentTypePullRef,
 | 
			
		||||
		/*3*/ issues_model.CommentTypeIssueRef,
 | 
			
		||||
		/*4*/ issues_model.CommentTypeCommitRef,
 | 
			
		||||
		/*5*/ issues_model.CommentTypeCommentRef,
 | 
			
		||||
		/*6*/ issues_model.CommentTypePullRef,
 | 
			
		||||
	},
 | 
			
		||||
	"label": {
 | 
			
		||||
		/*7*/ models.CommentTypeLabel,
 | 
			
		||||
		/*7*/ issues_model.CommentTypeLabel,
 | 
			
		||||
	},
 | 
			
		||||
	"milestone": {
 | 
			
		||||
		/*8*/ models.CommentTypeMilestone,
 | 
			
		||||
		/*8*/ issues_model.CommentTypeMilestone,
 | 
			
		||||
	},
 | 
			
		||||
	"assignee": {
 | 
			
		||||
		/*9*/ models.CommentTypeAssignees,
 | 
			
		||||
		/*9*/ issues_model.CommentTypeAssignees,
 | 
			
		||||
	},
 | 
			
		||||
	"title": {
 | 
			
		||||
		/*10*/ models.CommentTypeChangeTitle,
 | 
			
		||||
		/*10*/ issues_model.CommentTypeChangeTitle,
 | 
			
		||||
	},
 | 
			
		||||
	"branch": {
 | 
			
		||||
		/*11*/ models.CommentTypeDeleteBranch,
 | 
			
		||||
		/*25*/ models.CommentTypeChangeTargetBranch,
 | 
			
		||||
		/*11*/ issues_model.CommentTypeDeleteBranch,
 | 
			
		||||
		/*25*/ issues_model.CommentTypeChangeTargetBranch,
 | 
			
		||||
	},
 | 
			
		||||
	"time_tracking": {
 | 
			
		||||
		/*12*/ models.CommentTypeStartTracking,
 | 
			
		||||
		/*13*/ models.CommentTypeStopTracking,
 | 
			
		||||
		/*14*/ models.CommentTypeAddTimeManual,
 | 
			
		||||
		/*15*/ models.CommentTypeCancelTracking,
 | 
			
		||||
		/*26*/ models.CommentTypeDeleteTimeManual,
 | 
			
		||||
		/*12*/ issues_model.CommentTypeStartTracking,
 | 
			
		||||
		/*13*/ issues_model.CommentTypeStopTracking,
 | 
			
		||||
		/*14*/ issues_model.CommentTypeAddTimeManual,
 | 
			
		||||
		/*15*/ issues_model.CommentTypeCancelTracking,
 | 
			
		||||
		/*26*/ issues_model.CommentTypeDeleteTimeManual,
 | 
			
		||||
	},
 | 
			
		||||
	"deadline": {
 | 
			
		||||
		/*16*/ models.CommentTypeAddedDeadline,
 | 
			
		||||
		/*17*/ models.CommentTypeModifiedDeadline,
 | 
			
		||||
		/*18*/ models.CommentTypeRemovedDeadline,
 | 
			
		||||
		/*16*/ issues_model.CommentTypeAddedDeadline,
 | 
			
		||||
		/*17*/ issues_model.CommentTypeModifiedDeadline,
 | 
			
		||||
		/*18*/ issues_model.CommentTypeRemovedDeadline,
 | 
			
		||||
	},
 | 
			
		||||
	"dependency": {
 | 
			
		||||
		/*19*/ models.CommentTypeAddDependency,
 | 
			
		||||
		/*20*/ models.CommentTypeRemoveDependency,
 | 
			
		||||
		/*19*/ issues_model.CommentTypeAddDependency,
 | 
			
		||||
		/*20*/ issues_model.CommentTypeRemoveDependency,
 | 
			
		||||
	},
 | 
			
		||||
	"lock": {
 | 
			
		||||
		/*23*/ models.CommentTypeLock,
 | 
			
		||||
		/*24*/ models.CommentTypeUnlock,
 | 
			
		||||
		/*23*/ issues_model.CommentTypeLock,
 | 
			
		||||
		/*24*/ issues_model.CommentTypeUnlock,
 | 
			
		||||
	},
 | 
			
		||||
	"review_request": {
 | 
			
		||||
		/*27*/ models.CommentTypeReviewRequest,
 | 
			
		||||
		/*27*/ issues_model.CommentTypeReviewRequest,
 | 
			
		||||
	},
 | 
			
		||||
	"pull_request_push": {
 | 
			
		||||
		/*29*/ models.CommentTypePullRequestPush,
 | 
			
		||||
		/*29*/ issues_model.CommentTypePullRequestPush,
 | 
			
		||||
	},
 | 
			
		||||
	"project": {
 | 
			
		||||
		/*30*/ models.CommentTypeProject,
 | 
			
		||||
		/*31*/ models.CommentTypeProjectBoard,
 | 
			
		||||
		/*30*/ issues_model.CommentTypeProject,
 | 
			
		||||
		/*31*/ issues_model.CommentTypeProjectBoard,
 | 
			
		||||
	},
 | 
			
		||||
	"issue_ref": {
 | 
			
		||||
		/*33*/ models.CommentTypeChangeIssueRef,
 | 
			
		||||
		/*33*/ issues_model.CommentTypeChangeIssueRef,
 | 
			
		||||
	},
 | 
			
		||||
}
 | 
			
		||||
 | 
			
		||||
 
 | 
			
		||||
		Reference in New Issue
	
	Block a user