Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
0851c83c27
commit
9efbc1b6f8
|
@ -18,6 +18,10 @@ export const templateTypes = () => [
|
|||
name: __('Dockerfile'),
|
||||
key: 'dockerfiles',
|
||||
},
|
||||
{
|
||||
name: '.metrics-dashboard.yml',
|
||||
key: 'metrics_dashboard_ymls',
|
||||
},
|
||||
];
|
||||
|
||||
export const showFileTemplatesBar = (_, getters, rootState) => name =>
|
||||
|
|
|
@ -827,9 +827,40 @@ Using the Markdown extension is necessary for the [`/help`](index.md#gitlab-help
|
|||
### Links to external documentation
|
||||
|
||||
When describing interactions with external software, it's often helpful to include links to external
|
||||
documentation. When possible, make sure that you are linking to an **authoritative** source.
|
||||
documentation. When possible, make sure that you're linking to an [**authoritative** source](#authoritative-sources).
|
||||
For example, if you're describing a feature in Microsoft's Active Directory, include a link to official Microsoft documentation.
|
||||
|
||||
### Authoritative sources
|
||||
|
||||
When citing external information, use sources that are written by the people who created
|
||||
the item or product in question. These sources are the most likely to
|
||||
be accurate and remain up to date.
|
||||
|
||||
Examples of authoritative sources include:
|
||||
|
||||
- Specifications, such as a [Request for Comments](https://www.ietf.org/standards/rfcs/) document
|
||||
from the Internet Engineering Task Force.
|
||||
- Official documentation for a product. For example, if you're setting up an interface with the
|
||||
Google OAuth 2 authorization server, include a link to Google's documentation.
|
||||
- Official documentation for a project. For example, if you're citing NodeJS functionality,
|
||||
refer directly to [NodeJS documentation](https://nodejs.org/en/docs/).
|
||||
- Books from an authoritative publisher.
|
||||
|
||||
Examples of sources to avoid include:
|
||||
|
||||
- Personal blog posts.
|
||||
- Wikipedia.
|
||||
- Non-trustworthy articles.
|
||||
- Discussions on forums such as Stack Overflow.
|
||||
- Documentation from a company that describes another company's product.
|
||||
|
||||
While many of these sources to avoid can help you learn skills and or features, they can become
|
||||
obsolete quickly. Nobody is obliged to maintain any of these sites. Therefore, we should avoid using them as reference literature.
|
||||
|
||||
NOTE: **Note:**
|
||||
Non-authoritative sources are acceptable only if there is no equivalent authoritative source.
|
||||
Even then, focus on non-authoritative sources that are extensively cited or peer-reviewed.
|
||||
|
||||
### Links requiring permissions
|
||||
|
||||
Don't link directly to:
|
||||
|
|
|
@ -82,7 +82,7 @@ module Gitlab
|
|||
diff = floored_offset_hours - author.floored_offset_hours
|
||||
return "same timezone as `@#{author.username}`" if diff.zero?
|
||||
|
||||
ahead_or_behind = diff < 0 ? 'behind' : 'ahead'
|
||||
ahead_or_behind = diff < 0 ? 'behind' : 'ahead of'
|
||||
pluralized_hours = pluralize(diff.abs, 'hour', 'hours')
|
||||
|
||||
"#{pluralized_hours} #{ahead_or_behind} `@#{author.username}`"
|
||||
|
|
|
@ -5,7 +5,7 @@ import * as getters from '~/ide/stores/modules/file_templates/getters';
|
|||
describe('IDE file templates getters', () => {
|
||||
describe('templateTypes', () => {
|
||||
it('returns list of template types', () => {
|
||||
expect(getters.templateTypes().length).toBe(4);
|
||||
expect(getters.templateTypes().length).toBe(5);
|
||||
});
|
||||
});
|
||||
|
||||
|
|
|
@ -192,12 +192,12 @@ RSpec.describe Gitlab::Danger::Teammate do
|
|||
context 'when author is given' do
|
||||
where(:tz_offset_hours, :author_offset, :diff_text) do
|
||||
-12 | -10 | "2 hours behind `@mario`"
|
||||
-10 | -12 | "2 hours ahead `@mario`"
|
||||
-10 | -12 | "2 hours ahead of `@mario`"
|
||||
-10 | 2 | "12 hours behind `@mario`"
|
||||
2 | 4 | "2 hours behind `@mario`"
|
||||
4 | 2 | "2 hours ahead `@mario`"
|
||||
4 | 2 | "2 hours ahead of `@mario`"
|
||||
2 | 3 | "1 hour behind `@mario`"
|
||||
3 | 2 | "1 hour ahead `@mario`"
|
||||
3 | 2 | "1 hour ahead of `@mario`"
|
||||
2 | 2 | "same timezone as `@mario`"
|
||||
end
|
||||
|
||||
|
|
Loading…
Reference in New Issue