You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
ref(suspect commits): Simplify event file committers to GroupOwner-only behavior (#98504)
## Summary
Removes the legacy release-based fallback logic from the event file
committers endpoint, simplifying it to use only GroupOwner-based suspect
commit detection.
Current behavior: If there are no suspect commits for the event, do a
live analysis using the legacy strategy, do not save any of the commits
it finds as suspect, return as many as it finds.
💡 : it was doing this because it was the only way to show a suspect
commit if the Author was NOT a User of their org. The legacy strategy
does not allow GroupOwner creation if there is not an associated User,
it ignores those. This does not match the behavior of the non-legacy
strategy, which allows GroupOwners with `user=None` and all serializers
have fallback logic to display details from the `CommitAuthor` object if
there is no `User`. The legacy method needs to be updated to allow
GroupOwners with `user=None`.
Proposed changes: no live analysis - only GroupOwners created during
original analysis will be retuned.
While my intention has been to create _fewer_ but _better_ suspect
commits, with the logic in this flow meant I was actually displaying a
lot more legacy strategy suspect commits, which is not what I want.
## Changes Made
### Core Logic Changes
- **Removed legacy fallback**: `get_serialized_event_file_committers`
now only calls `_get_serialized_committers_from_group_owners`
- **Dynamic suspect commit type**: Uses `suspectCommitStrategy` from
GroupOwner context instead of hardcoding `INTEGRATION_COMMIT`
- `RELEASE_BASED` → `"via commit in release"`
- `SCM_BASED` → `"via SCM integration"`
- **Preserved API contract**: Still returns 404 when no committers found
(not empty array)
## Behavior Changes
### Before
```python
# 1. Check GroupOwners first
# 2. If no GroupOwners, fall back to release-based analysis (legacy logic)
# 3. Analyze stacktrace frames against recent release commits
# 4. Always returned "via SCM integration" regardless of actual strategy
# 5. Any number of suspect commits can be returned
```
### After
```python
# 1. Check GroupOwners only - all suspect commit strategies create GroupOwners when the Issue is first processed
# 2. If no GroupOwners, return 404 "No committers found"
# 3. Use actual commit strategy from GroupOwner context
# 4. Only 1 suspect commit can be returned
```
0 commit comments