From ec003d9eb338f9172696f5540637e759a93f9fcf Mon Sep 17 00:00:00 2001
From: Lin Jen-Shin <godfat@godfat.org>
Date: Mon, 19 Dec 2016 19:14:21 +0800
Subject: [PATCH] Prefer unless over if not

Feedback:
https://gitlab.com/gitlab-org/gitlab-ce/builds/7606797
---
 lib/ci/api/helpers.rb | 2 +-
 1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/lib/ci/api/helpers.rb b/lib/ci/api/helpers.rb
index 51b05aa0cb6..62c10c3b753 100644
--- a/lib/ci/api/helpers.rb
+++ b/lib/ci/api/helpers.rb
@@ -15,7 +15,7 @@ module Ci
 
       def authenticate_build!(build)
         not_found! unless build
-        forbidden! if !build_token_valid?(build)
+        forbidden! unless build_token_valid?(build)
         validate_build!(build)
       end
 
-- 
GitLab