fix(pr): review decision ignores comment reviews, paged review list, pending review comments hidden, team request names (follow gh)

Signed-off-by: bircni <bircni@icloud.com>
This commit is contained in:
bircni committed 2026-10-18 20:07:47 +02:00
1 parent aa181a2b5c
commit efd3383ff9
19 files changed
+258 -50

No files matched your search

+9 -1
View File
@@ -97,10 +97,15 @@ func (s Reviews) changeRequests(ctx context.Context, n int64, changes ReviewRequ
return nil
}
// CheckRequestTeams verifies that every named team exists in the repository's organization.
// CheckRequestTeams verifies that every named team exists in the repository's organization. Gitea
// lets only organization members list teams, though outside collaborators and the pull request
// author may request reviews; when the lookup is forbidden the server checks the names, as for gh.
func (s Reviews) CheckRequestTeams(ctx context.Context, names []string) error {
owner, _, _ := strings.Cut(s.Repository, "/")
_, isOrg, err := organization(ctx, s.Client, owner)
if IsForbidden(err) {
return nil
}
if err != nil {
return err
}
@@ -108,6 +113,9 @@ func (s Reviews) CheckRequestTeams(ctx context.Context, names []string) error {
return errors.New("team reviews require an organization repository")
}
teams, err := (Teams{Client: s.Client}).ByName(ctx, owner)
if IsForbidden(err) {
return nil
}
if err != nil {
return err
}