class GitTagEventProcessor implements GitEventProcessor {

    @Override
    public void processEvent(final GitEvent event) {
        if (!validateEvent(event)) {
            return;
        }
        log.debug("Processing event: {}", event);

        fetchPipeline(event, apiClient).ifPresent(pipeline -> {
            final GitEventData eventData = GitEventData.builder()
                    .gitEventType(supportedEventType())
                    .version(fetchVersion(event))
                    .build();
            final PipelineEvent pipelineEvent;
            try {
                pipelineEvent = PipelineEvent.builder()
                        .objectType(PipelineEvent.ObjectType.PIPELINE_CODE)
                        .eventType(fetchPipelineEventType(event))
                        .createdDate(LocalDateTime.now())
                        .objectId(pipeline.getId())
                        .data(objectMapper.writeValueAsString(eventData))
                        .build();
                eventDao.createPipelineEvent(pipelineEvent);
            } catch (JsonProcessingException e) {
                log.error(e.getMessage(), e);
            }
        });
    }

}