Commit graph

19 commits

Author SHA1 Message Date
GitLab Bot
e33f87ac0f Add latest changes from gitlab-org/gitlab@master 2020-04-21 15:21:10 +00:00
GitLab Bot
2fd92f2dc7 Add latest changes from gitlab-org/gitlab@master 2020-03-04 21:07:54 +00:00
GitLab Bot
1308dc5eb4 Add latest changes from gitlab-org/gitlab@master 2020-02-13 12:08:49 +00:00
GitLab Bot
be37a0ee5e Add latest changes from gitlab-org/gitlab@master 2020-01-30 09:08:55 +00:00
GitLab Bot
d5e1680713 Add latest changes from gitlab-org/gitlab@master 2019-12-14 18:07:40 +00:00
GitLab Bot
77a7772c3b Add latest changes from gitlab-org/gitlab@master 2019-10-08 09:06:09 +00:00
GitLab Bot
b7dfe2ae40 Add latest changes from gitlab-org/gitlab@master 2019-09-13 13:26:31 +00:00
Shinya Maeda
8c21610c79 Add pipeline.type key to PipelineEntity
This commit adds pipeline.type key to PipelineEntity.
This key will be used in MR widget in the next iteration.
2019-09-03 13:30:53 +07:00
Filipa Lacerda
51c35a4ab5 Fixes ref being displayed as raw HTML
The ref to the branch was being displayed as
raw HTML in the Pipelines page
2019-05-30 09:58:41 +01:00
Shinya Maeda
96b28d8387 Fix ref_text of merge request pipelines
Source branch can be removed after the merge and
we have to make sure to avoid rendering links if it's the case.
2019-04-30 10:14:19 +07:00
Shinya Maeda
aee119c0cd Update pipeline detail view to accommodate post-merge pipelines
Commit changes

Add spec

Add changelog

fix

fix

Fix

Fix spec

Finish spec

ok

nice

ok

ok

ok

fix
2019-03-19 23:19:27 +07:00
Yorick Peterse
590ff80f83
Refactor how a few ActiveRecord enums are defined
In a few models we define ActiveRecord enums that are redefined in EE
using the following pattern:

    enum :some_enum, {
      ...
    }.merge(EE_ENUM_VALUES)

This particular approach is problematic to deal with, because it
requires that we `prepend` and EE module _before_ defining the enum.
This typically translates to the `prepend` being the first line in the
model in EE, but this can easily lead to merge conflicts when developers
add more `include` and/or `prepend` lines.

As part of https://gitlab.com/gitlab-org/gitlab-ee/issues/8244 and
https://gitlab.com/gitlab-org/gitlab-ee/issues/8241 we are moving
`prepend` to the last line in a file, reducing the chances of running
into merge conflicts. This poses a bit of a problem with the pattern
above, because this pattern does not allow us to move the `prepend`
further down a file.

To resolve this problem, we simply move the Hash value of the enum to a
separate class method. This method is defined in a separate module where
necessary, allowing us to use it like so:

    enum :failure_reasons, ::SomeModelEnums.failure_reasons

The method in turn is defined in a very straightforward manner:

    module SomeModelEnums
      def self.failure_reasons
        {
          ...
        }
      end
    end

This makes it easy for EE to add values without requiring the `prepend`
to be placed before the `enum` is defined.

For more information, see the following issues and merge requests:

* https://gitlab.com/gitlab-org/gitlab-ee/issues/8244
* https://gitlab.com/gitlab-org/gitlab-ee/issues/8241
* https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/8424
2018-11-15 17:41:54 +01:00
gfyoung
d5bf57a6af Enable frozen string in presenters and policies
Enable frozen string in:

* app/presenters
* app/policies

Partially addresses #47424.
2018-07-24 13:18:25 -07:00
Kamil Trzciński
6776fac622 Respect permissions when showing Failed Jobs 2018-05-06 18:46:00 +02:00
Grzegorz Bizon
123da5fbe8 Improve specs for pipeline failure reason presenter
Conflicts:
	app/presenters/ci/pipeline_presenter.rb
2017-10-05 11:41:16 +02:00
Grzegorz Bizon
90fa4e7e54 Move part of pipeline presenter to main CE file 2017-10-05 11:35:27 +02:00
Lin Jen-Shin
057c0d7a5c Also track auto-cancelling in jobs, detail:
Not only tracking auto-cancelling in pipelines,
we'll also track this in jobs because pipelines
could be retried and the information would get lost
when this happened. Also erase auto-cancelling
relation for pipelines when they're retried.
2017-04-06 21:32:56 +08:00
Lin Jen-Shin
e258e6f147 Add test for presenters 2017-04-06 03:10:52 +08:00
Rydkin Maxim
14722b66a1 rename pipeline_presenter 2017-04-04 21:11:25 +03:00
Renamed from app/presenters/ci/pipeline_status_badge_presenter.rb (Browse further)