diff options
author | Grzegorz Bizon <grzegorz.bizon@ntsn.pl> | 2015-12-14 11:28:49 +0100 |
---|---|---|
committer | Grzegorz Bizon <grzegorz.bizon@ntsn.pl> | 2015-12-14 11:28:49 +0100 |
commit | b8f67c5e4735eb25a3d03daeb95900dc87692123 (patch) | |
tree | ef00cb4394ca45563636fd49b5a9378f117e9d49 /app/models/ci/commit.rb | |
parent | 2dafec91dd542ac641fea4750bf8fd68211a58af (diff) | |
download | gitlab-ce-b8f67c5e4735eb25a3d03daeb95900dc87692123.tar.gz |
Do not display ci build status if builds enabled but no `.gitlab-ci.yml`
Ref #3827
Diffstat (limited to 'app/models/ci/commit.rb')
-rw-r--r-- | app/models/ci/commit.rb | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/app/models/ci/commit.rb b/app/models/ci/commit.rb index 75465685e98..fca18ba79be 100644 --- a/app/models/ci/commit.rb +++ b/app/models/ci/commit.rb @@ -220,6 +220,16 @@ module Ci update!(committed_at: DateTime.now) end + ## + # This method checks if build status should be displayed. + # + # Build status should be available only if builds are enabled + # on project level and `.gitlab-ci.yml` file is present. + # + def show_build_status? + gl_project.builds_enabled? && ci_yaml_file + end + private def save_yaml_error(error) |