...@@ -10,6 +10,7 @@ ...@@ -10,6 +10,7 @@
= provider_image_tag(provider) = provider_image_tag(provider)
%span %span
= label_for_provider(provider) = label_for_provider(provider)
- unless defined?(hide_remember_me) && hide_remember_me
%fieldset.remember-me %fieldset.remember-me
%label %label
= check_box_tag :remember_me, nil, false, class: 'remember-me-checkbox' = check_box_tag :remember_me, nil, false, class: 'remember-me-checkbox'
... ...
......
- title = _('Jira Issue Import')
- page_title title
- breadcrumb_title title
- header_title _("Projects"), root_path
= render 'import/shared/errors'
- if @project.import_state&.in_progress?
%h3.page-title.d-flex.align-items-center
= sprite_icon('issues', size: 16, css_class: 'mr-1')
= _('Import in progress')
- else
%h3.page-title.d-flex.align-items-center
= sprite_icon('issues', size: 16, css_class: 'mr-1')
= _('Import issues from Jira')
= form_tag import_project_import_jira_path(@project), method: :post do
.form-group.row
= label_tag :jira_project_key, _('From project'), class: 'col-form-label col-md-2'
.col-md-4
= select_tag :jira_project_key, options_for_select(@jira_projects, ''), { class: 'select2' }
.form-actions
= submit_tag _('Import issues'), class: 'btn btn-success'
= link_to _('Cancel'), project_issues_path(@project), class: 'btn btn-cancel'
...@@ -7,3 +7,5 @@ ...@@ -7,3 +7,5 @@
- else - else
= _('Import CSV') = _('Import CSV')
- if Feature.enabled?(:jira_issue_import, @project)
= link_to _("Import Jira issues"), project_import_jira_path(@project), class: "btn btn-default"
...@@ -36,11 +36,19 @@ ...@@ -36,11 +36,19 @@
.form-group.row .form-group.row
= label_tag :release_description, s_('TagsPage|Release notes'), class: 'col-form-label col-sm-2' = label_tag :release_description, s_('TagsPage|Release notes'), class: 'col-form-label col-sm-2'
.col-sm-10 .col-sm-10
.form-text.mb-3
- link_start = '<a href="%{url}" rel="noopener noreferrer" target="_blank">'.html_safe
- releases_page_path = project_releases_path(@project)
- releases_page_link_start = link_start % { url: releases_page_path }
- docs_url = help_page_path('user/project/releases/index.md', anchor: 'creating-a-release')
- docs_link_start = link_start % { url: docs_url }
- link_end = '</a>'.html_safe
- replacements = { releases_page_link_start: releases_page_link_start, docs_link_start: docs_link_start, link_end: link_end }
= s_('TagsPage|Optionally, create a public Release of your project, based on this tag. Release notes are displayed on the %{releases_page_link_start}Releases%{link_end} page. %{docs_link_start}More information%{link_end}').html_safe % replacements
= render layout: 'projects/md_preview', locals: { url: preview_markdown_path(@project), referenced_users: true } do = render layout: 'projects/md_preview', locals: { url: preview_markdown_path(@project), referenced_users: true } do
= render 'projects/zen', attr: :release_description, classes: 'note-textarea', placeholder: s_('TagsPage|Write your release notes or drag files here…'), current_text: @release_description = render 'projects/zen', attr: :release_description, classes: 'note-textarea', placeholder: s_('TagsPage|Write your release notes or drag files here…'), current_text: @release_description
= render 'shared/notes/hints' = render 'shared/notes/hints'
.form-text.text-muted
= s_('TagsPage|Optionally, add release notes to the tag. They will be stored in the GitLab database and displayed on the tags page.')
.form-actions .form-actions
= button_tag s_('TagsPage|Create tag'), class: 'btn btn-success' = button_tag s_('TagsPage|Create tag'), class: 'btn btn-success'
= link_to s_('TagsPage|Cancel'), project_tags_path(@project), class: 'btn btn-cancel' = link_to s_('TagsPage|Cancel'), project_tags_path(@project), class: 'btn btn-cancel'
... ...
......
#js-authenticate-u2f #js-authenticate-u2f
%a.btn.btn-block.btn-info#js-login-2fa-device{ href: '#' }= _("Sign in via 2FA code") %a.btn.btn-block.btn-info#js-login-2fa-device{ href: '#' }= _("Sign in via 2FA code")
-# haml-lint:disable InlineJavaScript
%script#js-authenticate-u2f-in-progress{ type: "text/template" } %script#js-authenticate-u2f-in-progress{ type: "text/template" }
%p= _("Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now.") %p= _("Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now.")
... ...
......
...@@ -856,7 +856,7 @@ ...@@ -856,7 +856,7 @@
:urgency: :high :urgency: :high
:resource_boundary: :unknown :resource_boundary: :unknown
:weight: 2 :weight: 2
:idempotent: :idempotent: true
- :name: background_migration - :name: background_migration
:feature_category: :not_owned :feature_category: :not_owned
:has_external_dependencies: :has_external_dependencies:
... ...
......
# frozen_string_literal: true # frozen_string_literal: true
class AuthorizedProjectsWorker # rubocop:disable Scalability/IdempotentWorker class AuthorizedProjectsWorker
include ApplicationWorker include ApplicationWorker
prepend WaitableWorker prepend WaitableWorker
...@@ -8,6 +8,8 @@ class AuthorizedProjectsWorker # rubocop:disable Scalability/IdempotentWorker ...@@ -8,6 +8,8 @@ class AuthorizedProjectsWorker # rubocop:disable Scalability/IdempotentWorker
urgency :high urgency :high
weight 2 weight 2
idempotent!
# This is a workaround for a Ruby 2.3.7 bug. rspec-mocks cannot restore the # This is a workaround for a Ruby 2.3.7 bug. rspec-mocks cannot restore the
# visibility of prepended modules. See https://github.com/rspec/rspec-mocks/issues/1231 # visibility of prepended modules. See https://github.com/rspec/rspec-mocks/issues/1231
# for more details. # for more details.
... ...
......
---
title: Remove staging from commit workflow in the Web IDE
merge_request: 26151
author:
type: removed
---
title: More logs entries are loaded when logs are scrolled to the top
merge_request: 26254
author:
type: added
---
title: Optimize notes counters in usage data
merge_request: 26871
author:
type: performance
---
title: Backfill LfsObjectsProject records of forks
merge_request: 26964
author:
type: other
---
title: Add 2FA support to admin mode feature
merge_request: 22281
author: Diego Louzán
type: added
---
title: Add "New release" button to Releases page
merge_request: 24516
author:
type: added
---
title: Update Ruby version in official CI templates
merge_request: 23585
author: Takuya Noguchi
type: other
...@@ -295,6 +295,12 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do ...@@ -295,6 +295,12 @@ constraints(::Constraints::ProjectUrlConstrainer.new) do
draw :repository_scoped draw :repository_scoped
draw :repository draw :repository
draw :wiki draw :wiki
namespace :import do
resource :jira, only: [:show], controller: :jira do
post :import
end
end
end end
# End of the /-/ scope. # End of the /-/ scope.
... ...
......
# frozen_string_literal: true
class AddIndexOnAuthorIdAndIdAndCreatedAtToNotes < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_index :notes, [:author_id, :created_at]
remove_concurrent_index :notes, [:author_id]
end
def down
add_concurrent_index :notes, [:author_id]
remove_concurrent_index :notes, [:author_id, :created_at]
end
end
# frozen_string_literal: true
class ScheduleLinkLfsObjectsProjects < ActiveRecord::Migration[6.0]
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
MIGRATION = 'LinkLfsObjectsProjects'
BATCH_SIZE = 1000
disable_ddl_transaction!
def up
lfs_objects_projects = Gitlab::BackgroundMigration::LinkLfsObjectsProjects::LfsObjectsProject.linkable
queue_background_migration_jobs_by_range_at_intervals(
lfs_objects_projects,
MIGRATION,
BackgroundMigrationWorker.minimum_interval,
batch_size: BATCH_SIZE
)
end
def down
# No-op. No need to make this reversible. In case the jobs enqueued runs and
# fails at some point, some records will be created. When rescheduled, those
# records won't be re-created. It's also hard to track which records to clean
# up if ever.
end
end
...@@ -2829,7 +2829,7 @@ ActiveRecord::Schema.define(version: 2020_03_11_165635) do ...@@ -2829,7 +2829,7 @@ ActiveRecord::Schema.define(version: 2020_03_11_165635) do
t.boolean "resolved_by_push" t.boolean "resolved_by_push"
t.bigint "review_id" t.bigint "review_id"
t.boolean "confidential" t.boolean "confidential"
t.index ["author_id"], name: "index_notes_on_author_id" t.index ["author_id", "created_at"], name: "index_notes_on_author_id_and_created_at"
t.index ["commit_id"], name: "index_notes_on_commit_id" t.index ["commit_id"], name: "index_notes_on_commit_id"
t.index ["created_at"], name: "index_notes_on_created_at" t.index ["created_at"], name: "index_notes_on_created_at"
t.index ["discussion_id"], name: "index_notes_on_discussion_id" t.index ["discussion_id"], name: "index_notes_on_discussion_id"
... ...
......
This diff is collapsed.
...@@ -636,6 +636,37 @@ found, we should raise a ...@@ -636,6 +636,37 @@ found, we should raise a
`Gitlab::Graphql::Errors::ResourceNotAvailable` error. Which will be `Gitlab::Graphql::Errors::ResourceNotAvailable` error. Which will be
correctly rendered to the clients. correctly rendered to the clients.
## Validating arguments
For validations of single arguments, use the
[`prepare` option](https://github.com/rmosolgo/graphql-ruby/blob/master/guides/fields/arguments.md)
as normal.
Sometimes a mutation or resolver may accept a number of optional
arguments, but still want to validate that at least one of the optional
arguments were given. In this situation, consider using the `#ready?`
method within your mutation or resolver to provide the validation. The
`#ready?` method will be called before any work is done within the
`#resolve` method.
Example:
```ruby
def ready?(**args)
if args.values_at(:body, :position).compact.blank?
raise Gitlab::Graphql::Errors::ArgumentError,
'body or position arguments are required'
end
# Always remember to call `#super`
super(args)
end
```
In the future this may be able to be done using `InputUnions` if
[this RFC](https://github.com/graphql/graphql-spec/blob/master/rfcs/InputUnion.md)
is merged.
## GitLab's custom scalars ## GitLab's custom scalars
### `Types::TimeType` ### `Types::TimeType`
... ...
......