Commit 0810fca
fix(backend): scope automatic reviews per project and team (#2349)
The "reapply previous approvals" flow (reviews marked `automatic`)
resolved candidate previous builds by bucket name + branch + mode only.
Bucket names ("default", …) are unique within a project, so a build
could inherit approvals from a same-named build in another project — and
therefore another team.
Scope `getPreviousBuildsQuery` to `build.projectId`, which isolates the
whole automatic-review flow per project and, since a project belongs to
one account, per team.
Co-authored-by: Claude Opus 4.8 (1M context) <noreply@anthropic.com>1 parent cd28590 commit 0810fca
2 files changed
Lines changed: 35 additions & 0 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
395 | 395 | | |
396 | 396 | | |
397 | 397 | | |
| 398 | + | |
| 399 | + | |
| 400 | + | |
| 401 | + | |
| 402 | + | |
| 403 | + | |
| 404 | + | |
| 405 | + | |
| 406 | + | |
| 407 | + | |
| 408 | + | |
| 409 | + | |
| 410 | + | |
| 411 | + | |
| 412 | + | |
| 413 | + | |
| 414 | + | |
| 415 | + | |
| 416 | + | |
| 417 | + | |
| 418 | + | |
| 419 | + | |
| 420 | + | |
| 421 | + | |
| 422 | + | |
| 423 | + | |
| 424 | + | |
| 425 | + | |
| 426 | + | |
398 | 427 | | |
399 | 428 | | |
400 | 429 | | |
| |||
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
92 | 92 | | |
93 | 93 | | |
94 | 94 | | |
| 95 | + | |
| 96 | + | |
| 97 | + | |
| 98 | + | |
| 99 | + | |
| 100 | + | |
95 | 101 | | |
96 | 102 | | |
97 | 103 | | |
| |||
0 commit comments