diff options
Diffstat (limited to 'models/issue.go')
-rw-r--r-- | models/issue.go | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/models/issue.go b/models/issue.go index eab494bdea..347598300e 100644 --- a/models/issue.go +++ b/models/issue.go @@ -1002,6 +1002,16 @@ func GetIssueByID(id int64) (*Issue, error) { return getIssueByID(x, id) } +func getIssuesByIDs(e Engine, issueIDs []int64) ([]*Issue, error) { + issues := make([]*Issue, 0, 10) + return issues, e.In("id", issueIDs).Find(&issues) +} + +// GetIssuesByIDs return issues with the given IDs. +func GetIssuesByIDs(issueIDs []int64) ([]*Issue, error) { + return getIssuesByIDs(x, issueIDs) +} + // IssuesOptions represents options of an issue. type IssuesOptions struct { RepoID int64 |