Skip to content
Snippets Groups Projects
Commit 5ee120f4 authored by GitLab Bot's avatar GitLab Bot
Browse files

Add latest changes from gitlab-org/gitlab@master

parent 72721699
No related branches found
No related tags found
No related merge requests found
Showing
with 136 additions and 38 deletions
Loading
Loading
@@ -25,7 +25,7 @@ GET /projects/:id/repository/files/:file_path
```
 
```shell
curl --request GET --header 'PRIVATE-TOKEN: <your_access_token>' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb?ref=master'
curl --header 'PRIVATE-TOKEN: <your_access_token>' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb?ref=master'
```
 
Example response:
Loading
Loading
@@ -89,7 +89,7 @@ GET /projects/:id/repository/files/:file_path/blame
```
 
```shell
curl --request GET --header 'PRIVATE-TOKEN: <your_access_token>' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/path%2Fto%2Ffile.rb/blame?ref=master'
curl --header 'PRIVATE-TOKEN: <your_access_token>' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/path%2Fto%2Ffile.rb/blame?ref=master'
```
 
Example response:
Loading
Loading
@@ -156,7 +156,7 @@ GET /projects/:id/repository/files/:file_path/raw
```
 
```shell
curl --request GET --header 'PRIVATE-TOKEN: <your_access_token>' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb/raw?ref=master'
curl --header 'PRIVATE-TOKEN: <your_access_token>' 'https://gitlab.example.com/api/v4/projects/13083/repository/files/app%2Fmodels%2Fkey%2Erb/raw?ref=master'
```
 
Parameters:
Loading
Loading
Loading
Loading
@@ -65,7 +65,7 @@ GET /projects/:id/issues/:issue_iid/resource_label_events
```
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events
```
 
### Get single issue label event
Loading
Loading
@@ -85,7 +85,7 @@ Parameters:
| `resource_label_event_id` | integer | yes | The ID of a label event |
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events/1
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/issues/11/resource_label_events/1
```
 
## Epics **(ULTIMATE)**
Loading
Loading
@@ -151,7 +151,7 @@ GET /groups/:id/epics/:epic_id/resource_label_events
```
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/11/resource_label_events
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/1/epics/11/resource_label_events
```
 
### Get single epic label event
Loading
Loading
@@ -237,7 +237,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/resource_label_events
```
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/resource_label_events
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/5/merge_requests/11/resource_label_events
```
 
### Get single merge request label event
Loading
Loading
Loading
Loading
@@ -26,7 +26,7 @@ The response depends on the requested scope.
### Scope: projects
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=projects&search=flight
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=projects&search=flight
```
 
Example response:
Loading
Loading
@@ -57,7 +57,7 @@ Example response:
### Scope: issues
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=issues&search=file
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=issues&search=file
```
 
Example response:
Loading
Loading
@@ -122,7 +122,7 @@ Example response:
### Scope: merge_requests
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=merge_requests&search=file
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=merge_requests&search=file
```
 
Example response:
Loading
Loading
@@ -200,7 +200,7 @@ Example response:
### Scope: milestones
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=milestones&search=release
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=milestones&search=release
```
 
Example response:
Loading
Loading
@@ -225,7 +225,7 @@ Example response:
### Scope: snippet_titles
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=snippet_titles&search=sample
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=snippet_titles&search=sample
```
 
Example response:
Loading
Loading
@@ -256,7 +256,7 @@ Example response:
### Scope: snippet_blobs
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=snippet_blobs&search=test
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=snippet_blobs&search=test
```
 
Example response:
Loading
Loading
@@ -289,7 +289,7 @@ Example response:
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=wiki_blobs&search=bye
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=wiki_blobs&search=bye
```
 
Example response:
Loading
Loading
@@ -317,7 +317,7 @@ Example response:
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=commits&search=bye
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=commits&search=bye
```
 
Example response:
Loading
Loading
@@ -360,7 +360,7 @@ to use a filter simply include it in your query like so: `a query filename:some_
You may use wildcards (`*`) to use glob matching.
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=blobs&search=installation
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=blobs&search=installation
```
 
Example response:
Loading
Loading
@@ -386,7 +386,7 @@ Example response:
### Scope: users
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=users&search=doe
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/search?scope=users&search=doe
```
 
Example response:
Loading
Loading
@@ -429,7 +429,7 @@ The response depends on the requested scope.
### Scope: projects
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=projects&search=flight
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=projects&search=flight
```
 
Example response:
Loading
Loading
@@ -460,7 +460,7 @@ Example response:
### Scope: issues
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=issues&search=file
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=issues&search=file
```
 
Example response:
Loading
Loading
@@ -525,7 +525,7 @@ Example response:
### Scope: merge_requests
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=merge_requests&search=file
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=merge_requests&search=file
```
 
Example response:
Loading
Loading
@@ -603,7 +603,7 @@ Example response:
### Scope: milestones
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=milestones&search=release
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=milestones&search=release
```
 
Example response:
Loading
Loading
@@ -630,7 +630,7 @@ Example response:
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/6/search?scope=wiki_blobs&search=bye
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/6/search?scope=wiki_blobs&search=bye
```
 
Example response:
Loading
Loading
@@ -658,7 +658,7 @@ Example response:
This scope is available only if [Elasticsearch](../integration/elasticsearch.md) is enabled.
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/6/search?scope=commits&search=bye
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/6/search?scope=commits&search=bye
```
 
Example response:
Loading
Loading
@@ -701,7 +701,7 @@ to use a filter simply include it in your query like so: `a query filename:some_
You may use wildcards (`*`) to use glob matching.
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/6/search?scope=blobs&search=installation
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/6/search?scope=blobs&search=installation
```
 
Example response:
Loading
Loading
@@ -727,7 +727,7 @@ Example response:
### Scope: users
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=users&search=doe
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/groups/3/search?scope=users&search=doe
```
 
Example response:
Loading
Loading
@@ -769,7 +769,7 @@ The response depends on the requested scope.
### Scope: issues
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/12/search?scope=issues&search=file
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/12/search?scope=issues&search=file
```
 
Example response:
Loading
Loading
@@ -834,7 +834,7 @@ Example response:
### Scope: merge_requests
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=merge_requests&search=file
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=merge_requests&search=file
```
 
Example response:
Loading
Loading
@@ -912,7 +912,7 @@ Example response:
### Scope: milestones
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/12/search?scope=milestones&search=release
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/12/search?scope=milestones&search=release
```
 
Example response:
Loading
Loading
@@ -937,7 +937,7 @@ Example response:
### Scope: notes
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=notes&search=maxime
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=notes&search=maxime
```
 
Example response:
Loading
Loading
@@ -986,7 +986,7 @@ results:
times in the content.
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=wiki_blobs&search=bye
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=wiki_blobs&search=bye
```
 
Example response:
Loading
Loading
@@ -1012,7 +1012,7 @@ Example response:
### Scope: commits
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=commits&search=bye
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=commits&search=bye
```
 
Example response:
Loading
Loading
@@ -1059,7 +1059,7 @@ Blobs searches are performed on both filenames and contents. Search results:
times in the content.
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=blobs&search=installation&ref=feature
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=blobs&search=installation&ref=feature
```
 
Example response:
Loading
Loading
@@ -1085,7 +1085,7 @@ Example response:
### Scope: users
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=users&search=doe
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/projects/6/search?scope=users&search=doe
```
 
Example response:
Loading
Loading
Loading
Loading
@@ -367,7 +367,7 @@ GET /snippets/:id/user_agent_detail
Example request:
 
```shell
curl --request GET --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/snippets/1/user_agent_detail
curl --header "PRIVATE-TOKEN: <your_access_token>" https://gitlab.example.com/api/v4/snippets/1/user_agent_detail
```
 
Example response:
Loading
Loading
Loading
Loading
@@ -30,7 +30,7 @@ To use GitLab CI/CD with a Bitbucket Cloud repository:
using the Personal Access Token we just generated for authentication.
 
```text
https://gitlab.com/api/v4/projects/<NAMESPACE>%2F<PROJECT>/mirror/pull?private_token=<PERSONAL_ACCESS_TOKEN>
https://gitlab.com/api/v4/projects/<PROJECT_ID>/mirror/pull?private_token=<PERSONAL_ACCESS_TOKEN>
```
 
The web hook Trigger should be set to 'Repository Push'.
Loading
Loading
Loading
Loading
@@ -249,6 +249,9 @@ curl --request POST \
https://gitlab.example.com/api/v4/projects/9/trigger/pipeline
```
 
Trigger variables have the [highest priority](../variables/README.md#priority-of-environment-variables)
of all types of variables.
## Using cron to trigger nightly pipelines
 
>**Note:**
Loading
Loading
doc/user/project/issues/img/related_issue_block_v12_8.png

115 KiB

doc/user/project/issues/img/related_issues_add.png

12.6 KiB

doc/user/project/issues/img/related_issues_add_v12_8.png

103 KiB

doc/user/project/issues/img/related_issues_remove.png

5.32 KiB

doc/user/project/issues/img/related_issues_remove_v12_8.png

35.2 KiB

Loading
Loading
@@ -14,6 +14,12 @@ You can relate one issue to another by clicking the related issues "+" button
in the header of the related issue block. Then, input the issue reference number
or paste in the full URL of the issue.
 
> [Introduced](https://gitlab.com/gitlab-org/gitlab/issues/2035) in GitLab 12.8.
Additionally, you can select whether the current issue relates to, blocks, or is blocked by the issues being entered.
![Adding a related issue](img/related_issues_add_v12_8.png)
Issues of the same project can be specified just by the reference number.
Issues from a different project require additional information like the
group and the project name. For example:
Loading
Loading
@@ -23,9 +29,12 @@ group and the project name. For example:
- different group: `group/project#44`
 
Valid references will be added to a temporary list that you can review.
When ready, click the green "Add related issues" button to submit.
When you have added all the related issues, click **Add** to submit.
Once you have finished adding all related issues, you will be able to see
them categorized so their relationships can be better understood visually.
 
![Adding a related issue](img/related_issues_add.png)
![Related issue block](img/related_issue_block_v12_8.png)
 
## Removing a related issue
 
Loading
Loading
@@ -33,7 +42,7 @@ In the related issues block, click the "x" icon on the right-side of each issue
token that you wish to remove. Due to the bi-directional relationship, it
will no longer appear in either issue.
 
![Removing a related issue](img/related_issues_remove.png)
![Removing a related issue](img/related_issues_remove_v12_8.png)
 
Please access our [permissions](../../permissions.md) page for more information.
 
Loading
Loading
Loading
Loading
@@ -91,6 +91,8 @@ module Gitlab
end
 
def create_environment(result)
return success(result) if result[:project].environments.exists?
environment = ::Environment.new(project_id: result[:project].id, name: 'production')
 
if environment.save
Loading
Loading
# frozen_string_literal: true
require 'spec_helper'
RSpec.describe Oauth::TokenInfoController do
describe '#show' do
context 'when the user is not authenticated' do
it 'responds with a 401' do
get :show
expect(response.status).to eq 401
expect(JSON.parse(response.body)).to include('error' => 'invalid_request')
end
end
context 'when the request is valid' do
let(:application) { create(:oauth_application, scopes: 'api') }
let(:access_token) do
create(:oauth_access_token, expires_in: 5.minutes, application: application)
end
it 'responds with the token info' do
get :show, params: { access_token: access_token.token }
expect(response.status).to eq 200
expect(JSON.parse(response.body)).to eq(
'scope' => %w[api],
'scopes' => %w[api],
'created_at' => access_token.created_at.to_i,
'expires_in' => access_token.expires_in,
'application' => { 'uid' => application.uid },
'resource_owner_id' => access_token.resource_owner_id,
'expires_in_seconds' => access_token.expires_in
)
end
end
context 'when the doorkeeper_token is not recognised' do
it 'responds with a 401' do
get :show, params: { access_token: 'unknown_token' }
expect(response.status).to eq 401
expect(JSON.parse(response.body)).to include('error' => 'invalid_request')
end
end
context 'when the token is expired' do
let(:access_token) do
create(:oauth_access_token, created_at: 2.days.ago, expires_in: 10.minutes)
end
it 'responds with a 401' do
get :show, params: { access_token: access_token.token }
expect(response.status).to eq 401
expect(JSON.parse(response.body)).to include('error' => 'invalid_request')
end
end
context 'when the token is revoked' do
let(:access_token) { create(:oauth_access_token, revoked_at: 2.days.ago) }
it 'responds with a 401' do
get :show, params: { access_token: access_token.token }
expect(response.status).to eq 401
expect(JSON.parse(response.body)).to include('error' => 'invalid_request')
end
end
end
end
Loading
Loading
@@ -3,6 +3,7 @@ import { setTestTimeout } from 'helpers/timeout';
import { GlLink } from '@gitlab/ui';
import { GlAreaChart, GlLineChart, GlChartSeriesLabel } from '@gitlab/ui/dist/charts';
import { shallowWrapperContainsSlotText } from 'helpers/vue_test_utils_helper';
import { chartColorValues } from '~/monitoring/constants';
import { createStore } from '~/monitoring/stores';
import TimeSeries from '~/monitoring/components/charts/time_series.vue';
import * as types from '~/monitoring/stores/mutation_types';
Loading
Loading
@@ -315,6 +316,10 @@ describe('Time series component', () => {
it('formats line width correctly', () => {
expect(chartData[0].lineStyle.width).toBe(2);
});
it('formats line color correctly', () => {
expect(chartData[0].lineStyle.color).toBe(chartColorValues[0]);
});
});
 
describe('chartOptions', () => {
Loading
Loading
Loading
Loading
@@ -76,6 +76,14 @@ describe Gitlab::DatabaseImporters::SelfMonitoring::Project::CreateService do
 
it_behaves_like 'has prometheus service', 'http://localhost:9090'
 
it 'is idempotent' do
result1 = subject.execute
expect(result1[:status]).to eq(:success)
result2 = subject.execute
expect(result2[:status]).to eq(:success)
end
it "tracks successful install" do
expect(::Gitlab::Tracking).to receive(:event).twice
expect(::Gitlab::Tracking).to receive(:event).with('self_monitoring', 'project_created')
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment