diff options
| author | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-11 18:37:50 +0200 |
|---|---|---|
| committer | Kamil Trzcinski <ayufan@ayufan.eu> | 2016-08-11 18:37:50 +0200 |
| commit | e2c01f397f2f00138d2b4e618306ee2aa141c97c (patch) | |
| tree | 681d240bac9153091d1c66349f7f7143b23016bc /app/models | |
| parent | 478990bb3ee0aa6939b656763a97d637189f062d (diff) | |
| download | gitlab-ce-e2c01f397f2f00138d2b4e618306ee2aa141c97c.tar.gz | |
Fix tests for pipeline events
Diffstat (limited to 'app/models')
| -rw-r--r-- | app/models/ci/pipeline.rb | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index bf8750ca0f6..f8c0e27a5c3 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -208,8 +208,10 @@ module Ci self.started_at = statuses.started_at self.finished_at = statuses.finished_at self.duration = statuses.latest.duration + + should_execute_hooks = status_changed? save - execute_hooks if status_changed? + execute_hooks if should_execute_hooks end private |
