summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorKamil Trzcinski <ayufan@ayufan.eu>2016-12-08 10:40:56 +0100
committerGrzegorz Bizon <grzesiek.bizon@gmail.com>2016-12-12 12:59:01 +0100
commit516dc7a5be3624f1866fa46f19f6472e2f9fae22 (patch)
treee00fc4a90befc0488a8a9fea828b334009ef88c2 /app
parent633e64382d30674fecb1aaf138d18c73827c9a40 (diff)
downloadgitlab-ce-516dc7a5be3624f1866fa46f19f6472e2f9fae22.tar.gz
Improve actions
Diffstat (limited to 'app')
-rw-r--r--app/models/ci/build.rb4
1 files changed, 4 insertions, 0 deletions
diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb
index 0f4c498c266..73564dd2aa0 100644
--- a/app/models/ci/build.rb
+++ b/app/models/ci/build.rb
@@ -127,6 +127,10 @@ module Ci
end
end
+ def cancelable?
+ active?
+ end
+
def retryable?
project.builds_enabled? && commands.present? && complete?
end