提交 d5b43600 编写于 作者: G GitLab Bot

Add latest changes from gitlab-org/gitlab@master

上级 96157369
......@@ -273,8 +273,8 @@ gem 'mimemagic', '~> 0.3.2'
gem 'fast_blank'
# Parse time & duration
gem 'chronic', '~> 0.10.2'
gem 'gitlab_chronic_duration', '~> 0.10.6.1'
gem 'gitlab-chronic', '~> 0.10.5'
gem 'gitlab_chronic_duration', '~> 0.10.6.2'
gem 'webpack-rails', '~> 0.9.10'
gem 'rack-proxy', '~> 0.6.0'
......
......@@ -145,7 +145,6 @@ GEM
charlock_holmes (0.7.6)
childprocess (0.9.0)
ffi (~> 1.0, >= 1.0.11)
chronic (0.10.2)
chunky_png (1.3.5)
citrus (3.0.2)
claide (1.0.3)
......@@ -362,6 +361,8 @@ GEM
gitaly (1.73.0)
grpc (~> 1.0)
github-markup (1.7.0)
gitlab-chronic (0.10.5)
numerizer (~> 0.2)
gitlab-labkit (0.7.0)
actionpack (>= 5.0.0, < 6.1.0)
activesupport (>= 5.0.0, < 6.1.0)
......@@ -381,8 +382,8 @@ GEM
rubocop-gitlab-security (~> 0.1.0)
rubocop-performance (~> 1.1.0)
rubocop-rspec (~> 1.19)
gitlab_chronic_duration (0.10.6.1)
numerizer (~> 0.1.1)
gitlab_chronic_duration (0.10.6.2)
numerizer (~> 0.2)
gitlab_omniauth-ldap (2.1.1)
net-ldap (~> 0.16)
omniauth (~> 1.3)
......@@ -630,7 +631,7 @@ GEM
notiffany (0.1.3)
nenv (~> 0.1)
shellany (~> 0.0)
numerizer (0.1.1)
numerizer (0.2.0)
oauth (0.5.4)
oauth2 (1.4.1)
faraday (>= 0.8, < 0.16.0)
......@@ -1144,7 +1145,6 @@ DEPENDENCIES
capybara-screenshot (~> 1.0.22)
carrierwave (~> 1.3)
charlock_holmes (~> 0.7.5)
chronic (~> 0.10.2)
commonmarker (~> 0.20)
concurrent-ruby (~> 1.1)
connection_pool (~> 2.0)
......@@ -1195,6 +1195,7 @@ DEPENDENCIES
gettext_i18n_rails_js (~> 1.3)
gitaly (~> 1.73.0)
github-markup (~> 1.7.0)
gitlab-chronic (~> 0.10.5)
gitlab-labkit (~> 0.5)
gitlab-license (~> 1.0)
gitlab-markup (~> 1.7.0)
......@@ -1202,7 +1203,7 @@ DEPENDENCIES
gitlab-peek (~> 0.0.1)
gitlab-sidekiq-fetcher (= 0.5.2)
gitlab-styles (~> 2.7)
gitlab_chronic_duration (~> 0.10.6.1)
gitlab_chronic_duration (~> 0.10.6.2)
gitlab_omniauth-ldap (~> 2.1.1)
gon (~> 6.2)
google-api-client (~> 0.23)
......
......@@ -311,6 +311,7 @@ export default class CreateMergeRequestDropdown {
}
onChangeInput(event) {
this.disable();
let target;
let value;
......
---
title: Fix incorrect new branch name from issue
merge_request: 20677
author: Lee Tickett
type: fixed
---
title: Fix cron parsing for Daylight Savings
merge_request: 20667
author:
type: fixed
......@@ -258,6 +258,22 @@ Project.find_each do |project|
end
```
## Wikis
### Recreate
A Projects Wiki can be recreated by
**Note:** This is a destructive operation, the Wiki will be empty
```ruby
p = Project.find_by_full_path('<username-or-group>/<project-name>') ### enter your projects path
GitlabShellWorker.perform_in(0, :remove_repository, p.repository_storage, p.wiki.disk_path) ### deletes the wiki project from the filesystem
p.create_wiki ### creates the wiki project on the filesystem
```
## Imports / Exports
```ruby
......
......@@ -1055,7 +1055,7 @@ Sometimes features are shipped with feature flags, either:
- On by default, but providing the option to turn the feature off.
- Off by default, but providing the option to turn the feature on.
When documenting feature flags for a feature, it's important that users know:
When documenting feature flags for a feature, include:
- Why a feature flag is necessary. Some of the reasons are
[outlined in the handbook](https://about.gitlab.com/handbook/product/#alpha-beta-ga).
......@@ -1080,6 +1080,9 @@ Feature.disable(:feature_flag)
```
````
For guidance on developing with feature flags, see
[Feature flags in development of GitLab](../feature_flags/index.md).
## API
Here is a list of must-have items. Use them in the exact order that appears
......
......@@ -10,3 +10,6 @@ Before using feature flags for GitLab's development, read through the following:
- [Process for using features flags](process.md).
- [Developing with feature flags](development.md).
- [Controlling feature flags](controls.md).
When documenting feature flags, see [Feature flags](../documentation/styleguide.md#feature-flags)
in the Documentation Style Guide.
......@@ -311,6 +311,45 @@ Developer documentation][mdn].
[mdn]: https://developer.mozilla.org/en-US/docs/Mozilla/Localization/Localization_content_best_practices#Splitting
##### Vue components interpolation
When translating UI text in Vue components, you might want to include child components inside
the translation string.
You could not use a JavaScript-only solution to render the translation,
because Vue would not be aware of the child components and would render them as plain text.
For this use case, you should use the `gl-sprintf` component which is maintained
in **GitLab UI**.
The `gl-sprintf` component accepts a `message` property, which is the translatable string,
and it exposes a named slot for every placeholder in the string, which lets you include Vue
components easily.
Assume you want to print the translatable string
`Pipeline %{pipelineId} triggered %{timeago} by %{author}`. To replace the `%{timeago}` and
`%{author}` placeholders with Vue components, here's how you would do that with `gl-sprintf`:
```html
<template>
<div>
<gl-sprintf :message="__('Pipeline %{pipelineId} triggered %{timeago} by %{author}')">
<template #pipelineId>{{ pipeline.id }}</template>
<template #timeago>
<timeago :time="pipeline.triggerTime" />
</template>
<template #author>
<gl-avatar-labeled
:src="pipeline.triggeredBy.avatarPath"
:label="pipeline.triggeredBy.name"
/>
</template>
</gl-sprintf>
</div>
</template>
```
For more information, see the [`gl-sprintf`](https://gitlab-org.gitlab.io/gitlab-ui/?path=/story/base-sprintf--default) documentation.
## Updating the PO files with the new content
Now that the new content is marked for translation, we need to update
......
......@@ -52,7 +52,7 @@ describe 'Projects > Snippets > Create Snippet', :js do
expect(link).to match(%r{/#{Regexp.escape(project.full_path) }/uploads/\h{32}/banana_sample\.gif\z})
end
it 'creates a snippet when all reuiqred fields are filled in after validation failing' do
it 'creates a snippet when all required fields are filled in after validation failing' do
fill_in 'project_snippet_title', with: 'My Snippet Title'
click_button('Create snippet')
......
......@@ -152,6 +152,22 @@ describe Gitlab::Ci::CronParser do
end
end
end
context 'when time crosses a Daylight Savings boundary' do
let(:cron) { '* 0 1 12 *'}
# Note this previously only failed if the time zone is set
# to a zone that observes Daylight Savings
# (e.g. America/Chicago) at the start of the test. Stubbing
# TZ doesn't appear to be enough.
it 'generates day without TZInfo::AmbiguousTime error' do
Timecop.freeze(Time.utc(2020, 1, 1)) do
expect(subject.year).to eq(2020)
expect(subject.month).to eq(12)
expect(subject.day).to eq(1)
end
end
end
end
end
end
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::AfterExportStrategies::BaseAfterExportStrategy do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::AfterExportStrategies::WebUploadStrategy do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::AfterExportStrategyBuilder do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::AttributeCleaner do
......
# frozen_string_literal: true
require 'spec_helper'
# Part of the test security suite for the Import/Export feature
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::AvatarRestorer do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::AvatarSaver do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::FastHashSerializer do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::FileImporter do
......
# frozen_string_literal: true
require 'spec_helper'
describe 'forked project import' do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::GroupProjectObjectBuilder do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::HashUtil do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::Importer do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::LfsRestorer do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::LfsSaver do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::MembersMapper do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::MergeRequestParser do
......
# frozen_string_literal: true
require 'spec_helper'
# Part of the test security suite for the Import/Export feature
......
# frozen_string_literal: true
require 'spec_helper'
include ImportExport::CommonUtil
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::ProjectTreeSaver do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::Reader do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::RelationFactory do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::RepoRestorer do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::RepoSaver do
......
# frozen_string_literal: true
require 'spec_helper'
require 'fileutils'
......
# frozen_string_literal: true
require 'spec_helper'
require 'fileutils'
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::UploadsManager do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::UploadsRestorer do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::UploadsSaver do
......
# frozen_string_literal: true
require 'spec_helper'
include ImportExport::CommonUtil
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::WikiRepoSaver do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::ImportExport::WikiRestorer do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Kubernetes::ConfigMap do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Kubernetes::Helm::Api do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Kubernetes::Helm::BaseCommand do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Kubernetes::Helm::InitCommand do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Kubernetes::Helm::InstallCommand do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Kubernetes::Helm::Pod do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Kubernetes::Namespace do
......
# frozen_string_literal: true
require 'spec_helper'
describe Gitlab::Middleware::Go do
......@@ -25,7 +27,7 @@ describe Gitlab::Middleware::Go do
describe 'when go-get=1' do
before do
env['QUERY_STRING'] = 'go-get=1'
env['PATH_INFO'] = "/#{path}"
env['PATH_INFO'] = +"/#{path}"
end
shared_examples 'go-get=1' do |enabled_protocol:|
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册