Commit Graph

143 Commits

Author SHA1 Message Date
Jan Provaznik aa34c693e9 Merge branch 'clusterable_cluster_environments_path' into 'master'
Add #environments_cluster_path which will always return nil in CE

See merge request gitlab-org/gitlab-ce!32527
2019-09-03 11:26:23 +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
Thong Kuah 1894c6ebe8 Add facade which will always return nil in CE
This method will be overridden in EE
2019-09-03 11:29:57 +12:00
Patrick Bajao bf230da05d Support selective highlighting of lines
Instead of highlighting all lines when not all of them
are needed, only highlight from the beginning up to
the specified limit.

The `BlobPresenter#highlight` method has been updated
to support `to` param. This param will be used to limit
the content to be highlighted.
2019-09-02 11:44:45 +08:00
Peter Leitzen 6767326267 Use ActiveModel's type instead of virtus
The virtus project has been discontinued:

https://github.com/solnic/virtus/commit/a6f896984
2019-08-20 10:52:21 +00:00
Samantha Ming fc0ff7cf03 Replace ... with new expansion options
- expand upwards
- expand downwards
- expand all

in both inline and parallel views
2019-08-10 02:36:32 +00:00
Patrick Bajao 6d318af5f9 Revert "Merge branch '65152-selective-highlight' into 'master'"
This reverts merge request !31361
2019-08-09 00:13:09 +00:00
Bob Van Landuyt d61dab9147 Merge branch '65152-selective-highlight' into 'master'
Support selective highlighting of lines

See merge request gitlab-org/gitlab-ce!31361
2019-08-06 16:42:14 +00:00
Patrick Bajao 46631e1023 Support selective highlighting of lines
Instead of highlighting all lines when not all of them are
needed, only highlight specific lines.

The `BlobPresenter#highlight` method has been updated to
support `since` and `to` params. These params will be used to
limit the content to be highlighted.

Modify `Gitlab::Highlight` to support `since` param which will
then be used to determine the starting line number.
2019-08-06 09:32:29 +08:00
Nick Thomas d3a3db4218 Speed up loading and filtering deploy keys and their projects
This commit changes how we eager-load projects, routes, and namespaces
required by the deploy keys endpoint, getting a 10x improvement in my
local testing.

The endpoint still doesn't scale in-general, but going from ~13 seconds
to dump a 63K result to generating the same thing in ~1.6 seconds seems
like a good improvement to me.
2019-08-05 06:42:34 -07:00
Heinrich Lee Yu 1ce5bcacdb Remove code related to object hierarchy in MySQL
These are not required because MySQL is not
supported anymore
2019-07-25 15:35:06 +08:00
Patrick Bajao 866bef8059 Fix suggestion on lines that are not part of an MR
Return the `text` as plain string in the response instead of
including HTML tags but keep `rich_text` as is.

The fix is to modify `Blob::UnfoldPresenter#diff_files` to map
each raw diff line (limited by the range specified) to a
corresponding line in an array of highlighted lines to use as
`rich_text`.
2019-07-22 13:25:24 +08:00
Luke Duncalfe 4b9b2a43d0 GraphQL mutations for add, remove and toggle emoji
Adding new `AddAwardEmoji`, `RemoveAwardEmoji` and `ToggleAwardEmoji`
GraphQL mutations.

Adding new `#authorized_find_with_pre_checks!` and (unused, but for
completeness `#authorized_find_with_post_checks!`) authorization
methods. These allow us to perform an authorized find, and run our own
additional checks before or after the authorization runs.

https://gitlab.com/gitlab-org/gitlab-ce/issues/62826
2019-06-28 12:03:33 +12:00
Fabio Pitino 3ac527b488 Expose ci_default_git_depth via project API
Enable Get and Update of ci_default_git_depth for
Project API.

Renaming Project#default_git_depth to :ci_default_git_depth
to give more context through the API usage.

Add API documentation
2019-06-12 09:51:45 +01:00
Fabio Pitino 3df74a4036 Move project default git depth behind feature flags 2019-06-10 17:40:19 +00:00
Krasimir Angelov ad9ae16d8a Add project level git depth setting
Introduce default_git_depth in project's CI/CD settings and set it to
50. Use it if there is no GIT_DEPTH variable specified. Apply this
default only to newly created projects and keep it nil for old ones
in order to not break pipelines that rely on non-shallow clones.

default_git_depth can be updated from CI/CD Settings in the UI, must be
either nil or integer between 0 and 1000 (incl).

Inherit default_git_depth from the origin project when forking projects.

MR pipelines are run on a MR ref (refs/merge-requests/:iid/merge) and it
contains unique commit (i.e. merge commit) which doesn't exist in the
other branch/tags refs. We need to add it cause otherwise it may break
pipelines for old projects that have already enabled Pipelines for merge
results and have git depth 0.

Document new default_git_depth project CI/CD setting
2019-06-06 09:21:18 +01:00
Nick Thomas 327c7d5a07 Merge branch 'graphql-file-entry-url' into 'master'
Add web_url to tree entry in GraphQL API

See merge request gitlab-org/gitlab-ce!28646
2019-06-05 15:44:53 +00:00
Kamil Trzciński 765917dc08 Merge branch 'revert-git-depth-for-merge-request' into 'master'
Revert a default GIT_DEPTH for MR pipeline

See merge request gitlab-org/gitlab-ce!28926
2019-06-05 08:40:19 +00:00
Phil Hughes 4644a2daf5
Add web_url to tree entry in GraphQL API 2019-06-05 08:46:32 +01:00
Kamil Trzciński a7fd826a53 Merge branch 'abstract-auto-merge' into 'master'
Refactor and abstract Auto Merge Processes

See merge request gitlab-org/gitlab-ce!28595
2019-06-03 11:24:59 +00:00
Shinya Maeda d4b4693663 Abstract auto merge processes
We have one auto merge strategy today - Merge When Pipeline
Succeeds.

In order to add more strategies for Merge Train feature,
we abstract the architecture to be more extensible.

Removed arguments

Fix spec
2019-06-03 13:15:29 +07:00
Brett Walker 1285b00517 Added common fields to the IssueType
and allow passing of child_complexity to the
'resolver_complexity' metho
2019-05-31 13:19:29 -05:00
Fabio Pitino dbd6223211 Revert a default GIT_DEPTH for MR pipeline 2019-05-31 14:55:49 +01:00
Jan Provaznik 4df0e2599b Fix display of promote to group label
Since label presenter is used in label index view, label class
check doesn't work as expected because the class is now LabelPresenter.

Also `label.subject` doesn't work as expected now because Label's model
`subject` method is shadowed by Gitlab's presenter's method which uses
`subject` for referencing the original object.

Instead we use a presenter's method for both checks now.

`label_deletion_confirm_text` is not used anywhere so it's removed
2019-05-28 10:05:20 +00:00
Jacques Erasmus 3c913df28e Add changelog entry
Added a changelog entry for the feature
2019-05-27 08:23:17 +00:00
Dmitriy Zaporozhets 70decdc2ac
Fix specs to match route changes
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2019-05-20 15:21:37 +03:00
James Fargher f07d445b0c Remove duplicate clusterable presenter method 2019-05-07 08:49:27 +12:00
James Fargher 733da6d6a0 Instance level kubernetes clusters admin
Instance level clusters were already mostly supported, this change adds
admin area controllers for cluster CRUD
2019-05-07 08:37:03 +12:00
Peter Leitzen c8a530a319 Show health graphs on group-level
Tweak cluster helper and refactor its specs.
2019-05-06 16:24:14 +00: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
Jan Provaznik 8ce4b6093a Move scoped_label into label presenter
When rendering a label we want to check 'scoped_label' feature
availability on a project/group where label is being used. For
this reason a label presenter is used in UI and information about
context project/group is passed to this presenter.
2019-04-23 19:58:20 +00:00
Illya Klymov 6ea92ef1a0 Improvements to Project overview UI 2019-04-19 13:02:35 +00:00
George Tsiolis 579fa8b8ec Rename CI related selectors 2019-04-16 12:57:07 +03:00
Thong Kuah 4ec16912b8 Autocorrect with RSpec/ExampleWording cop
- rewords examples starting with 'should'
- rewords examples starting with 'it'

Note: I had to manually fixup "onlies" to "only"
2019-04-05 08:43:27 +00:00
Grzegorz Bizon 9fe8106e34 Add pipeline bridge presenter 2019-04-03 12:25:25 +02:00
Mayra Cabrera ab06d1eda2 Renames Cluster#managed? to provided_by_user?
This will allow to user the term managed? on
https://gitlab.com/gitlab-org/gitlab-ce/issues/56557. Managed? will be
used to distinct clusters that are automatically managed by GitLab
2019-03-29 18:23:18 +00:00
Shinya Maeda bf639fd504 Create detached merge request pipelines
By using `refs/merge-requests/:iid/head`

ok

ok

Improve naming nicely

Add nice tests

add nice tests

fix some more

revert
2019-03-29 13:58:45 +07:00
Sean McGivern 1c0588e717 Resolve CE/EE differences in MergeRequestPresenter spec 2019-03-25 12:47:46 +00: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
Grzegorz Bizon 5cea1e8b80 Merge branch '56937-edit-knative-domain' into 'master'
Edit Knative domain after it has been deployed

Closes #56937

See merge request gitlab-org/gitlab-ce!25386
2019-03-07 12:43:34 +00:00
Douwe Maan 6cfa5ee536 Merge branch 'expand-diff-to-full-file' into 'master'
Expand diff to entire file

Closes #19054

See merge request gitlab-org/gitlab-ce!24406
2019-03-07 11:33:15 +00:00
Mark Chao cea59dbe03 Move diff_line preparation into presenter
Update spec
2019-03-07 16:12:36 +08:00
Shinya Maeda 50776d2d29 Expose merge request entity for pipelines
Add preload

Fix

ok

Write tests

test only postgresql

ok

add more test
;

Improve wording

Add changelog

Fix
2019-03-06 16:30:35 +07:00
Mark Chao 90527b9f84 Add full option for blob diff action
Returns all diff lines for frontend if full is true.
Turn UnfoldForm into presenter, and move controller logic to presenter.
2019-03-06 15:50:55 +08:00
João Cunha 1186a6fd54 Sends update route to the client
- extends presenters to include update endpoint path
- sends path to the client on clusters clusters show view.
2019-03-05 08:32:51 +02:00
Shinya Maeda 7ba89e4ac4 Expose refspec and depth to runner
fix

fix and fix

Allow full ref specification for pipeline creation

Add spec

Support backward compatibility

Use ref path

Runner feature flag

Simplify the things

Support fork workflow (Public only)

Expose ref spec

Use refspec

Glooming

Decouple unrelated changes

Add changelog

Revert unrelated file

Decouple unnecessary

Add spec

Use refspecs

Fix changelog

Simplify

Fix coding offence

Fix

a

ok

ok

ok

ok

ok

a

a

Fix

Add workaround for ignore_column

Fix git depth

Fix coding offence

Fix spec

Simplify more

Do not set ignored column

Fix tests

Fix pipeline

Fix spec

fix fixture yes

Revert nonsense

fix

Revert more

ok

Decouple mr pipelines

fix spev

Remove unrelated changes
2019-02-25 13:40:15 +09:00
Stan Hu 82b6e5378a Send project name with Gitaly repository requests
When hashed storage is in use, it's helpful to have the project
name associated with the request.

Closes https://gitlab.com/gitlab-org/gitaly/issues/1394
2019-02-05 21:33:09 -08:00
Kamil Trzciński d4c7214799
[master] Pipelines section is available to unauthorized users 2019-01-31 16:52:50 +01:00
Grzegorz Bizon 47d3002218
Fix subject in trigger presenter tests 2019-01-31 16:51:18 +01:00
Grzegorz Bizon 9de03c616f
Add some specs for trigger presenter 2019-01-31 16:51:17 +01:00