mirror of
https://gitlab.com/gitlab-org/gitlab-foss.git
synced 2025-07-21 23:43:41 +00:00
Differentiate the expire from leave event
At the moment we cannot see weather a user left a project due to their membership expiring of if they themselves opted to leave the project. This adds a new event type that allows us to make this differentiation. Note that is not really feasable to go back and reliably fix up the previous events. As a result the events for previous expire removals will remain the same however events of this nature going forward will be correctly represented.
This commit is contained in:
@ -45,9 +45,16 @@ class EventFilter
|
||||
when EventFilter.comments
|
||||
actions = [Event::COMMENTED]
|
||||
when EventFilter.team
|
||||
actions = [Event::JOINED, Event::LEFT]
|
||||
actions = [Event::JOINED, Event::LEFT, Event::EXPIRED]
|
||||
when EventFilter.all
|
||||
actions = [Event::PUSHED, Event::MERGED, Event::COMMENTED, Event::JOINED, Event::LEFT]
|
||||
actions = [
|
||||
Event::PUSHED,
|
||||
Event::MERGED,
|
||||
Event::COMMENTED,
|
||||
Event::JOINED,
|
||||
Event::LEFT,
|
||||
Event::EXPIRED
|
||||
]
|
||||
end
|
||||
|
||||
events.where(action: actions)
|
||||
|
Reference in New Issue
Block a user