2023-07-20 17:58:21 +00:00
|
|
|
# frozen_string_literal: true
|
|
|
|
|
2023-07-31 17:18:07 +00:00
|
|
|
# Permite traer los cambios desde webhooks
|
|
|
|
|
2023-07-20 17:58:21 +00:00
|
|
|
class GitPullJob < ApplicationJob
|
|
|
|
# @param :site [Site]
|
2023-07-21 20:12:26 +00:00
|
|
|
# @param :usuarie [Usuarie]
|
2023-07-27 20:02:48 +00:00
|
|
|
# @param :message [String]
|
2023-07-20 17:58:21 +00:00
|
|
|
# @return [nil]
|
2023-07-27 19:46:32 +00:00
|
|
|
def perform(site, usuarie, message)
|
|
|
|
site.repository.merge(usuarie, message) if site.repository.fetch&.positive?
|
2023-07-20 17:58:21 +00:00
|
|
|
end
|
2023-07-21 20:12:26 +00:00
|
|
|
end
|