diff options
author | Jacopo <beschi.jacopo@gmail.com> | 2017-11-14 10:02:39 +0100 |
---|---|---|
committer | Jacopo <beschi.jacopo@gmail.com> | 2017-11-16 17:58:29 +0100 |
commit | 181cd299f9e06223e8338e93b1c318c671ccb1aa (patch) | |
tree | 0d71dcf3f786496eaa46b9d65ce2626f162015da /app/models/ci | |
parent | f2997af4d5cdec3266d3178edeedc36d4e590062 (diff) | |
download | gitlab-ce-181cd299f9e06223e8338e93b1c318c671ccb1aa.tar.gz |
Adds Rubocop rule for line break after guard clause
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
Diffstat (limited to 'app/models/ci')
-rw-r--r-- | app/models/ci/build.rb | 1 | ||||
-rw-r--r-- | app/models/ci/pipeline.rb | 2 |
2 files changed, 3 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 1b2b0d17910..1d9f367183e 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -317,6 +317,7 @@ module Ci def execute_hooks return unless project + build_data = Gitlab::DataBuilder::Build.build(self) project.execute_hooks(build_data.dup, :job_hooks) project.execute_services(build_data.dup, :job_hooks) diff --git a/app/models/ci/pipeline.rb b/app/models/ci/pipeline.rb index 19814864e50..bcc865357ff 100644 --- a/app/models/ci/pipeline.rb +++ b/app/models/ci/pipeline.rb @@ -300,8 +300,10 @@ module Ci def latest? return false unless ref + commit = project.commit(ref) return false unless commit + commit.sha == sha end |