This is a problematic state, cause when we start reacting to Anitya, we can receive multiple versions (not just the latest one as for the Rawhide) from which we then choose one based on to-be implemented rules or version mask defined by the user.
Move this functionality out of the event, as the tight-coupling of event × DB entry doesn't make sense in this case.
Be careful about the consequences of this action, i.e., database being populated by calling the _add_* on the events.
[!NOTE]
Alternative approach could be populating the tag name in DB with a dummy value that would be overwritten in the handler in later stages, instead of creating the database entry later by the handler.
Part of #2106
Currently we generate a database entry from the event: https://github.com/packit/packit-service/blob/ca15dc13fde8d5b644c8de5b3c87ef176054066a/packit_service/worker/events/new_hotness.py#L77-L83
This is a problematic state, cause when we start reacting to Anitya, we can receive multiple versions (not just the latest one as for the Rawhide) from which we then choose one based on to-be implemented rules or version mask defined by the user.
Move this functionality out of the event, as the tight-coupling of
event × DB entry
doesn't make sense in this case.Be careful about the consequences of this action, i.e., database being populated by calling the
_add_*
on the events.