diff options
author | Jacopo <beschi.jacopo@gmail.com> | 2017-11-14 12:02:39 +0300 |
---|---|---|
committer | Jacopo <beschi.jacopo@gmail.com> | 2017-11-16 19:58:29 +0300 |
commit | 181cd299f9e06223e8338e93b1c318c671ccb1aa (patch) | |
tree | 0d71dcf3f786496eaa46b9d65ce2626f162015da /app/workers | |
parent | f2997af4d5cdec3266d3178edeedc36d4e590062 (diff) |
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/workers')
-rw-r--r-- | app/workers/irker_worker.rb | 1 | ||||
-rw-r--r-- | app/workers/stuck_ci_jobs_worker.rb | 1 |
2 files changed, 2 insertions, 0 deletions
diff --git a/app/workers/irker_worker.rb b/app/workers/irker_worker.rb index 3dd14466994..311fc187e49 100644 --- a/app/workers/irker_worker.rb +++ b/app/workers/irker_worker.rb @@ -104,6 +104,7 @@ class IrkerWorker parents = commit.parents # Return old value if there's no new one return push_data['before'] if parents.empty? + # Or return the first parent-commit parents[0].id end diff --git a/app/workers/stuck_ci_jobs_worker.rb b/app/workers/stuck_ci_jobs_worker.rb index 269776a1f62..fdbc049c2df 100644 --- a/app/workers/stuck_ci_jobs_worker.rb +++ b/app/workers/stuck_ci_jobs_worker.rb @@ -39,6 +39,7 @@ class StuckCiJobsWorker def drop_stuck(status, timeout) search(status, timeout) do |build| return unless build.stuck? + drop_build :stuck, build, status, timeout end end |