diff --git a/app/assets/javascripts/diffs/components/tree_list.vue b/app/assets/javascripts/diffs/components/tree_list.vue
index 96ae197d8b807bc5b0e46021d887da5a06053851..7e00b994541a612b4cc9d9da9911e24aa88390b2 100644
--- a/app/assets/javascripts/diffs/components/tree_list.vue
+++ b/app/assets/javascripts/diffs/components/tree_list.vue
@@ -13,18 +13,43 @@ export default {
Icon,
FileRow,
},
+ data() {
+ return {
+ search: '',
+ };
+ },
computed: {
...mapState('diffs', ['tree', 'renderTreeList']),
...mapGetters('diffs', ['allBlobs']),
filteredTreeList() {
- return this.renderTreeList ? this.tree : this.allBlobs;
+ const search = this.search.toLowerCase().trim();
+
+ if (search === '' || this.$options.fuzzyFileFinderEnabled)
+ return this.renderTreeList ? this.tree : this.allBlobs;
+
+ return this.allBlobs.reduce((acc, folder) => {
+ const tree = folder.tree.filter(f => f.path.toLowerCase().indexOf(search) >= 0);
+
+ if (tree.length) {
+ return acc.concat({
+ ...folder,
+ tree,
+ });
+ }
+
+ return acc;
+ }, []);
},
},
methods: {
...mapActions('diffs', ['toggleTreeOpen', 'scrollToFile', 'toggleFileFinder']),
+ clearSearch() {
+ this.search = '';
+ },
},
shortcutKeyCharacter: `${/Mac/i.test(navigator.userAgent) ? '⌘' : 'Ctrl'}+P`,
FileRowStats,
+ diffTreeFiltering: gon.features && gon.features.diffTreeFiltering,
};
@@ -33,17 +58,36 @@ export default {
@@ -79,7 +123,7 @@ export default {
pointer-events: none;
}
-.tree-list-icon {
+.tree-list-icon:not(button) {
pointer-events: none;
}
diff --git a/app/assets/javascripts/ide/index.js b/app/assets/javascripts/ide/index.js
index 5a2b680c2f715c2811a74faac0de03703b60d217..cdfebd19fa4878d944492227e2380c2966dc4d13 100644
--- a/app/assets/javascripts/ide/index.js
+++ b/app/assets/javascripts/ide/index.js
@@ -6,6 +6,7 @@ import ide from './components/ide.vue';
import store from './stores';
import router from './ide_router';
import { parseBoolean } from '../lib/utils/common_utils';
+import { resetServiceWorkersPublicPath } from '../lib/utils/webpack';
Vue.use(Translate);
@@ -60,16 +61,6 @@ export function initIde(el, options = {}) {
});
}
-// tell webpack to load assets from origin so that web workers don't break
-export function resetServiceWorkersPublicPath() {
- // __webpack_public_path__ is a global variable that can be used to adjust
- // the webpack publicPath setting at runtime.
- // see: https://webpack.js.org/guides/public-path/
- const relativeRootPath = (gon && gon.relative_url_root) || '';
- const webpackAssetPath = `${relativeRootPath}/assets/webpack/`;
- __webpack_public_path__ = webpackAssetPath; // eslint-disable-line camelcase
-}
-
/**
* Start the IDE.
*
diff --git a/app/assets/javascripts/lib/utils/webpack.js b/app/assets/javascripts/lib/utils/webpack.js
new file mode 100644
index 0000000000000000000000000000000000000000..308ad9784e44f4b3cde41ed57de4f0d85f55cb6b
--- /dev/null
+++ b/app/assets/javascripts/lib/utils/webpack.js
@@ -0,0 +1,10 @@
+// tell webpack to load assets from origin so that web workers don't break
+// eslint-disable-next-line import/prefer-default-export
+export function resetServiceWorkersPublicPath() {
+ // __webpack_public_path__ is a global variable that can be used to adjust
+ // the webpack publicPath setting at runtime.
+ // see: https://webpack.js.org/guides/public-path/
+ const relativeRootPath = (gon && gon.relative_url_root) || '';
+ const webpackAssetPath = `${relativeRootPath}/assets/webpack/`;
+ __webpack_public_path__ = webpackAssetPath; // eslint-disable-line camelcase
+}
diff --git a/app/assets/javascripts/mr_notes/index.js b/app/assets/javascripts/mr_notes/index.js
index e4d72eb8318e2a241fd2beea11e08d472ab4db45..9e99aa4f724e8fc376fd43cd2cb0ff54aa3df7fd 100644
--- a/app/assets/javascripts/mr_notes/index.js
+++ b/app/assets/javascripts/mr_notes/index.js
@@ -7,8 +7,11 @@ import discussionCounter from '../notes/components/discussion_counter.vue';
import initDiscussionFilters from '../notes/discussion_filters';
import store from './stores';
import MergeRequest from '../merge_request';
+import { resetServiceWorkersPublicPath } from '../lib/utils/webpack';
export default function initMrNotes() {
+ resetServiceWorkersPublicPath();
+
const mrShowNode = document.querySelector('.merge-request');
// eslint-disable-next-line no-new
new MergeRequest({
diff --git a/app/controllers/projects/merge_requests_controller.rb b/app/controllers/projects/merge_requests_controller.rb
index 5cf7fa3422dc31b375c04cc528100a1216bb3729..46a44841c31fbddb62defffd01530d4b1f5451d1 100644
--- a/app/controllers/projects/merge_requests_controller.rb
+++ b/app/controllers/projects/merge_requests_controller.rb
@@ -16,6 +16,10 @@ class Projects::MergeRequestsController < Projects::MergeRequests::ApplicationCo
before_action :authenticate_user!, only: [:assign_related_issues]
before_action :check_user_can_push_to_source_branch!, only: [:rebase]
+ before_action only: [:show] do
+ push_frontend_feature_flag(:diff_tree_filtering, default_enabled: true)
+ end
+
def index
@merge_requests = @issuables
diff --git a/app/views/projects/issues/_merge_requests_status.html.haml b/app/views/projects/issues/_merge_requests_status.html.haml
index 43e4c8db93f8756f1362d76c0fa6edee2d82046f..90838a752148091bdb5b7aba7459ac4bc50b6d7b 100644
--- a/app/views/projects/issues/_merge_requests_status.html.haml
+++ b/app/views/projects/issues/_merge_requests_status.html.haml
@@ -12,11 +12,14 @@
- mr_status_class = 'closed'
- else
- mr_status_date = merge_request.created_at
- - mr_status_title = _('Opened')
+ - mr_status_title = mr_status_date ? _('Opened') : _('Open')
- mr_status_icon = 'issue-open-m'
- mr_status_class = 'open'
-- mr_status_tooltip = "
#{mr_status_title} #{time_ago_in_words(mr_status_date)} ago
#{l(mr_status_date.to_time, format: time_format)}"
+- if mr_status_date
+ - mr_status_tooltip = "
#{mr_status_title} #{time_ago_in_words(mr_status_date)} ago
#{l(mr_status_date.to_time, format: time_format)}"
+- else
+ - mr_status_tooltip = "
#{mr_status_title}
"
%span.mr-status-wrapper.suggestion-help-hover{ class: css_class, data: { toggle: 'tooltip', placement: 'bottom', html: 'true', title: mr_status_tooltip } }
= sprite_icon(mr_status_icon, size: 16, css_class: "merge-request-status #{mr_status_class}")
diff --git a/doc/api/container_registry.md b/doc/api/container_registry.md
index b70854103e8d02f9b1e8a7efd070e2d57b8b39df..c77ed39e4dc6b0797e14ec19803630ccdbb084d4 100644
--- a/doc/api/container_registry.md
+++ b/doc/api/container_registry.md
@@ -1,5 +1,7 @@
# Container Registry API
+> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/55978) in GitLab 11.8.
+
This is the API docs of the [GitLab Container Registry](../user/project/container_registry.md).
## List registry repositories
@@ -42,7 +44,7 @@ Example response:
## Delete registry repository
-Get a list of repository commits in a project.
+Delete a repository in registry.
This operation is executed asynchronously and might take some time to get executed.
diff --git a/doc/topics/autodevops/index.md b/doc/topics/autodevops/index.md
index 463bdd5928251d9a0c0ead424fed9f5186bb0f00..91be3e3d45dba2a18d5bcc6c13f8df3c1b4f49cb 100644
--- a/doc/topics/autodevops/index.md
+++ b/doc/topics/autodevops/index.md
@@ -128,7 +128,7 @@ Auto Deploy, and Auto Monitoring will be silently skipped.
NOTE: **Note**
`AUTO_DEVOPS_DOMAIN` environment variable is deprecated and
-[is scheduled to be removed](https://gitlab.com/gitlab-org/gitlab-ce/issues/56959) in GitLab 12.0.
+[is scheduled to be removed](https://gitlab.com/gitlab-org/gitlab-ce/issues/56959).
The Auto DevOps base domain is required if you want to make use of [Auto
Review Apps](#auto-review-apps) and [Auto Deploy](#auto-deploy). It can be defined
@@ -211,8 +211,7 @@ other environments.
NOTE: **Note:**
From GitLab 11.8, `KUBE_INGRESS_BASE_DOMAIN` replaces `AUTO_DEVOPS_DOMAIN`.
-`AUTO_DEVOPS_DOMAIN` [is scheduled to be removed](https://gitlab.com/gitlab-org/gitlab-ce/issues/56959)
-in GitLab 12.0.
+`AUTO_DEVOPS_DOMAIN` [is scheduled to be removed](https://gitlab.com/gitlab-org/gitlab-ce/issues/56959).
## Enabling/Disabling Auto DevOps
@@ -685,7 +684,7 @@ also be customized, and you can easily use a [custom buildpack](#custom-buildpac
| **Variable** | **Description** |
| ------------ | --------------- |
-| `AUTO_DEVOPS_DOMAIN` | The [Auto DevOps domain](#auto-devops-domain). By default, set automatically by the [Auto DevOps setting](#enabling-auto-devops). This variable is deprecated and [is scheduled to be removed](https://gitlab.com/gitlab-org/gitlab-ce/issues/56959) in GitLab 12.0. Use `KUBE_INGRESS_BASE_DOMAIN` instead. |
+| `AUTO_DEVOPS_DOMAIN` | The [Auto DevOps domain](#auto-devops-domain). By default, set automatically by the [Auto DevOps setting](#enabling-auto-devops). This variable is deprecated and [is scheduled to be removed](https://gitlab.com/gitlab-org/gitlab-ce/issues/56959). Use `KUBE_INGRESS_BASE_DOMAIN` instead. |
| `AUTO_DEVOPS_CHART` | The Helm Chart used to deploy your apps; defaults to the one [provided by GitLab](https://gitlab.com/charts/auto-deploy-app). |
| `AUTO_DEVOPS_CHART_REPOSITORY` | The Helm Chart repository used to search for charts; defaults to `https://charts.gitlab.io`. |
| `REPLICAS` | The number of replicas to deploy; defaults to 1. |
diff --git a/locale/gitlab.pot b/locale/gitlab.pot
index a3f78968a55a255ab644c9e86a9dee0e12d8c1e3..c3349980d60282e574b326dcd833e3e00b00e2be 100644
--- a/locale/gitlab.pot
+++ b/locale/gitlab.pot
@@ -4581,6 +4581,9 @@ msgstr ""
msgid "MergeRequest| %{paragraphStart}changed the description %{descriptionChangedTimes} times %{timeDifferenceMinutes}%{paragraphEnd}"
msgstr ""
+msgid "MergeRequest|Filter files"
+msgstr ""
+
msgid "MergeRequest|No files found"
msgstr ""
diff --git a/qa/qa/page/project/new.rb b/qa/qa/page/project/new.rb
index a588af07e4a8c077f5d887af3d90ab845b32a220..9f1867ef8a5eabbfe06576f016236f49091d211f 100644
--- a/qa/qa/page/project/new.rb
+++ b/qa/qa/page/project/new.rb
@@ -26,7 +26,7 @@ module QA
def choose_test_namespace
click_element :project_namespace_select
- select_item(Runtime::Namespace.path)
+ search_and_select(Runtime::Namespace.path)
end
def go_to_import_project
diff --git a/spec/views/projects/issues/_merge_requests_status.html.haml_spec.rb b/spec/views/projects/issues/_merge_requests_status.html.haml_spec.rb
new file mode 100644
index 0000000000000000000000000000000000000000..02c225292ce00e070df9c3bb4260672c2c8956f2
--- /dev/null
+++ b/spec/views/projects/issues/_merge_requests_status.html.haml_spec.rb
@@ -0,0 +1,22 @@
+# frozen_string_literal: true
+require 'spec_helper'
+
+describe 'projects/issues/_merge_requests_status.html.haml' do
+ it 'shows date of status change in tooltip' do
+ merge_request = create(:merge_request, created_at: 1.month.ago)
+
+ render partial: 'projects/issues/merge_requests_status',
+ locals: { merge_request: merge_request, css_class: '' }
+
+ expect(rendered).to match("Opened.*about 1 month ago")
+ end
+
+ it 'shows only status in tooltip if date is not set' do
+ merge_request = create(:merge_request, state: :closed)
+
+ render partial: 'projects/issues/merge_requests_status',
+ locals: { merge_request: merge_request, css_class: '' }
+
+ expect(rendered).to match("Closed")
+ end
+end