diff options
author | 🙈 jacopo beschi 🙉 <intrip@gmail.com> | 2018-09-05 16:07:02 +0300 |
---|---|---|
committer | Douwe Maan <douwe@gitlab.com> | 2018-09-05 16:07:02 +0300 |
commit | 20bd1e6b34417a2b9f688071e2891a64d1653770 (patch) | |
tree | 88c9bb554659f57e4ffb23d657aa69d6ceea534e /lib/api/entities.rb | |
parent | cff47b2045999ba5ab1af7cf8c0aa45b2c52fb36 (diff) |
Resolve "Return how many commits the source branch is behind the target branch through the API"
Diffstat (limited to 'lib/api/entities.rb')
-rw-r--r-- | lib/api/entities.rb | 2 |
1 files changed, 2 insertions, 0 deletions
diff --git a/lib/api/entities.rb b/lib/api/entities.rb index 624eda3f5dd..e63f11d721e 100644 --- a/lib/api/entities.rb +++ b/lib/api/entities.rb @@ -687,6 +687,8 @@ module API expose :diff_refs, using: Entities::DiffRefs + expose :diverged_commits_count, as: :diverged_commits_count, if: -> (_, options) { options[:include_diverged_commits_count] } + def build_available?(options) options[:project]&.feature_available?(:builds, options[:current_user]) end |