Codeowners - Issue seem to be assigned to first match of codeowners
- Dominant language
- Python
- Stars
- 44.8k
- Forks
- 4.9k
- Avg merge
- 22h 21m
- Merged PRs (30d)
- 586
Description
### Environment
SaaS (https://sentry.io/)
### Steps to Reproduce
I'm debugging a Codeowners Assignment issue of a project using the Angular SDK.
They have setup their codeowners where they put the first rule as * to create a fallback on issues that don't have a match. To my understanding we evaluate top to bottom so that approach should be fine.
This example (see linked case) shows me a stack trace path where /libs/trading/ is in which should assign the issue to 7 people from the ownership rule.
I've unassigned the issue and retriggered the assignment to evaluate the behaviour
But still I see in the activity tab: Assigned via Codeowners Rule: codeowners:* -> Member A, B
It feels like a bug that it's still assigned to that first record.


Full context in [Case](https://www.notion.so/sentry/310ed14cfcc04288bf9679a0c250d908?p=1ce8b10e4b5d803e85b2ec63116b8e3f&pm=s)
### Expected Result
Assignement based on true match
### Actual Result
First match (I'm unable to figure out what the evaluation does)
### Product Area
Unknown
### Link
_No response_
### DSN
_No response_
### Version
_No response_
Contributor guide
Research direction
No repository file, test, or entry point is named. Start by reproducing the Codeowners assignment with the linked case and the provided rule ordering, then trace the assignment evaluation; done means a path matching a later rule is assigned according to that true match rather than the fallback rule.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- angular, python
- Domain
- backend
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 20/100