File tree Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Expand file tree Collapse file tree 1 file changed +12
-0
lines changed Original file line number Diff line number Diff line change @@ -616,12 +616,24 @@ func (repo *Repository) getAssignees(e Engine) (_ []*User, err error) {
616
616
return users , nil
617
617
}
618
618
619
+ func (repo * Repository ) getIssueAuthors (e Engine ) (authors []* User , err error ) {
620
+ err = e .Where ("issue.repo_id = ?" , repo .ID ).
621
+ Join ("LEFT" , "user" , "user.id = issue.poster_id" ).OrderBy ("user.id" ).
622
+ GroupBy ("user.id" ).Select ("user.id, user.name, user.full_name" ).Find (authors )
623
+
624
+ return
625
+ }
626
+
619
627
// GetAssignees returns all users that have write access and can be assigned to issues
620
628
// of the repository,
621
629
func (repo * Repository ) GetAssignees () (_ []* User , err error ) {
622
630
return repo .getAssignees (x )
623
631
}
624
632
633
+ func (repo * Repository ) GetIssueAuthors () (_ []* User , err error ) {
634
+ return repo .getIssueAuthors (x )
635
+ }
636
+
625
637
// GetMilestoneByID returns the milestone belongs to repository by given ID.
626
638
func (repo * Repository ) GetMilestoneByID (milestoneID int64 ) (* Milestone , error ) {
627
639
return GetMilestoneByRepoID (repo .ID , milestoneID )
You can’t perform that action at this time.
0 commit comments