diff options
-rw-r--r-- | app/models/diff_line.rb | 3 | ||||
-rw-r--r-- | app/models/note.rb | 12 | ||||
-rw-r--r-- | doc/ci/quick_start/README.md | 49 |
3 files changed, 40 insertions, 24 deletions
diff --git a/app/models/diff_line.rb b/app/models/diff_line.rb deleted file mode 100644 index ad37945874a..00000000000 --- a/app/models/diff_line.rb +++ /dev/null @@ -1,3 +0,0 @@ -class DiffLine - attr_accessor :type, :content, :num, :code -end diff --git a/app/models/note.rb b/app/models/note.rb index b8a5254f3cf..3b20d5d22b6 100644 --- a/app/models/note.rb +++ b/app/models/note.rb @@ -88,7 +88,7 @@ class Note < ActiveRecord::Base next if discussion_ids.include?(note.discussion_id) # don't group notes for the main target - if !note.for_diff_line? && note.noteable_type == "MergeRequest" + if !note.for_diff_line? && note.for_merge_request? discussions << [note] else discussions << notes.select do |other_note| @@ -314,10 +314,6 @@ class Note < ActiveRecord::Base nil end - def noteable_type_name - noteable_type.downcase if noteable_type.present? - end - # FIXME: Hack for polymorphic associations with STI # For more information visit http://api.rubyonrails.org/classes/ActiveRecord/Associations/ClassMethods.html#label-Polymorphic+Associations def noteable_type=(noteable_type) @@ -337,10 +333,6 @@ class Note < ActiveRecord::Base Event.reset_event_cache_for(self) end - def system? - read_attribute(:system) - end - def downvote? is_award && note == "thumbsdown" end @@ -374,7 +366,7 @@ class Note < ActiveRecord::Base private def awards_supported? - (noteable.kind_of?(Issue) || noteable.is_a?(MergeRequest)) && !for_diff_line? + (for_issue? || for_merge_request?) && !for_diff_line? end def contains_emoji_only? diff --git a/doc/ci/quick_start/README.md b/doc/ci/quick_start/README.md index 5af7be5581e..624d9899c79 100644 --- a/doc/ci/quick_start/README.md +++ b/doc/ci/quick_start/README.md @@ -1,25 +1,47 @@ # Quick Start -Starting from version 8.0, GitLab Continuous Integration (CI) is fully -integrated into GitLab itself and is enabled by default on all projects. +>**Note:** Starting from version 8.0, GitLab [Continuous Integration][ci] (CI) +is fully integrated into GitLab itself and is [enabled] by default on all +projects. -This guide assumes that you: +The TL;DR version of how GitLab CI works is the following. -- have a working GitLab instance of version 8.0 or higher or are using - [GitLab.com](https://gitlab.com/users/sign_in) -- have a project in GitLab that you would like to use CI for +--- + +GitLab offers a [continuous integration][ci] service. If you +[add a `.gitlab-ci.yml` file][yaml] to the root directory of your repository, +and configure your GitLab project to use a [Runner], then each merge request or +push triggers a build. + +The `.gitlab-ci.yml` file tells the GitLab runner what do to. By default it +runs three [stages]: `build`, `test`, and `deploy`. + +If everything runs OK (no non-zero return values), you'll get a nice green +checkmark associated with the pushed commit or merge request. This makes it +easy to see whether a merge request will cause any of the tests to fail before +you even look at the code. + +Most projects only use GitLab's CI service to run the test suite so that +developers get immediate feedback if they broke something. -In brief, the steps needed to have a working CI can be summed up to: +So in brief, the steps needed to have a working CI can be summed up to: -1. Create a new project -1. Add `.gitlab-ci.yml` to the git repository and push to GitLab +1. Add `.gitlab-ci.yml` to the root directory of your repository 1. Configure a Runner -From there on, on every push to your git repository the build will be +From there on, on every push to your Git repository, the build will be automagically started by the Runner and will appear under the project's `/builds` page. -Now, let's break it down to pieces and work on solving the GitLab CI puzzle. +--- + +This guide assumes that you: + +- have a working GitLab instance of version 8.0 or higher or are using + [GitLab.com](https://gitlab.com/users/sign_in) +- have a project in GitLab that you would like to use CI for + +Let's break it down to pieces and work on solving the GitLab CI puzzle. ## Creating a `.gitlab-ci.yml` file @@ -218,3 +240,8 @@ Visit our various languages examples at <https://gitlab.com/groups/gitlab-exampl [runner-install]: https://gitlab.com/gitlab-org/gitlab-ci-multi-runner/tree/master#installation [blog-ci]: https://about.gitlab.com/2015/05/06/why-were-replacing-gitlab-ci-jobs-with-gitlab-ci-dot-yml/ [examples]: ../examples/README.md +[ci]: https://about.gitlab.com/gitlab-ci/ +[yaml]: ../yaml/README.md +[runner]: ../runners/README.md +[enabled]: ../enable_or_disable_ci.md +[stages]: ../yaml/README.md#stages |