1
0
Fork 0
forked from forgejo/forgejo

Fix bug when pushing to a pull request which enabled dismiss approval automatically (#25882) (#26158)

Fix #25858
Backport #25882 

The option `dissmiss stale approvals` was listed on protected branch but
never implemented. This PR fixes that.

<img width="1006" alt="图片"

src="60bfa968-4db7-4c24-b8be-2e5978f91bb9">

<img width="1021" alt="图片"

src="8dabc14d-2dfe-40c2-94ed-24fcbf6e0e8f">
This commit is contained in:
Lunny Xiao 2023-07-27 10:36:54 +08:00 committed by GitHub
parent 54614767a2
commit 666038a06d
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 252 additions and 163 deletions

View file

@ -552,7 +552,7 @@ func GetIssueWithAttrsByID(id int64) (*Issue, error) {
// GetIssuesByIDs return issues with the given IDs.
func GetIssuesByIDs(ctx context.Context, issueIDs []int64) (IssueList, error) {
issues := make([]*Issue, 0, 10)
issues := make([]*Issue, 0, len(issueIDs))
return issues, db.GetEngine(ctx).In("id", issueIDs).Find(&issues)
}