diff options
-rw-r--r-- | CHANGELOG | 2 | ||||
-rw-r--r-- | app/helpers/commits_helper.rb | 2 | ||||
-rw-r--r-- | app/models/commit.rb | 4 | ||||
-rw-r--r-- | spec/services/create_commit_service_spec.rb | 1 |
4 files changed, 9 insertions, 0 deletions
@@ -8,6 +8,8 @@ v7.14.0 (unreleased) - Refactor GitLab API usage to use either access_token or private_token depending on what was specified during login - Allow to use access_token for API requests + - Added support for CI skipped status + v7.13.1 - Fix: user could steal specific runner - Fix: don't send notifications for jobs with allow_failure set diff --git a/app/helpers/commits_helper.rb b/app/helpers/commits_helper.rb index c212e8b..23adade 100644 --- a/app/helpers/commits_helper.rb +++ b/app/helpers/commits_helper.rb @@ -7,6 +7,8 @@ module CommitsHelper 'alert-success' when 'failed', 'canceled' 'alert-danger' + when 'skipped' + 'alert-disabled' else 'alert-warning' end diff --git a/app/models/commit.rb b/app/models/commit.rb index eea3653..af03253 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -161,6 +161,10 @@ class Commit < ActiveRecord::Base end def status + if skip_ci? + return 'skipped' + end + if yaml_errors.present? return 'failed' end diff --git a/spec/services/create_commit_service_spec.rb b/spec/services/create_commit_service_spec.rb index c8bb6bd..19ef959 100644 --- a/spec/services/create_commit_service_spec.rb +++ b/spec/services/create_commit_service_spec.rb @@ -60,6 +60,7 @@ describe CreateCommitService do ci_yaml_file: gitlab_ci_yaml ) commit.builds.any?.should be_false + commit.status.should_be "skipped" end it "does not skips builds creation if there is no [ci skip] tag in commit message" do |