diff options
Diffstat (limited to 'app/models')
-rw-r--r-- | app/models/project/hooks_trait.rb | 3 | ||||
-rw-r--r-- | app/models/project/repository_trait.rb | 4 |
2 files changed, 7 insertions, 0 deletions
diff --git a/app/models/project/hooks_trait.rb b/app/models/project/hooks_trait.rb index f642ac978f3..2f97eb6c379 100644 --- a/app/models/project/hooks_trait.rb +++ b/app/models/project/hooks_trait.rb @@ -101,6 +101,9 @@ module Project::HooksTrait # Execute web hooks self.execute_web_hooks(oldrev, newrev, ref, user) + + # Create satellite + self.satellite.create unless self.satellite.exists? end end end diff --git a/app/models/project/repository_trait.rb b/app/models/project/repository_trait.rb index 2cd8159ad81..d8bdbf2403b 100644 --- a/app/models/project/repository_trait.rb +++ b/app/models/project/repository_trait.rb @@ -37,6 +37,10 @@ module Project::RepositoryTrait end end + def satellite + @satellite ||= Gitlabhq::Satellite.new(self) + end + def write_hook(name, content) hook_file = File.join(path_to_repo, 'hooks', name) |