mirror of
https://0xacab.org/sutty/sutty
synced 2024-11-25 03:56:22 +00:00
18 lines
391 B
Ruby
18 lines
391 B
Ruby
# frozen_string_literal: true
|
|
|
|
# Permite traer los cambios desde webhooks
|
|
|
|
class GitPullJob < ApplicationJob
|
|
# @param :site [Site]
|
|
# @param :usuarie [Usuarie]
|
|
# @return [nil]
|
|
def perform(site, usuarie)
|
|
@site = site
|
|
|
|
return unless site.repository.origin
|
|
return unless site.repository.fetch.positive?
|
|
|
|
site.repository.merge(usuarie)
|
|
site.reindex_changes!
|
|
end
|
|
end
|