Fix various trivial problems (#36921)

* Fix #36915
* Fix #36919
* Close #36600
* Close #36601
* Fix incorrect oauth2 error message display
This commit is contained in:
wxiaoguang
2026-03-19 07:13:55 +08:00
committed by GitHub
parent d6496c6156
commit 18c65965ab
7 changed files with 27 additions and 40 deletions

View File

@@ -95,7 +95,9 @@ func PullRequestCodeOwnersReview(ctx context.Context, pr *issues_model.PullReque
uniqTeams := make(map[string]*org_model.Team)
for _, rule := range rules {
for _, f := range changedFiles {
if (rule.Rule.MatchString(f) && !rule.Negative) || (!rule.Rule.MatchString(f) && rule.Negative) {
shouldMatch := !rule.Negative
matched, _ := rule.Rule.MatchString(f) // err only happens when timeouts, any error can be considered as not matched
if matched == shouldMatch {
for _, u := range rule.Users {
uniqUsers[u.ID] = u
}