diff options
author | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 09:08:10 +0000 |
---|---|---|
committer | GitLab Bot <gitlab-bot@gitlab.com> | 2019-12-16 09:08:10 +0000 |
commit | 13867d66e92c2fd8962a126db4fbdc32891343c9 (patch) | |
tree | 580a1baf1cdd3283ede126ee510ecf1d3562a471 | |
parent | 83758a4e5fcfec056b36a4b56fb22c8a915753cc (diff) | |
download | gitlab-ce-13867d66e92c2fd8962a126db4fbdc32891343c9.tar.gz |
Add latest changes from gitlab-org/gitlab@masterogolowinski-master-patch-27476
39 files changed, 312 insertions, 214 deletions
diff --git a/.haml-lint_todo.yml b/.haml-lint_todo.yml index 232a87c1981..2e1b1770f99 100644 --- a/.haml-lint_todo.yml +++ b/.haml-lint_todo.yml @@ -411,6 +411,7 @@ linters: - 'app/views/shared/snippets/_snippet.html.haml' - 'app/views/shared/tokens/_scopes_list.html.haml' - 'app/views/shared/web_hooks/_form.html.haml' + - 'app/views/shared/web_hooks/_hook.html.haml' - 'app/views/shared/web_hooks/_test_button.html.haml' - 'app/views/u2f/_authenticate.html.haml' - 'app/views/u2f/_register.html.haml' @@ -442,7 +443,7 @@ linters: - 'ee/app/views/groups/epics/_epic.html.haml' - 'ee/app/views/groups/group_members/_ldap_sync.html.haml' - 'ee/app/views/groups/group_members/_sync_button.html.haml' - - 'ee/app/views/groups/hooks/_project_hook.html.haml' + - 'ee/app/views/groups/hooks/edit.html.haml' - 'ee/app/views/groups/hooks/index.html.haml' - 'ee/app/views/groups/ldap_group_links/index.html.haml' - 'ee/app/views/groups/pipeline_quota/index.html.haml' @@ -54,7 +54,7 @@ gem 'gssapi', group: :kerberos # Spam and anti-bot protection gem 'recaptcha', '~> 4.11', require: 'recaptcha/rails' -gem 'akismet', '~> 2.0' +gem 'akismet', '~> 3.0' gem 'invisible_captcha', '~> 0.12.1' # Two-factor authentication diff --git a/Gemfile.lock b/Gemfile.lock index 9913d2d1df9..6cb2daa25be 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -58,7 +58,7 @@ GEM addressable (2.5.2) public_suffix (>= 2.0.2, < 4.0) aes_key_wrap (1.0.1) - akismet (2.0.0) + akismet (3.0.0) apollo_upload_server (2.0.0.beta.3) graphql (>= 1.8) rails (>= 4.2) @@ -1120,7 +1120,7 @@ DEPENDENCIES activerecord-explain-analyze (~> 0.1) acts-as-taggable-on (~> 6.0) addressable (~> 2.5.2) - akismet (~> 2.0) + akismet (~> 3.0) apollo_upload_server (~> 2.0.0.beta3) asana (~> 0.9) asciidoctor (~> 2.0.10) diff --git a/app/assets/javascripts/repository/components/preview/index.vue b/app/assets/javascripts/repository/components/preview/index.vue index 7f974838359..6b3822151ff 100644 --- a/app/assets/javascripts/repository/components/preview/index.vue +++ b/app/assets/javascripts/repository/components/preview/index.vue @@ -35,11 +35,13 @@ export default { <template> <article class="file-holder limited-width-container readme-holder"> - <div class="file-title"> - <i aria-hidden="true" class="fa fa-file-text-o fa-fw"></i> - <gl-link :href="blob.webUrl"> - <strong>{{ blob.name }}</strong> - </gl-link> + <div class="js-file-title file-title-flex-parent"> + <div class="file-header-content"> + <i aria-hidden="true" class="fa fa-file-text-o fa-fw"></i> + <gl-link :href="blob.webUrl"> + <strong>{{ blob.name }}</strong> + </gl-link> + </div> </div> <div class="blob-viewer"> <gl-loading-icon v-if="loading > 0" size="md" class="my-4 mx-auto" /> diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss index 3876d1c10d4..39e7e4bb7e5 100644 --- a/app/assets/stylesheets/framework/typography.scss +++ b/app/assets/stylesheets/framework/typography.scss @@ -645,6 +645,12 @@ h4 { } } +.text-right-md { + @include media-breakpoint-up(md) { + text-align: right; + } +} + .text-right-lg { @include media-breakpoint-up(lg) { text-align: right; diff --git a/app/helpers/hooks_helper.rb b/app/helpers/hooks_helper.rb index c4b39939192..9466a37ed93 100644 --- a/app/helpers/hooks_helper.rb +++ b/app/helpers/hooks_helper.rb @@ -2,18 +2,40 @@ module HooksHelper def link_to_test_hook(hook, trigger) - path = case hook - when ProjectHook - project = hook.project - test_project_hook_path(project, hook, trigger: trigger) - when SystemHook - test_admin_hook_path(hook, trigger: trigger) - end - + path = test_hook_path(hook, trigger) trigger_human_name = trigger.to_s.tr('_', ' ').camelize link_to path, rel: 'nofollow', method: :post do content_tag(:span, trigger_human_name) end end + + def test_hook_path(hook, trigger) + case hook + when ProjectHook + test_project_hook_path(hook.project, hook, trigger: trigger) + when SystemHook + test_admin_hook_path(hook, trigger: trigger) + end + end + + def edit_hook_path(hook) + case hook + when ProjectHook + edit_project_hook_path(hook.project, hook) + when SystemHook + edit_admin_hook_path(hook) + end + end + + def destroy_hook_path(hook) + case hook + when ProjectHook + project_hook_path(hook.project, hook) + when SystemHook + admin_hook_path(hook) + end + end end + +HooksHelper.prepend_if_ee('EE::HooksHelper') diff --git a/app/models/hooks/project_hook.rb b/app/models/hooks/project_hook.rb index 65e3eaf31e7..9ae697b9e59 100644 --- a/app/models/hooks/project_hook.rb +++ b/app/models/hooks/project_hook.rb @@ -18,6 +18,10 @@ class ProjectHook < WebHook belongs_to :project validates :project, presence: true + + def pluralized_name + _('Project Hooks') + end end ProjectHook.prepend_if_ee('EE::ProjectHook') diff --git a/app/models/hooks/system_hook.rb b/app/models/hooks/system_hook.rb index 3d54d17e787..c8a0cc05912 100644 --- a/app/models/hooks/system_hook.rb +++ b/app/models/hooks/system_hook.rb @@ -20,4 +20,12 @@ class SystemHook < WebHook def allow_local_requests? Gitlab::CurrentSettings.allow_local_requests_from_system_hooks? end + + def pluralized_name + _('System Hooks') + end + + def help_path + 'system_hooks/system_hooks' + end end diff --git a/app/models/hooks/web_hook.rb b/app/models/hooks/web_hook.rb index e51b1c41059..dbd5a1b032a 100644 --- a/app/models/hooks/web_hook.rb +++ b/app/models/hooks/web_hook.rb @@ -37,4 +37,8 @@ class WebHook < ApplicationRecord def allow_local_requests? Gitlab::CurrentSettings.allow_local_requests_from_web_hooks_and_services? end + + def help_path + 'user/project/integrations/webhooks' + end end diff --git a/app/views/admin/hooks/edit.html.haml b/app/views/admin/hooks/edit.html.haml index 9c6c74ed965..9ce0fa8d401 100644 --- a/app/views/admin/hooks/edit.html.haml +++ b/app/views/admin/hooks/edit.html.haml @@ -1,21 +1,18 @@ -- add_to_breadcrumbs "System Hooks", admin_hooks_path -- page_title 'Edit System Hook' -%h3.page-title - Edit System Hook +- add_to_breadcrumbs @hook.pluralized_name, admin_hooks_path +- page_title _('Edit System Hook') -%p.light - #{link_to 'System hooks ', help_page_path('system_hooks/system_hooks')} can be - used for binding events when GitLab creates a User or Project. +.row.prepend-top-default + .col-lg-3 + = render 'shared/web_hooks/title_and_docs', hook: @hook -%hr + .col-lg-9.append-bottom-default + = form_for @hook, as: :hook, url: admin_hook_path do |f| + = render partial: 'form', locals: { form: f, hook: @hook } + .form-actions + %span>= f.submit _('Save changes'), class: 'btn btn-success append-right-8' + = render 'shared/web_hooks/test_button', hook: @hook + = link_to _('Delete'), admin_hook_path(@hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: _('Are you sure?') } -= form_for @hook, as: :hook, url: admin_hook_path do |f| - = render partial: 'form', locals: { form: f, hook: @hook } - .form-actions - = f.submit 'Save changes', class: 'btn btn-success' - = render 'shared/web_hooks/test_button', triggers: SystemHook.triggers, hook: @hook - = link_to 'Remove', admin_hook_path(@hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: 'Are you sure?' } + %hr -%hr - -= render partial: 'admin/hook_logs/index', locals: { hook: @hook, hook_logs: @hook_logs } + = render partial: 'admin/hook_logs/index', locals: { hook: @hook, hook_logs: @hook_logs } diff --git a/app/views/admin/hooks/index.html.haml b/app/views/admin/hooks/index.html.haml index b65bf07160a..eed3ec74d60 100644 --- a/app/views/admin/hooks/index.html.haml +++ b/app/views/admin/hooks/index.html.haml @@ -1,35 +1,14 @@ -- page_title 'System Hooks' +- page_title @hook.pluralized_name + .row.prepend-top-default .col-lg-4 - %h4.prepend-top-0 - = page_title - %p - #{link_to 'System hooks ', help_page_path('system_hooks/system_hooks')} can be - used for binding events when GitLab creates a User or Project. + = render 'shared/web_hooks/title_and_docs', hook: @hook .col-lg-8.append-bottom-default = form_for @hook, as: :hook, url: admin_hooks_path do |f| = render partial: 'form', locals: { form: f, hook: @hook } - = f.submit 'Add system hook', class: 'btn btn-success' - - %hr + = f.submit _('Add system hook'), class: 'btn btn-success' - - if @hooks.any? - .card - .card-header - System hooks (#{@hooks.count}) - %ul.content-list - - @hooks.each do |hook| - %li - .controls - = render 'shared/web_hooks/test_button', triggers: SystemHook.triggers, hook: hook, button_class: 'btn-sm' - = link_to 'Edit', edit_admin_hook_path(hook), class: 'btn btn-sm' - = link_to 'Remove', admin_hook_path(hook), data: { confirm: 'Are you sure?' }, method: :delete, class: 'btn btn-remove btn-sm' - .monospace= hook.url - %div - - SystemHook.triggers.each_value do |event| - - if hook.public_send(event) - %span.badge.badge-gray= event.to_s.titleize - %span.badge.badge-gray SSL Verification: #{hook.enable_ssl_verification ? 'enabled' : 'disabled'} + = render 'shared/web_hooks/index', hooks: @hooks, hook_class: @hook.class = render 'shared/plugins/index' diff --git a/app/views/projects/hooks/_index.html.haml b/app/views/projects/hooks/_index.html.haml index 0ab7863b77c..70f2fa0e758 100644 --- a/app/views/projects/hooks/_index.html.haml +++ b/app/views/projects/hooks/_index.html.haml @@ -1,23 +1,10 @@ .row.prepend-top-default .col-lg-4 - %h4.prepend-top-0 - = page_title - %p - #{link_to 'Webhooks', help_page_path('user/project/integrations/webhooks')} can be - used for binding events when something is happening within the project. + = render 'shared/web_hooks/title_and_docs', hook: @hook .col-lg-8.append-bottom-default = form_for @hook, as: :hook, url: polymorphic_path([@project.namespace.becomes(Namespace), @project, :hooks]) do |f| = render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook } = f.submit 'Add webhook', class: 'btn btn-success' - %hr - %h5.prepend-top-default - Webhooks (#{@hooks.count}) - - if @hooks.any? - %ul.content-list - - @hooks.each do |hook| - = render 'project_hook', hook: hook - - else - %p.settings-message.text-center.append-bottom-0 - No webhooks found, add one in the form above. + = render 'shared/web_hooks/index', hooks: @hooks, hook_class: @hook.class diff --git a/app/views/projects/hooks/edit.html.haml b/app/views/projects/hooks/edit.html.haml index 57311284e11..c1fdf619eb5 100644 --- a/app/views/projects/hooks/edit.html.haml +++ b/app/views/projects/hooks/edit.html.haml @@ -1,19 +1,17 @@ -- page_title 'Integrations' +- add_to_breadcrumbs _('ProjectService|Integrations'), namespace_project_settings_integrations_path +- page_title _('Edit Project Hook') .row.prepend-top-default .col-lg-3 - %h4.prepend-top-0 - = page_title - %p - #{link_to 'Webhooks', help_page_path('user/project/integrations/webhooks')} can be - used for binding events when something is happening within the project. + = render 'shared/web_hooks/title_and_docs', hook: @hook + .col-lg-9.append-bottom-default = form_for [@project.namespace.becomes(Namespace), @project, @hook], as: :hook, url: project_hook_path(@project, @hook) do |f| = render partial: 'shared/web_hooks/form', locals: { form: f, hook: @hook } - = f.submit 'Save changes', class: 'btn btn-success' - = render 'shared/web_hooks/test_button', triggers: ProjectHook.triggers, hook: @hook - = link_to 'Remove', project_hook_path(@project, @hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: 'Are you sure?' } + %span>= f.submit 'Save changes', class: 'btn btn-success append-right-8' + = render 'shared/web_hooks/test_button', hook: @hook + = link_to _('Delete'), project_hook_path(@project, @hook), method: :delete, class: 'btn btn-remove float-right', data: { confirm: _('Are you sure?') } %hr diff --git a/app/views/projects/settings/integrations/_project_hook.html.haml b/app/views/projects/settings/integrations/_project_hook.html.haml deleted file mode 100644 index ef445f2e139..00000000000 --- a/app/views/projects/settings/integrations/_project_hook.html.haml +++ /dev/null @@ -1,16 +0,0 @@ -%li - .row - .col-md-8.col-lg-7 - %strong.light-header= hook.url - %div - - ProjectHook.triggers.each_value do |event| - - if hook.public_send(event) - %span.badge.badge-gray.deploy-project-label= event.to_s.titleize - .col-md-4.col-lg-5.text-right-lg.prepend-top-5 - %span.append-right-10.inline - #{_("SSL Verification")}: #{hook.enable_ssl_verification ? _('enabled') : _('disabled')} - = link_to _('Edit'), edit_project_hook_path(@project, hook), class: 'btn btn-sm' - = render 'shared/web_hooks/test_button', triggers: ProjectHook.triggers, hook: hook, button_class: 'btn-sm' - = link_to project_hook_path(@project, hook), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn btn-transparent' do - %span.sr-only= _("Remove") - = icon('trash') diff --git a/app/views/shared/web_hooks/_hook.html.haml b/app/views/shared/web_hooks/_hook.html.haml new file mode 100644 index 00000000000..34a62340966 --- /dev/null +++ b/app/views/shared/web_hooks/_hook.html.haml @@ -0,0 +1,16 @@ +%li + .row + .col-md-8.col-lg-7 + %strong.light-header= hook.url + %div + - hook.class.triggers.each_value do |trigger| + - if hook.public_send(trigger) + %span.badge.badge-gray.deploy-project-label= trigger.to_s.titleize + %span.badge.badge-gray + = _('SSL Verification:') + = hook.enable_ssl_verification ? _('enabled') : _('disabled') + + .col-md-4.col-lg-5.text-right-md.prepend-top-5 + %span>= render 'shared/web_hooks/test_button', hook: hook, button_class: 'btn-sm append-right-8' + %span>= link_to _('Edit'), edit_hook_path(hook), class: 'btn btn-sm append-right-8' + = link_to _('Delete'), destroy_hook_path(hook), data: { confirm: _('Are you sure?') }, method: :delete, class: 'btn btn-sm' diff --git a/app/views/shared/web_hooks/_index.html.haml b/app/views/shared/web_hooks/_index.html.haml new file mode 100644 index 00000000000..b22d51a101a --- /dev/null +++ b/app/views/shared/web_hooks/_index.html.haml @@ -0,0 +1,14 @@ +%hr +.card + .card-header + %h5 + = hook_class.underscore.humanize.titleize.pluralize + (#{hooks.count}) + + - if hooks.any? + %ul.content-list + - hooks.each do |hook| + = render 'shared/web_hooks/hook', hook: hook + - else + %p.text-center.prepend-top-default.append-bottom-default + = _('No webhooks found, add one in the form above.') diff --git a/app/views/shared/web_hooks/_test_button.html.haml b/app/views/shared/web_hooks/_test_button.html.haml index 5ece8b1d4c7..fc24e425ab6 100644 --- a/app/views/shared/web_hooks/_test_button.html.haml +++ b/app/views/shared/web_hooks/_test_button.html.haml @@ -1,10 +1,10 @@ -- triggers = local_assigns.fetch(:triggers) - button_class = local_assigns.fetch(:button_class, '') - hook = local_assigns.fetch(:hook) +- triggers = hook.class.triggers -.hook-test-button.dropdown.inline +.hook-test-button.dropdown.inline> %button.btn{ 'data-toggle' => 'dropdown', class: button_class } - Test + = _('Test') = icon('caret-down') %ul.dropdown-menu.dropdown-menu-right{ role: 'menu' } - triggers.each_value do |event| diff --git a/app/views/shared/web_hooks/_title_and_docs.html.haml b/app/views/shared/web_hooks/_title_and_docs.html.haml new file mode 100644 index 00000000000..359f5f34f5b --- /dev/null +++ b/app/views/shared/web_hooks/_title_and_docs.html.haml @@ -0,0 +1,5 @@ +%h4.prepend-top-0 + = page_title +%p + - link = link_to(hook.pluralized_name, help_page_path(hook.help_path)) + = _('%{link} can be used for binding events when something is happening within the project.').html_safe % { link: link } diff --git a/changelogs/unreleased/35527-add-path-to-package.yml b/changelogs/unreleased/35527-add-path-to-package.yml new file mode 100644 index 00000000000..900f658d469 --- /dev/null +++ b/changelogs/unreleased/35527-add-path-to-package.yml @@ -0,0 +1,5 @@ +--- +title: Add _links object to package api response +merge_request: 20820 +author: +type: added diff --git a/changelogs/unreleased/39290-fix-border-of-readme-when-vue_file_list-enabled.yml b/changelogs/unreleased/39290-fix-border-of-readme-when-vue_file_list-enabled.yml new file mode 100644 index 00000000000..3373e945479 --- /dev/null +++ b/changelogs/unreleased/39290-fix-border-of-readme-when-vue_file_list-enabled.yml @@ -0,0 +1,5 @@ +--- +title: Fix top border of README in vue_file_list +merge_request: 21578 +author: Hector Bustillos +type: fixed diff --git a/changelogs/unreleased/sh-upgrade-akismet-gem.yml b/changelogs/unreleased/sh-upgrade-akismet-gem.yml new file mode 100644 index 00000000000..c6a545e2bba --- /dev/null +++ b/changelogs/unreleased/sh-upgrade-akismet-gem.yml @@ -0,0 +1,5 @@ +--- +title: Upgrade Akismet gem to v3.0.0 +merge_request: 21786 +author: +type: security diff --git a/doc/administration/gitaly/praefect.md b/doc/administration/gitaly/praefect.md index b510314abfb..21a1e7ea691 100644 --- a/doc/administration/gitaly/praefect.md +++ b/doc/administration/gitaly/praefect.md @@ -79,6 +79,7 @@ postgresql['enable'] = false redis['enable'] = false nginx['enable'] = false prometheus['enable'] = false +grafana['enable'] = false unicorn['enable'] = false sidekiq['enable'] = false gitlab_workhorse['enable'] = false @@ -150,6 +151,7 @@ postgresql['enable'] = false redis['enable'] = false nginx['enable'] = false prometheus['enable'] = false +grafana['enable'] = false unicorn['enable'] = false sidekiq['enable'] = false gitlab_workhorse['enable'] = false diff --git a/doc/administration/img/repository_storages_admin_ui.png b/doc/administration/img/repository_storages_admin_ui.png Binary files differindex 5f1b4936704..315b4b0144c 100644 --- a/doc/administration/img/repository_storages_admin_ui.png +++ b/doc/administration/img/repository_storages_admin_ui.png diff --git a/doc/administration/repository_storage_paths.md b/doc/administration/repository_storage_paths.md index 86998280b93..d31b1d7fcd6 100644 --- a/doc/administration/repository_storage_paths.md +++ b/doc/administration/repository_storage_paths.md @@ -107,7 +107,8 @@ working, you can remove the `repos_path` line. ## Choose where new project repositories will be stored Once you set the multiple storage paths, you can choose where new projects will -be stored via the **Application Settings** in the Admin area. +be stored under **Admin Area > Settings > Repository > Repository storage > Storage +nodes for new projects**. ![Choose repository storage path in Admin area](img/repository_storages_admin_ui.png) diff --git a/doc/api/packages.md b/doc/api/packages.md index bab3f91bc40..5b490b872da 100644 --- a/doc/api/packages.md +++ b/doc/api/packages.md @@ -72,19 +72,32 @@ Example response: "id": 1, "name": "com/mycompany/my-app", "version": "1.0-SNAPSHOT", - "package_type": "maven" + "package_type": "maven", + "_links": { + "web_path": "/namespace1/project1/-/packages/1", + "delete_api_path": "/namespace1/project1/-/packages/1" + } }, { "id": 2, "name": "@foo/bar", "version": "1.0.3", - "package_type": "npm" + "package_type": "npm", + "_links": { + "web_path": "/namespace1/project1/-/packages/1", + "delete_api_path": "/namespace1/project1/-/packages/1" + } } ] ``` By default, the `GET` request will return 20 results, since the API is [paginated](README.md#pagination). +The `_links` object contains the following properties: + +- `web_path`: The path which you can visit in GitLab and see the details of the package. +- `delete_api_path`: The API path to delete the package. Only available if the request user has permission to do so. + ## Get a project package > [Introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/9667) in GitLab 11.9. @@ -111,10 +124,19 @@ Example response: "id": 1, "name": "com/mycompany/my-app", "version": "1.0-SNAPSHOT", - "package_type": "maven" + "package_type": "maven", + "_links": { + "web_path": "/namespace1/project1/-/packages/1", + "delete_api_path": "/namespace1/project1/-/packages/1" + } } ``` +The `_links` object contains the following properties: + +- `web_path`: The path which you can visit in GitLab and see the details of the package. +- `delete_api_path`: The API path to delete the package. Only available if the request user has permission to do so. + ## List package files > [Introduced](https://gitlab.com/gitlab-org/gitlab/merge_requests/9305) in GitLab 11.8. diff --git a/doc/user/application_security/sast/index.md b/doc/user/application_security/sast/index.md index c0885e27da6..95027e99c00 100644 --- a/doc/user/application_security/sast/index.md +++ b/doc/user/application_security/sast/index.md @@ -358,7 +358,7 @@ it highlighted: } ``` -Here is the description of the report file structure nodes and their meaning. All fields are mandatory to be present in +Here is the description of the report file structure nodes and their meaning. All fields are mandatory in the report JSON unless stated otherwise. Presence of optional fields depends on the underlying analyzers being used. | Report JSON node | Function | diff --git a/doc/user/permissions.md b/doc/user/permissions.md index a73f465bb22..ed58c23a22f 100644 --- a/doc/user/permissions.md +++ b/doc/user/permissions.md @@ -46,10 +46,11 @@ The following table depicts the various user permission levels in a project. | Download project | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ | | Leave comments | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ | | View Insights charts **(ULTIMATE)** | ✓ | ✓ | ✓ | ✓ | ✓ | -| View approved/blacklisted licenses **(ULTIMATE)** | ✓ | ✓ | ✓ | ✓ | ✓ | +| View approved/blacklisted licenses **(ULTIMATE)** | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ | | View License Compliance reports **(ULTIMATE)** | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ | | View Security reports **(ULTIMATE)** | ✓ (*3*) | ✓ | ✓ | ✓ | ✓ | | View Dependency list **(ULTIMATE)** | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ | +| View License list **(ULTIMATE)** | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ | | View licenses in Dependency list **(ULTIMATE)** | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ | | View [Design Management](project/issues/design_management.md) pages **(PREMIUM)** | ✓ | ✓ | ✓ | ✓ | ✓ | | View project code | ✓ (*1*) | ✓ | ✓ | ✓ | ✓ | diff --git a/doc/user/project/operations/error_tracking.md b/doc/user/project/operations/error_tracking.md index 01143489a03..230e388d497 100644 --- a/doc/user/project/operations/error_tracking.md +++ b/doc/user/project/operations/error_tracking.md @@ -53,7 +53,12 @@ From error list, users can navigate to the error details page by clicking the ti This page has: - A link to the Sentry issue. -- A full stack trace along with other details. -- Ability to create an issue from a Sentry error. +- Other details about the issue, including a full stack trace. -![Error Details](img/error_details_v12_6.png) +If the error has not been linked to an existing GitLab issue, a 'Create Issue' button will be visible: + +![Error Details without Issue Link](img/error_details_v12_6.png) + +If a link does exist, it will be shown in the details and the 'Create Issue' button will be hidden: + +![Error Details with Issue Link](img/error_details_with_issue_v12_6.png) diff --git a/doc/user/project/operations/img/error_details_with_issue_v12_6.png b/doc/user/project/operations/img/error_details_with_issue_v12_6.png Binary files differnew file mode 100644 index 00000000000..963b70bd1e4 --- /dev/null +++ b/doc/user/project/operations/img/error_details_with_issue_v12_6.png diff --git a/doc/user/project/service_desk.md b/doc/user/project/service_desk.md index 3a354e1a4f4..fad4af7102a 100644 --- a/doc/user/project/service_desk.md +++ b/doc/user/project/service_desk.md @@ -55,7 +55,7 @@ you can skip the step 1 below; you only need to enable it per project. 1. [Set up incoming email](../../administration/incoming_email.md#set-it-up) for the GitLab instance. This must support [email sub-addressing](../../administration/incoming_email.md#email-sub-addressing). -1. Navigate to your project's **Settings** and scroll down to the **Service Desk** +1. Navigate to your project's **Settings > General** and scroll down to the **Service Desk** section. 1. If you have the correct access and a Premium license, you will see an option to set up Service Desk: diff --git a/locale/gitlab.pot b/locale/gitlab.pot index ecf5ca2d49a..7ce308570d5 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -299,6 +299,9 @@ msgstr "" msgid "%{link_start}Read more%{link_end} about role permissions" msgstr "" +msgid "%{link} can be used for binding events when something is happening within the project." +msgstr "" + msgid "%{listToShow}, and %{awardsListLength} more." msgstr "" @@ -1055,6 +1058,9 @@ msgstr "" msgid "Add request manually" msgstr "" +msgid "Add system hook" +msgstr "" + msgid "Add to Slack" msgstr "" @@ -1082,6 +1088,9 @@ msgstr "" msgid "Add users to group" msgstr "" +msgid "Add webhook" +msgstr "" + msgid "AddMember|No users specified." msgstr "" @@ -4919,12 +4928,18 @@ msgstr "" msgid "Could not create group" msgstr "" +msgid "Could not create issue" +msgstr "" + msgid "Could not create project" msgstr "" msgid "Could not delete chat nickname %{chat_name}." msgstr "" +msgid "Could not fetch projects" +msgstr "" + msgid "Could not remove the trigger." msgstr "" @@ -6254,6 +6269,9 @@ msgstr "" msgid "Edit Deploy Key" msgstr "" +msgid "Edit Group Hook" +msgstr "" + msgid "Edit Label" msgstr "" @@ -6266,12 +6284,18 @@ msgstr "" msgid "Edit Pipeline Schedule %{id}" msgstr "" +msgid "Edit Project Hook" +msgstr "" + msgid "Edit Release" msgstr "" msgid "Edit Snippet" msgstr "" +msgid "Edit System Hook" +msgstr "" + msgid "Edit application" msgstr "" @@ -8749,6 +8773,9 @@ msgstr "" msgid "Group Git LFS status:" msgstr "" +msgid "Group Hooks" +msgstr "" + msgid "Group ID" msgstr "" @@ -9896,6 +9923,9 @@ msgstr "" msgid "IssuesAnalytics|Total:" msgstr "" +msgid "Issue|Title" +msgstr "" + msgid "It must have a header row and at least two columns: the first column is the issue title and the second column is the issue description. The separator is automatically detected." msgstr "" @@ -11604,6 +11634,9 @@ msgstr "" msgid "New issue" msgstr "" +msgid "New issue title" +msgstr "" + msgid "New label" msgstr "" @@ -11850,6 +11883,9 @@ msgstr "" msgid "No vulnerabilities present" msgstr "" +msgid "No webhooks found, add one in the form above." +msgstr "" + msgid "No, directly import the existing email addresses and usernames." msgstr "" @@ -13550,6 +13586,9 @@ msgstr "" msgid "Project Files" msgstr "" +msgid "Project Hooks" +msgstr "" + msgid "Project ID" msgstr "" @@ -15309,7 +15348,7 @@ msgstr "" msgid "SSH public key" msgstr "" -msgid "SSL Verification" +msgid "SSL Verification:" msgstr "" msgid "Saturday" @@ -17463,6 +17502,9 @@ msgstr "" msgid "Terms of Service and Privacy Policy" msgstr "" +msgid "Test" +msgstr "" + msgid "Test coverage parsing" msgstr "" diff --git a/qa/qa/page/base.rb b/qa/qa/page/base.rb index b01b4951738..dcba4fc8544 100644 --- a/qa/qa/page/base.rb +++ b/qa/qa/page/base.rb @@ -81,8 +81,8 @@ module QA find_element(name, class: 'active') end - def all_elements(name) - all(element_selector_css(name)) + def all_elements(name, **kwargs) + all(element_selector_css(name), **kwargs) end def check_element(name) @@ -206,12 +206,7 @@ module QA end def within_element_by_index(name, index) - # Finding all elements can be flaky if the elements don't all load - # immediately. So we wait for any to appear before trying to find a - # specific one. - has_element?(name) - - page.within all_elements(name)[index] do + page.within all_elements(name, minimum: index + 1)[index] do yield end end diff --git a/qa/qa/page/merge_request/show.rb b/qa/qa/page/merge_request/show.rb index 198699c2fee..c3645a6a755 100644 --- a/qa/qa/page/merge_request/show.rb +++ b/qa/qa/page/merge_request/show.rb @@ -60,18 +60,35 @@ module QA element :edit_button end + def add_comment_to_diff(text) + wait(interval: 5) do + has_text?("No newline at end of file") + end + all_elements(:new_diff_line).first.hover + click_element :diff_comment + fill_element :reply_input, text + end + def click_discussions_tab click_element :notes_tab + + finished_loading? end def click_diffs_tab click_element :diffs_tab + + finished_loading? end def click_pipeline_link click_element :pipeline_link end + def edit! + click_element :edit_button + end + def fast_forward_possible? has_no_text?('Fast-forward merge is not possible') end @@ -82,55 +99,6 @@ module QA has_element?(:merge_button) end - def has_merge_options? - has_element?(:merge_moment_dropdown) - end - - def merged? - has_element? :merged_status_content, text: 'The changes were merged into' - end - - def merge_immediately - wait(reload: false) do - finished_loading? - end - - if has_merge_options? - retry_until do - click_element :merge_moment_dropdown - has_element? :merge_immediately_option - end - - click_element :merge_immediately_option - else - click_element :merge_button - end - - wait(reload: false) do - merged? - end - end - - def rebase! - # The rebase button is disabled on load - wait do - has_element?(:mr_rebase_button) - end - - # The rebase button is enabled via JS - wait(reload: false) do - !find_element(:mr_rebase_button).disabled? - end - - click_element :mr_rebase_button - - success = wait do - has_text?('Fast-forward merge without a merge commit') - end - - raise "Rebase did not appear to be successful" unless success - end - def has_assignee?(username) page.within(element_selector_css(:assignee_block)) do has_text?(username) @@ -156,20 +124,6 @@ module QA has_element?(:description, text: description) end - def try_to_merge! - merge_immediately if ready_to_merge? - end - - def merge! - try_to_merge! - - success = wait do - has_text?('The changes were merged into') - end - - raise "Merge did not appear to be successful" unless success - end - def mark_to_squash # The squash checkbox is disabled on load wait do @@ -184,17 +138,14 @@ module QA click_element :squash_checkbox end - def add_comment_to_diff(text) - wait(interval: 5) do - has_text?("No newline at end of file") - end - all_elements(:new_diff_line).first.hover - click_element :diff_comment - fill_element :reply_input, text + def merge! + click_element :merge_button if ready_to_merge? + + raise "Merge did not appear to be successful" unless merged? end - def edit! - click_element :edit_button + def merged? + has_element?(:merged_status_content, text: 'The changes were merged into', wait: 30) end def ready_to_merge? @@ -209,6 +160,30 @@ module QA end end + def rebase! + # The rebase button is disabled on load + wait do + has_element?(:mr_rebase_button) + end + + # The rebase button is enabled via JS + wait(reload: false) do + !find_element(:mr_rebase_button).disabled? + end + + click_element :mr_rebase_button + + success = wait do + has_text?('Fast-forward merge without a merge commit') + end + + raise "Rebase did not appear to be successful" unless success + end + + def try_to_merge! + click_element :merge_button if ready_to_merge? + end + def view_email_patches click_element :dropdown_toggle visit_link_in_element(:download_email_patches) diff --git a/qa/qa/resource/project.rb b/qa/qa/resource/project.rb index 0928936284a..f2ca0e0b8fd 100644 --- a/qa/qa/resource/project.rb +++ b/qa/qa/resource/project.rb @@ -48,7 +48,7 @@ module QA @standalone = false @description = 'My awesome project' @initialize_with_readme = false - @auto_devops_enabled = true + @auto_devops_enabled = false @visibility = 'public' end diff --git a/qa/qa/support/page/logging.rb b/qa/qa/support/page/logging.rb index f1cb876222e..5d73d9635f8 100644 --- a/qa/qa/support/page/logging.rb +++ b/qa/qa/support/page/logging.rb @@ -49,8 +49,8 @@ module QA element end - def all_elements(name) - log("finding all :#{name}") + def all_elements(name, **kwargs) + log("finding all :#{name} with args #{kwargs}") elements = super diff --git a/spec/features/admin/admin_hooks_spec.rb b/spec/features/admin/admin_hooks_spec.rb index 0fd748af3ce..b4bcbe9d812 100644 --- a/spec/features/admin/admin_hooks_spec.rb +++ b/spec/features/admin/admin_hooks_spec.rb @@ -85,7 +85,7 @@ describe 'Admin::Hooks' do it 'from hooks list page' do visit admin_hooks_path - accept_confirm { click_link 'Remove' } + accept_confirm { click_link 'Delete' } expect(page).not_to have_content(hook_url) end @@ -93,7 +93,7 @@ describe 'Admin::Hooks' do visit admin_hooks_path click_link 'Edit' - accept_confirm { click_link 'Remove' } + accept_confirm { click_link 'Delete' } expect(page).not_to have_content(hook_url) end end diff --git a/spec/features/projects/settings/integration_settings_spec.rb b/spec/features/projects/settings/integration_settings_spec.rb index 26ea4ec5944..de987b879eb 100644 --- a/spec/features/projects/settings/integration_settings_spec.rb +++ b/spec/features/projects/settings/integration_settings_spec.rb @@ -89,12 +89,12 @@ describe 'Projects > Settings > Integration settings' do expect(current_path).to eq(integrations_path) end - context 'remove existing webhook' do + context 'delete existing webhook' do it 'from webhooks list page' do hook visit integrations_path - expect { click_link 'Remove' }.to change(ProjectHook, :count).by(-1) + expect { click_link 'Delete' }.to change(ProjectHook, :count).by(-1) end it 'from webhook edit page' do @@ -102,7 +102,7 @@ describe 'Projects > Settings > Integration settings' do visit integrations_path click_link 'Edit' - expect { click_link 'Remove' }.to change(ProjectHook, :count).by(-1) + expect { click_link 'Delete' }.to change(ProjectHook, :count).by(-1) end end end diff --git a/spec/frontend/fixtures/static/projects.json b/spec/frontend/fixtures/static/projects.json index d92d3acdea0..f28d9899099 100644 --- a/spec/frontend/fixtures/static/projects.json +++ b/spec/frontend/fixtures/static/projects.json @@ -99,6 +99,15 @@ "access_level": 50, "notification_level": 3 } + }, + "_links": { + "self": "https://gitlab.com/api/v4/projects/278964", + "issues": "https://gitlab.com/api/v4/projects/278964/issues", + "merge_requests": "https://gitlab.com/api/v4/projects/278964/merge_requests", + "repo_branches": "https://gitlab.com/api/v4/projects/278964/repository/branches", + "labels": "https://gitlab.com/api/v4/projects/278964/labels", + "events": "https://gitlab.com/api/v4/projects/278964/events", + "members": "https://gitlab.com/api/v4/projects/278964/members" } }, { "id": 7, diff --git a/spec/frontend/repository/components/preview/__snapshots__/index_spec.js.snap b/spec/frontend/repository/components/preview/__snapshots__/index_spec.js.snap index a5e3eb4bce1..cdc7ece89f6 100644 --- a/spec/frontend/repository/components/preview/__snapshots__/index_spec.js.snap +++ b/spec/frontend/repository/components/preview/__snapshots__/index_spec.js.snap @@ -5,20 +5,24 @@ exports[`Repository file preview component renders file HTML 1`] = ` class="file-holder limited-width-container readme-holder" > <div - class="file-title" + class="js-file-title file-title-flex-parent" > - <i - aria-hidden="true" - class="fa fa-file-text-o fa-fw" - /> - - <gllink-stub - href="http://test.com" + <div + class="file-header-content" > - <strong> - README.md - </strong> - </gllink-stub> + <i + aria-hidden="true" + class="fa fa-file-text-o fa-fw" + /> + + <gllink-stub + href="http://test.com" + > + <strong> + README.md + </strong> + </gllink-stub> + </div> </div> <div |