Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
bf5cf27dfb
commit
bd02c91f73
|
@ -7,6 +7,8 @@
|
|||
*.rake @gitlab-org/maintainers/rails-backend
|
||||
|
||||
[Documentation Directories]
|
||||
.markdownlint.yml @marcel.amirault @eread @aqualls @cnorris
|
||||
/doc/.markdownlint @marcel.amirault @eread @aqualls @cnorris
|
||||
/doc/ @gl-docsteam
|
||||
/doc/.vale/ @marcel.amirault @eread @aqualls @cnorris
|
||||
/doc/administration/geo/ @axil
|
||||
|
|
|
@ -12,11 +12,24 @@ export default {
|
|||
ReportSection,
|
||||
},
|
||||
props: {
|
||||
headPath: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
headBlobPath: {
|
||||
type: String,
|
||||
required: true,
|
||||
},
|
||||
basePath: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
baseBlobPath: {
|
||||
type: String,
|
||||
required: false,
|
||||
default: null,
|
||||
},
|
||||
codequalityReportsPath: {
|
||||
type: String,
|
||||
required: false,
|
||||
|
@ -40,6 +53,9 @@ export default {
|
|||
created() {
|
||||
this.setPaths({
|
||||
basePath: this.basePath,
|
||||
headPath: this.headPath,
|
||||
baseBlobPath: this.baseBlobPath,
|
||||
headBlobPath: this.headBlobPath,
|
||||
reportsPath: this.codequalityReportsPath,
|
||||
helpPath: this.codequalityHelpPath,
|
||||
});
|
||||
|
|
|
@ -3,6 +3,9 @@ import * as types from './mutation_types';
|
|||
export default {
|
||||
[types.SET_PATHS](state, paths) {
|
||||
state.basePath = paths.basePath;
|
||||
state.headPath = paths.headPath;
|
||||
state.baseBlobPath = paths.baseBlobPath;
|
||||
state.headBlobPath = paths.headBlobPath;
|
||||
state.reportsPath = paths.reportsPath;
|
||||
state.helpPath = paths.helpPath;
|
||||
},
|
||||
|
|
|
@ -497,6 +497,9 @@ export default {
|
|||
<grouped-codequality-reports-app
|
||||
v-if="shouldRenderCodeQuality"
|
||||
:base-path="mr.codeclimate.base_path"
|
||||
:head-path="mr.codeclimate.head_path"
|
||||
:head-blob-path="mr.headBlobPath"
|
||||
:base-blob-path="mr.baseBlobPath"
|
||||
:codequality-reports-path="mr.codequalityReportsPath"
|
||||
:codequality-help-path="mr.codequalityHelpPath"
|
||||
/>
|
||||
|
|
|
@ -9548,6 +9548,8 @@ Returns [`VulnerabilitySeveritiesCount`](#vulnerabilityseveritiescount).
|
|||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="groupvulnerabilityseveritiescounthasissues"></a>`hasIssues` | [`Boolean`](#boolean) | Filter vulnerabilities that do or do not have issues. |
|
||||
| <a id="groupvulnerabilityseveritiescounthasresolution"></a>`hasResolution` | [`Boolean`](#boolean) | Filter vulnerabilities that do or do not have a resolution. |
|
||||
| <a id="groupvulnerabilityseveritiescountprojectid"></a>`projectId` | [`[ID!]`](#id) | Filter vulnerabilities by project. |
|
||||
| <a id="groupvulnerabilityseveritiescountreporttype"></a>`reportType` | [`[VulnerabilityReportType!]`](#vulnerabilityreporttype) | Filter vulnerabilities by report type. |
|
||||
| <a id="groupvulnerabilityseveritiescountscanner"></a>`scanner` | [`[String!]`](#string) | Filter vulnerabilities by scanner. |
|
||||
|
@ -9717,6 +9719,8 @@ Returns [`VulnerabilitySeveritiesCount`](#vulnerabilityseveritiescount).
|
|||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="instancesecuritydashboardvulnerabilityseveritiescounthasissues"></a>`hasIssues` | [`Boolean`](#boolean) | Filter vulnerabilities that do or do not have issues. |
|
||||
| <a id="instancesecuritydashboardvulnerabilityseveritiescounthasresolution"></a>`hasResolution` | [`Boolean`](#boolean) | Filter vulnerabilities that do or do not have a resolution. |
|
||||
| <a id="instancesecuritydashboardvulnerabilityseveritiescountprojectid"></a>`projectId` | [`[ID!]`](#id) | Filter vulnerabilities by project. |
|
||||
| <a id="instancesecuritydashboardvulnerabilityseveritiescountreporttype"></a>`reportType` | [`[VulnerabilityReportType!]`](#vulnerabilityreporttype) | Filter vulnerabilities by report type. |
|
||||
| <a id="instancesecuritydashboardvulnerabilityseveritiescountscanner"></a>`scanner` | [`[String!]`](#string) | Filter vulnerabilities by scanner. |
|
||||
|
@ -11954,6 +11958,8 @@ Returns [`VulnerabilitySeveritiesCount`](#vulnerabilityseveritiescount).
|
|||
|
||||
| Name | Type | Description |
|
||||
| ---- | ---- | ----------- |
|
||||
| <a id="projectvulnerabilityseveritiescounthasissues"></a>`hasIssues` | [`Boolean`](#boolean) | Filter vulnerabilities that do or do not have issues. |
|
||||
| <a id="projectvulnerabilityseveritiescounthasresolution"></a>`hasResolution` | [`Boolean`](#boolean) | Filter vulnerabilities that do or do not have a resolution. |
|
||||
| <a id="projectvulnerabilityseveritiescountprojectid"></a>`projectId` | [`[ID!]`](#id) | Filter vulnerabilities by project. |
|
||||
| <a id="projectvulnerabilityseveritiescountreporttype"></a>`reportType` | [`[VulnerabilityReportType!]`](#vulnerabilityreporttype) | Filter vulnerabilities by report type. |
|
||||
| <a id="projectvulnerabilityseveritiescountscanner"></a>`scanner` | [`[String!]`](#string) | Filter vulnerabilities by scanner. |
|
||||
|
|
|
@ -453,7 +453,6 @@ Parameters:
|
|||
| `twitter` | No | Twitter account |
|
||||
| `username` | Yes | Username |
|
||||
| `view_diffs_file_by_file` | No | Flag indicating the user sees only one file diff per page |
|
||||
| `show_whitespace_in_diffs` | No | Flag indicating the user sees whitespace changes in diffs
|
||||
| `website_url` | No | Website URL |
|
||||
|
||||
## User modification
|
||||
|
@ -694,6 +693,29 @@ Example response:
|
|||
}
|
||||
```
|
||||
|
||||
## Get user preferences
|
||||
|
||||
Get a list of currently authenticated user's preferences.
|
||||
|
||||
```plaintext
|
||||
GET /user/preferences
|
||||
```
|
||||
|
||||
Example response:
|
||||
|
||||
```json
|
||||
{
|
||||
"id": 1,
|
||||
"user_id": 1
|
||||
"view_diffs_file_by_file": true,
|
||||
"show_whitespace_in_diffs": false
|
||||
}
|
||||
```
|
||||
|
||||
Parameters:
|
||||
|
||||
- **none**
|
||||
|
||||
## User preference modification
|
||||
|
||||
Update the current user's preferences.
|
||||
|
@ -706,7 +728,8 @@ PUT /user/preferences
|
|||
{
|
||||
"id": 1,
|
||||
"user_id": 1
|
||||
"view_diffs_file_by_file": true
|
||||
"view_diffs_file_by_file": true,
|
||||
"show_whitespace_in_diffs": false
|
||||
}
|
||||
```
|
||||
|
||||
|
@ -715,6 +738,7 @@ Parameters:
|
|||
| Attribute | Required | Description |
|
||||
| :--------------------------- | :------- | :---------------------------------------------------------- |
|
||||
| `view_diffs_file_by_file` | Yes | Flag indicating the user sees only one file diff per page. |
|
||||
| `show_whitespace_in_diffs` | Yes | Flag indicating the user sees whitespace changes in diffs. |
|
||||
|
||||
## Set user status
|
||||
|
||||
|
|
|
@ -306,13 +306,6 @@ GitLab documentation should be clear and easy to understand.
|
|||
- Write in US English with US grammar. (Tested in [`British.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/British.yml).)
|
||||
- Use [inclusive language](#inclusive-language).
|
||||
|
||||
### Trademark
|
||||
|
||||
Only use the GitLab name and trademarks in accordance with
|
||||
[GitLab Brand Guidelines](https://about.gitlab.com/handbook/marketing/corporate-marketing/brand-activation/brand-guidelines/#trademark).
|
||||
|
||||
Don't use the possessive form of the word GitLab (`GitLab's`).
|
||||
|
||||
### Capitalization
|
||||
|
||||
#### Headings
|
||||
|
@ -508,7 +501,7 @@ especially in tutorials, instructional documentation, and
|
|||
|
||||
Some contractions, however, should be avoided:
|
||||
|
||||
- Do not use [the word GitLab in a contraction](#trademark).
|
||||
- Do not use the word "GitLab" in a contraction.
|
||||
|
||||
- Do not use contractions with a proper noun and a verb. For example:
|
||||
|
||||
|
|
|
@ -48,6 +48,10 @@ Do not use Latin abbreviations. Use **for example**, **such as**, **for instance
|
|||
|
||||
When possible, use present tense instead. For example, use `after you execute this command, GitLab displays the result` instead of `after you execute this command, GitLab will display the result`. ([Vale](../testing.md#vale) rule: [`FutureTense.yml`](https://gitlab.com/gitlab-org/gitlab/-/blob/master/doc/.vale/gitlab/FutureTense.yml))
|
||||
|
||||
## GitLab
|
||||
|
||||
Do not make possessive (GitLab's). This guidance follows [GitLab Brand Guidelines](https://about.gitlab.com/handbook/marketing/corporate-marketing/brand-activation/brand-guidelines/#trademark).
|
||||
|
||||
## handy
|
||||
|
||||
Do not use. If the user doesn't find the process to be these things, we lose their trust.
|
||||
|
|
|
@ -330,7 +330,18 @@ document:
|
|||
- To disable all Vale linting rules, add a `<!-- vale off -->` tag before the text, and a
|
||||
`<!-- vale on -->` tag after the text.
|
||||
|
||||
Whenever possible, exclude only the problematic rule and line(s).
|
||||
Whenever possible, exclude only the problematic rule and lines.
|
||||
|
||||
For more information, see
|
||||
[Vale's documentation](https://docs.errata.ai/vale/scoping#markup-based-configuration).
|
||||
|
||||
### Disable markdownlint tests
|
||||
|
||||
To disable all markdownlint rules, add a `<!-- markdownlint-disable -->` tag before the text, and a
|
||||
`<!-- markdownlint-enable -->` tag after the text.
|
||||
|
||||
To disable only a [specific rule](https://github.com/DavidAnson/markdownlint/blob/main/doc/Rules.md#rules),
|
||||
add the rule number to the tag, for example `<!-- markdownlint-disable MD044 -->`
|
||||
and `<!-- markdownlint-enable MD044 -->`.
|
||||
|
||||
Whenever possible, exclude only the problematic lines.
|
||||
|
|
|
@ -24,10 +24,10 @@ releases](#backporting-to-older-releases) for more information.
|
|||
GitLab uses [Semantic Versioning](https://semver.org/) for its releases:
|
||||
`(Major).(Minor).(Patch)`.
|
||||
|
||||
For example, for GitLab version 12.10.6:
|
||||
For example, for GitLab version 13.10.6:
|
||||
|
||||
- `12` represents the major version. The major release was 12.0.0 but often referred to as 12.0.
|
||||
- `10` represents the minor version. The minor release was 12.10.0 but often referred to as 12.10.
|
||||
- `13` represents the major version. The major release was 13.0.0 but often referred to as 13.0.
|
||||
- `10` represents the minor version. The minor release was 13.10.0 but often referred to as 13.10.
|
||||
- `6` represents the patch number.
|
||||
|
||||
Any part of the version number can increment into multiple digits, for example, 13.10.11.
|
||||
|
@ -55,13 +55,13 @@ one major version. For example, it is safe to:
|
|||
|
||||
- Upgrade the *minor* version. For example:
|
||||
|
||||
- `12.7.5` -> `12.10.5`
|
||||
- `11.3.4` -> `11.11.1`
|
||||
- `13.7.5` -> `13.10.5`
|
||||
- `12.3.4` -> `12.10.11`
|
||||
|
||||
- Upgrade the *patch* version. For example:
|
||||
|
||||
- `12.0.4` -> `12.0.12`
|
||||
- `11.11.1` -> `11.11.8`
|
||||
- `13.0.4` -> `13.0.12`
|
||||
- `12.10.1` -> `12.10.8`
|
||||
|
||||
NOTE:
|
||||
Version specific changes in Omnibus GitLab Linux packages can be found in [the Omnibus GitLab documentation](https://docs.gitlab.com/omnibus/update/README.html#version-specific-changes).
|
||||
|
@ -131,8 +131,8 @@ based on *all* of the following:
|
|||
|
||||
If *all* of the above are satisfied, the backport releases can be created for
|
||||
the current stable release, and two previous monthly releases. In rare cases a release manager may grant an exception to backport to more than two previous monthly releases.
|
||||
For instance, if we release `11.2.1` with a fix for a severe bug introduced in
|
||||
`11.0.0`, we could backport the fix to a new `11.0.x`, and `11.1.x` patch release.
|
||||
For instance, if we release `13.2.1` with a fix for a severe bug introduced in
|
||||
`13.0.0`, we could backport the fix to a new `13.0.x`, and `13.1.x` patch release.
|
||||
|
||||
To request backporting to more than one stable release for consideration, raise an issue in the
|
||||
[release/tasks](https://gitlab.com/gitlab-org/release/tasks/-/issues/new?issuable_template=Backporting-request) issue tracker.
|
||||
|
|
|
@ -1045,6 +1045,14 @@ module API
|
|||
end
|
||||
end
|
||||
|
||||
desc "Get the current user's preferences" do
|
||||
success Entities::UserPreferences
|
||||
detail 'This feature was introduced in GitLab 14.0.'
|
||||
end
|
||||
get "preferences", feature_category: :users do
|
||||
present current_user.user_preference, with: Entities::UserPreferences
|
||||
end
|
||||
|
||||
desc 'Get a single email address owned by the currently authenticated user' do
|
||||
success Entities::Email
|
||||
end
|
||||
|
|
|
@ -20,6 +20,9 @@ describe('Codequality Reports actions', () => {
|
|||
it('should commit SET_PATHS mutation', (done) => {
|
||||
const paths = {
|
||||
basePath: 'basePath',
|
||||
headPath: 'headPath',
|
||||
baseBlobPath: 'baseBlobPath',
|
||||
headBlobPath: 'headBlobPath',
|
||||
reportsPath: 'reportsPath',
|
||||
helpPath: 'codequalityHelpPath',
|
||||
};
|
||||
|
|
|
@ -13,16 +13,25 @@ describe('Codequality Reports mutations', () => {
|
|||
describe('SET_PATHS', () => {
|
||||
it('sets paths to given values', () => {
|
||||
const basePath = 'base.json';
|
||||
const headPath = 'head.json';
|
||||
const baseBlobPath = 'base/blob/path/';
|
||||
const headBlobPath = 'head/blob/path/';
|
||||
const reportsPath = 'reports.json';
|
||||
const helpPath = 'help.html';
|
||||
|
||||
mutations.SET_PATHS(localState, {
|
||||
basePath,
|
||||
headPath,
|
||||
baseBlobPath,
|
||||
headBlobPath,
|
||||
reportsPath,
|
||||
helpPath,
|
||||
});
|
||||
|
||||
expect(localState.basePath).toEqual(basePath);
|
||||
expect(localState.headPath).toEqual(headPath);
|
||||
expect(localState.baseBlobPath).toEqual(baseBlobPath);
|
||||
expect(localState.headBlobPath).toEqual(headBlobPath);
|
||||
expect(localState.reportsPath).toEqual(reportsPath);
|
||||
expect(localState.helpPath).toEqual(helpPath);
|
||||
});
|
||||
|
|
|
@ -2077,6 +2077,29 @@ RSpec.describe API::Users do
|
|||
it_behaves_like 'get user info', 'v4'
|
||||
end
|
||||
|
||||
describe "GET /user/preferences" do
|
||||
context "when unauthenticated" do
|
||||
it "returns authentication error" do
|
||||
get api("/user/preferences")
|
||||
expect(response).to have_gitlab_http_status(:unauthorized)
|
||||
end
|
||||
end
|
||||
|
||||
context "when authenticated" do
|
||||
it "returns user preferences" do
|
||||
user.user_preference.view_diffs_file_by_file = false
|
||||
user.user_preference.show_whitespace_in_diffs = true
|
||||
user.save!
|
||||
|
||||
get api("/user/preferences", user)
|
||||
|
||||
expect(response).to have_gitlab_http_status(:ok)
|
||||
expect(json_response["view_diffs_file_by_file"]).to eq(user.user_preference.view_diffs_file_by_file)
|
||||
expect(json_response["show_whitespace_in_diffs"]).to eq(user.user_preference.show_whitespace_in_diffs)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
describe "GET /user/keys" do
|
||||
context "when unauthenticated" do
|
||||
it "returns authentication error" do
|
||||
|
|
Loading…
Reference in New Issue