mirror of
https://github.com/go-gitea/gitea
synced 2025-07-22 18:28:37 +00:00
Introducing Collaboration Struct
This commit is contained in:
@@ -174,7 +174,7 @@ func CreateIssue(ctx *middleware.Context) {
|
||||
return
|
||||
}
|
||||
|
||||
us, err := models.GetCollaborators(strings.TrimPrefix(ctx.Repo.RepoLink, "/"))
|
||||
us, err := ctx.Repo.Repository.GetCollaborators()
|
||||
if err != nil {
|
||||
ctx.Handle(500, "issue.CreateIssue(GetCollaborators)", err)
|
||||
return
|
||||
@@ -218,7 +218,7 @@ func CreateIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) {
|
||||
return
|
||||
}
|
||||
|
||||
_, err = models.GetCollaborators(strings.TrimPrefix(ctx.Repo.RepoLink, "/"))
|
||||
_, err = ctx.Repo.Repository.GetCollaborators()
|
||||
if err != nil {
|
||||
send(500, nil, err)
|
||||
return
|
||||
@@ -246,8 +246,8 @@ func CreateIssuePost(ctx *middleware.Context, form auth.CreateIssueForm) {
|
||||
if err := models.NewIssue(issue); err != nil {
|
||||
send(500, nil, err)
|
||||
return
|
||||
} else if err := models.NewIssueUserPairs(issue.RepoId, issue.Id, ctx.Repo.Owner.Id,
|
||||
ctx.User.Id, form.AssigneeId, ctx.Repo.Repository.Name); err != nil {
|
||||
} else if err := models.NewIssueUserPairs(ctx.Repo.Repository, issue.Id, ctx.Repo.Owner.Id,
|
||||
ctx.User.Id, form.AssigneeId); err != nil {
|
||||
send(500, nil, err)
|
||||
return
|
||||
}
|
||||
@@ -384,7 +384,7 @@ func ViewIssue(ctx *middleware.Context) {
|
||||
}
|
||||
|
||||
// Get all collaborators.
|
||||
ctx.Data["Collaborators"], err = models.GetCollaborators(strings.TrimPrefix(ctx.Repo.RepoLink, "/"))
|
||||
ctx.Data["Collaborators"], err = ctx.Repo.Repository.GetCollaborators()
|
||||
if err != nil {
|
||||
ctx.Handle(500, "issue.CreateIssue(GetCollaborators)", err)
|
||||
return
|
||||
@@ -1122,18 +1122,18 @@ func IssueGetAttachment(ctx *middleware.Context) {
|
||||
|
||||
// testing route handler for new issue ui page
|
||||
// todo : move to Issue() function
|
||||
func Issues2(ctx *middleware.Context){
|
||||
ctx.HTML(200,"repo/issue2/list")
|
||||
func Issues2(ctx *middleware.Context) {
|
||||
ctx.HTML(200, "repo/issue2/list")
|
||||
}
|
||||
|
||||
func PullRequest2(ctx *middleware.Context){
|
||||
ctx.HTML(200,"repo/pr2/list")
|
||||
func PullRequest2(ctx *middleware.Context) {
|
||||
ctx.HTML(200, "repo/pr2/list")
|
||||
}
|
||||
|
||||
func Labels2(ctx *middleware.Context){
|
||||
ctx.HTML(200,"repo/issue2/labels")
|
||||
func Labels2(ctx *middleware.Context) {
|
||||
ctx.HTML(200, "repo/issue2/labels")
|
||||
}
|
||||
|
||||
func Milestones2(ctx *middleware.Context){
|
||||
ctx.HTML(200,"repo/milestone2/list")
|
||||
func Milestones2(ctx *middleware.Context) {
|
||||
ctx.HTML(200, "repo/milestone2/list")
|
||||
}
|
||||
|
Reference in New Issue
Block a user