mirror of
https://codeberg.org/forgejo/forgejo.git
synced 2025-05-04 13:50:39 +00:00
Batch updates for issues (#926)
This commit is contained in:
parent
021904e4e6
commit
09fe4a2ae9
11 changed files with 365 additions and 133 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue