Commit 33029251 authored by Lin Jen-Shin's avatar Lin Jen-Shin

Merge remote-tracking branch 'upstream/master' into test-pg-mysql

* upstream/master: (90 commits)
  Fixed notebooklab code including file paths
  [BB Importer] Save the error trace and the whole raw document
  Statisfy Robertcop and Seancop
  Update documents according to:
  Update licenses.csv via:
  Update templates via:
  Add foreign key on trigger requests
  Added CHANGELOG
  Added tests and fixed a typo
  Fix typo on the class merge-when-pipeline_succeeds
  Axil's review
  remove unnecessary line
  typo
  fix typo
  fix links
  Remove an unused `cared` scope from Issue and MergeRequest
  Remove an unused `Issue.open_for` scope
  add topic: authentication
  Fix edit button on blame page without repo perms
  Don't show 'Copy content' button on text files that are not rendered as text
  ...
parents eeb89a60 d59f4898
...@@ -13,9 +13,11 @@ ...@@ -13,9 +13,11 @@
}, },
"plugins": [ "plugins": [
"filenames", "filenames",
"import" "import",
"html"
], ],
"settings": { "settings": {
"html/html-extensions": [".html", ".html.raw", ".vue"],
"import/resolver": { "import/resolver": {
"webpack": { "webpack": {
"config": "./config/webpack.config.js" "config": "./config/webpack.config.js"
......
...@@ -427,8 +427,7 @@ bundler:audit: ...@@ -427,8 +427,7 @@ bundler:audit:
script: script:
- git fetch origin v8.14.10 - git fetch origin v8.14.10
- git checkout -f FETCH_HEAD - git checkout -f FETCH_HEAD
- cp config/resque.yml.example config/resque.yml - bundle install --without production --jobs $(nproc) $FLAGS --retry=3
- sed -i 's/localhost/redis/g' config/resque.yml
- bundle install --without production --jobs $(nproc) $FLAGS --retry=3 - bundle install --without production --jobs $(nproc) $FLAGS --retry=3
- bundle exec rake db:drop db:create db:schema:load db:seed_fu - bundle exec rake db:drop db:create db:schema:load db:seed_fu
- git checkout $CI_COMMIT_SHA - git checkout $CI_COMMIT_SHA
......
...@@ -2,6 +2,12 @@ ...@@ -2,6 +2,12 @@
documentation](doc/development/changelog.md) for instructions on adding your own documentation](doc/development/changelog.md) for instructions on adding your own
entry. entry.
## 9.0.5 (2017-04-10)
- Add shortcuts and counters to MRs and issues in navbar.
- Disable invalid service templates.
- Handle SSH keys that have multiple spaces between each marker.
## 9.0.4 (2017-04-05) ## 9.0.4 (2017-04-05)
- Don’t show source project name when user does not have access. - Don’t show source project name when user does not have access.
......
...@@ -85,6 +85,7 @@ $(() => { ...@@ -85,6 +85,7 @@ $(() => {
if (list.type === 'closed') { if (list.type === 'closed') {
list.position = Infinity; list.position = Infinity;
list.label = { description: 'Shows all closed issues. Moving an issue to this list closes it' };
} }
}); });
......
...@@ -90,6 +90,8 @@ window.Build = (function () { ...@@ -90,6 +90,8 @@ window.Build = (function () {
success: ((log) => { success: ((log) => {
const $buildContainer = $('.js-build-output'); const $buildContainer = $('.js-build-output');
gl.utils.setCiStatusFavicon(`${this.pageUrl}/status.json`);
if (log.state) { if (log.state) {
this.state = log.state; this.state = log.state;
} }
......
...@@ -4,8 +4,8 @@ import PipelinesTableComponent from '../../vue_shared/components/pipelines_table ...@@ -4,8 +4,8 @@ import PipelinesTableComponent from '../../vue_shared/components/pipelines_table
import PipelinesService from '../../vue_pipelines_index/services/pipelines_service'; import PipelinesService from '../../vue_pipelines_index/services/pipelines_service';
import PipelineStore from '../../vue_pipelines_index/stores/pipelines_store'; import PipelineStore from '../../vue_pipelines_index/stores/pipelines_store';
import eventHub from '../../vue_pipelines_index/event_hub'; import eventHub from '../../vue_pipelines_index/event_hub';
import EmptyState from '../../vue_pipelines_index/components/empty_state'; import EmptyState from '../../vue_pipelines_index/components/empty_state.vue';
import ErrorState from '../../vue_pipelines_index/components/error_state'; import ErrorState from '../../vue_pipelines_index/components/error_state.vue';
import '../../lib/utils/common_utils'; import '../../lib/utils/common_utils';
import '../../vue_shared/vue_resource_interceptor'; import '../../vue_shared/vue_resource_interceptor';
import Poll from '../../lib/utils/poll'; import Poll from '../../lib/utils/poll';
......
<script>
/* eslint-disable no-new, no-alert */ /* eslint-disable no-new, no-alert */
/* global Flash */ /* global Flash */
import '~/flash'; import '~/flash';
...@@ -75,8 +76,10 @@ export default { ...@@ -75,8 +76,10 @@ export default {
}); });
}, },
}, },
};
</script>
template: ` <template>
<button <button
type="button" type="button"
@click="onClick" @click="onClick"
...@@ -85,9 +88,9 @@ export default { ...@@ -85,9 +88,9 @@ export default {
:aria-label="title" :aria-label="title"
data-container="body" data-container="body"
data-placement="top" data-placement="top"
:disabled="isLoading"> :disabled="isLoading"
<i :class="iconClass" aria-hidden="true"/> >
<i class="fa fa-spinner fa-spin" aria-hidden="true" v-if="isLoading" /> <i :class="iconClass" aria-hidden="true"></i>
<i class="fa fa-spinner fa-spin" aria-hidden="true" v-if="isLoading"></i>
</button> </button>
`, </template>
};
import pipelinesEmptyStateSVG from 'empty_states/icons/_pipelines_empty.svg';
export default {
props: {
helpPagePath: {
type: String,
required: true,
},
},
template: `
<div class="row empty-state">
<div class="col-xs-12">
<div class="svg-content">
${pipelinesEmptyStateSVG}
</div>
</div>
<div class="col-xs-12 text-center">
<div class="text-content">
<h4>Build with confidence</h4>
<p>
Continous Integration can help catch bugs by running your tests automatically,
while Continuous Deployment can help you deliver code to your product environment.
</p>
<a :href="helpPagePath" class="btn btn-info">
Get started with Pipelines
</a>
</div>
</div>
</div>
`,
};
<script>
import pipelinesEmptyStateSVG from 'empty_states/icons/_pipelines_empty.svg';
export default {
props: {
helpPagePath: {
type: String,
required: true,
},
},
data: () => ({ pipelinesEmptyStateSVG }),
};
</script>
<template>
<div class="row empty-state">
<div class="col-xs-12">
<div class="svg-content" v-html="pipelinesEmptyStateSVG" />
</div>
<div class="col-xs-12 text-center">
<div class="text-content">
<h4>Build with confidence</h4>
<p>
Continous Integration can help catch bugs by running your tests automatically,
while Continuous Deployment can help you deliver code to your product environment.
</p>
<a :href="helpPagePath" class="btn btn-info">
Get started with Pipelines
</a>
</div>
</div>
</div>
</template>
import pipelinesErrorStateSVG from 'empty_states/icons/_pipelines_failed.svg';
export default {
template: `
<div class="row empty-state js-pipelines-error-state">
<div class="col-xs-12">
<div class="svg-content">
${pipelinesErrorStateSVG}
</div>
</div>
<div class="col-xs-12 text-center">
<div class="text-content">
<h4>The API failed to fetch the pipelines.</h4>
</div>
</div>
</div>
`,
};
<script>
import pipelinesErrorStateSVG from 'empty_states/icons/_pipelines_failed.svg';
export default {
data: () => ({ pipelinesErrorStateSVG }),
};
</script>
<template>
<div class="row empty-state js-pipelines-error-state">
<div class="col-xs-12">
<div class="svg-content" v-html="pipelinesErrorStateSVG" />
</div>
<div class="col-xs-12 text-center">
<div class="text-content">
<h4>The API failed to fetch the pipelines.</h4>
</div>
</div>
</div>
</template>
...@@ -4,8 +4,8 @@ import PipelinesService from './services/pipelines_service'; ...@@ -4,8 +4,8 @@ import PipelinesService from './services/pipelines_service';
import eventHub from './event_hub'; import eventHub from './event_hub';
import PipelinesTableComponent from '../vue_shared/components/pipelines_table'; import PipelinesTableComponent from '../vue_shared/components/pipelines_table';
import TablePaginationComponent from '../vue_shared/components/table_pagination'; import TablePaginationComponent from '../vue_shared/components/table_pagination';
import EmptyState from './components/empty_state'; import EmptyState from './components/empty_state.vue';
import ErrorState from './components/error_state'; import ErrorState from './components/error_state.vue';
import NavigationTabs from './components/navigation_tabs'; import NavigationTabs from './components/navigation_tabs';
import NavigationControls from './components/nav_controls'; import NavigationControls from './components/nav_controls';
import Poll from '../lib/utils/poll'; import Poll from '../lib/utils/poll';
......
/* eslint-disable no-param-reassign */ /* eslint-disable no-param-reassign */
import AsyncButtonComponent from '../../vue_pipelines_index/components/async_button'; import AsyncButtonComponent from '../../vue_pipelines_index/components/async_button.vue';
import PipelinesActionsComponent from '../../vue_pipelines_index/components/pipelines_actions'; import PipelinesActionsComponent from '../../vue_pipelines_index/components/pipelines_actions';
import PipelinesArtifactsComponent from '../../vue_pipelines_index/components/pipelines_artifacts'; import PipelinesArtifactsComponent from '../../vue_pipelines_index/components/pipelines_artifacts';
import PipelinesStatusComponent from '../../vue_pipelines_index/components/status'; import PipelinesStatusComponent from '../../vue_pipelines_index/components/status';
......
...@@ -523,11 +523,12 @@ ...@@ -523,11 +523,12 @@
} }
.content-block { .content-block {
border-top: 1px solid $border-color;
padding: $gl-padding-top $gl-padding; padding: $gl-padding-top $gl-padding;
} }
.comments-disabled-notif { .comments-disabled-notif {
line-height: 28px;
.btn { .btn {
margin-left: 5px; margin-left: 5px;
} }
......
...@@ -61,7 +61,6 @@ class Projects::CompareController < Projects::ApplicationController ...@@ -61,7 +61,6 @@ class Projects::CompareController < Projects::ApplicationController
@environment = EnvironmentsFinder.new(@project, current_user, environment_params).execute.last @environment = EnvironmentsFinder.new(@project, current_user, environment_params).execute.last
@diff_notes_disabled = true @diff_notes_disabled = true
@grouped_diff_discussions = {}
end end
end end
......
...@@ -16,7 +16,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -16,7 +16,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
before_action :define_show_vars, only: [:show, :diffs, :commits, :conflicts, :conflict_for_path, :builds, :pipelines] before_action :define_show_vars, only: [:show, :diffs, :commits, :conflicts, :conflict_for_path, :builds, :pipelines]
before_action :define_widget_vars, only: [:merge, :cancel_merge_when_pipeline_succeeds, :merge_check] before_action :define_widget_vars, only: [:merge, :cancel_merge_when_pipeline_succeeds, :merge_check]
before_action :define_commit_vars, only: [:diffs] before_action :define_commit_vars, only: [:diffs]
before_action :define_diff_comment_vars, only: [:diffs]
before_action :ensure_ref_fetched, only: [:show, :diffs, :commits, :builds, :conflicts, :conflict_for_path, :pipelines] before_action :ensure_ref_fetched, only: [:show, :diffs, :commits, :builds, :conflicts, :conflict_for_path, :pipelines]
before_action :close_merge_request_without_source_project, only: [:show, :diffs, :commits, :builds, :pipelines] before_action :close_merge_request_without_source_project, only: [:show, :diffs, :commits, :builds, :pipelines]
before_action :apply_diff_view_cookie!, only: [:new_diffs] before_action :apply_diff_view_cookie!, only: [:new_diffs]
...@@ -101,34 +100,11 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -101,34 +100,11 @@ class Projects::MergeRequestsController < Projects::ApplicationController
respond_to do |format| respond_to do |format|
format.html { define_discussion_vars } format.html { define_discussion_vars }
format.json do format.json do
@merge_request_diff = define_diff_vars
if params[:diff_id] define_diff_comment_vars
@merge_request.merge_request_diffs.viewable.find(params[:diff_id])
else
@merge_request.merge_request_diff
end
@merge_request_diffs = @merge_request.merge_request_diffs.viewable.select_without_diff
@comparable_diffs = @merge_request_diffs.select { |diff| diff.id < @merge_request_diff.id }
if params[:start_sha].present?
@start_sha = params[:start_sha]
@start_version = @comparable_diffs.find { |diff| diff.head_commit_sha == @start_sha }
unless @start_version
@start_sha = @merge_request_diff.head_commit_sha
@start_version = @merge_request_diff
end
end
@environment = @merge_request.environments_for(current_user).last @environment = @merge_request.environments_for(current_user).last
if @start_sha
compared_diff_version
else
original_diff_version
end
render json: { html: view_to_html_string("projects/merge_requests/show/_diffs") } render json: { html: view_to_html_string("projects/merge_requests/show/_diffs") }
end end
end end
...@@ -140,16 +116,17 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -140,16 +116,17 @@ class Projects::MergeRequestsController < Projects::ApplicationController
def diff_for_path def diff_for_path
if params[:id] if params[:id]
merge_request merge_request
define_diff_vars
define_diff_comment_vars define_diff_comment_vars
else else
build_merge_request build_merge_request
@diffs = @merge_request.diffs(diff_options)
@diff_notes_disabled = true @diff_notes_disabled = true
@grouped_diff_discussions = {}
end end
define_commit_vars define_commit_vars
render_diff_for_path(@merge_request.diffs(diff_options)) render_diff_for_path(@diffs)
end end
def commits def commits
...@@ -586,15 +563,46 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -586,15 +563,46 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@base_commit = @merge_request.diff_base_commit || @merge_request.likely_diff_base_commit @base_commit = @merge_request.diff_base_commit || @merge_request.likely_diff_base_commit
end end
def define_diff_vars
@merge_request_diff =
if params[:diff_id]
@merge_request.merge_request_diffs.viewable.find(params[:diff_id])
else
@merge_request.merge_request_diff
end
@merge_request_diffs = @merge_request.merge_request_diffs.viewable.select_without_diff
@comparable_diffs = @merge_request_diffs.select { |diff| diff.id < @merge_request_diff.id }
if params[:start_sha].present?
@start_sha = params[:start_sha]
@start_version = @comparable_diffs.find { |diff| diff.head_commit_sha == @start_sha }
unless @start_version
@start_sha = @merge_request_diff.head_commit_sha
@start_version = @merge_request_diff
end
end
@diffs =
if @start_sha
@merge_request_diff.compare_with(@start_sha).diffs(diff_options)
else
@merge_request_diff.diffs(diff_options)
end
end
def define_diff_comment_vars def define_diff_comment_vars
@new_diff_note_attrs = { @new_diff_note_attrs = {
noteable_type: 'MergeRequest', noteable_type: 'MergeRequest',
noteable_id: @merge_request.id noteable_id: @merge_request.id
} }
@diff_notes_disabled = !@merge_request_diff.latest? || @start_sha
@use_legacy_diff_notes = !@merge_request.has_complete_diff_refs? @use_legacy_diff_notes = !@merge_request.has_complete_diff_refs?
@grouped_diff_discussions = @merge_request.grouped_diff_discussions @grouped_diff_discussions = @merge_request.grouped_diff_discussions(@merge_request_diff.diff_refs)
@notes = prepare_notes_for_rendering(@grouped_diff_discussions.values.flatten.flat_map(&:notes)) @notes = prepare_notes_for_rendering(@grouped_diff_discussions.values.flatten.flat_map(&:notes))
end end
...@@ -678,16 +686,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController ...@@ -678,16 +686,6 @@ class Projects::MergeRequestsController < Projects::ApplicationController
@merge_request = MergeRequests::BuildService.new(project, current_user, merge_request_params.merge(diff_options: diff_options)).execute @merge_request = MergeRequests::BuildService.new(project, current_user, merge_request_params.merge(diff_options: diff_options)).execute
end end
def compared_diff_version
@diff_notes_disabled = true
@diffs = @merge_request_diff.compare_with(@start_sha).diffs(diff_options)
end
def original_diff_version
@diff_notes_disabled = !@merge_request_diff.latest?
@diffs = @merge_request_diff.diffs(diff_options)
end
def close_merge_request_without_source_project def close_merge_request_without_source_project
if !@merge_request.source_project && @merge_request.open? if !@merge_request.source_project && @merge_request.open?
@merge_request.close @merge_request.close
......
...@@ -345,7 +345,11 @@ class ProjectsController < Projects::ApplicationController ...@@ -345,7 +345,11 @@ class ProjectsController < Projects::ApplicationController
end end
def project_view_files? def project_view_files?
current_user && current_user.project_view == 'files' if current_user
current_user.project_view == 'files'
else
project_view_files_allowed?
end
end end
# Override extract_ref from ExtractsPath, which returns the branch and file path # Override extract_ref from ExtractsPath, which returns the branch and file path
...@@ -359,4 +363,8 @@ class ProjectsController < Projects::ApplicationController ...@@ -359,4 +363,8 @@ class ProjectsController < Projects::ApplicationController
def get_id def get_id
project.repository.root_ref project.repository.root_ref
end end
def project_view_files_allowed?
!project.empty_repo? && can?(current_user, :download_code, project)
end
end end
...@@ -118,6 +118,10 @@ module BlobHelper ...@@ -118,6 +118,10 @@ module BlobHelper
blob && blob.text? && !blob.lfs_pointer? && !blob.only_display_raw? blob && blob.text? && !blob.lfs_pointer? && !blob.only_display_raw?
end end
def blob_rendered_as_text?(blob)
blob_text_viewable?(blob) && blob.to_partial_path(@project) == 'text'
end
def blob_size(blob) def blob_size(blob)
if blob.lfs_pointer? if blob.lfs_pointer?
blob.lfs_size blob.lfs_size
......
...@@ -62,6 +62,8 @@ module DiffHelper ...@@ -62,6 +62,8 @@ module DiffHelper
end end
def parallel_diff_discussions(left, right, diff_file) def parallel_diff_discussions(left, right, diff_file)
return unless @grouped_diff_discussions
discussions_left = discussions_right = nil discussions_left = discussions_right = nil
if left && (left.unchanged? || left.removed?) if left && (left.unchanged? || left.removed?)
......
...@@ -61,12 +61,23 @@ module NotesHelper ...@@ -61,12 +61,23 @@ module NotesHelper
end end
def discussion_diff_path(discussion) def discussion_diff_path(discussion)
return unless discussion.diff_discussion? if discussion.for_merge_request? && discussion.diff_discussion?
if discussion.active?
# Without a diff ID, the link always points to the latest diff version
diff_id = nil
elsif merge_request_diff = discussion.latest_merge_request_diff
diff_id = merge_request_diff.id
else
# If the discussion is not active, and we cannot find the latest
# merge request diff for this discussion, we return no path at all.
return
end
if discussion.for_merge_request? && discussion.active? diffs_namespace_project_merge_request_path(discussion.project.namespace, discussion.project, discussion.noteable, diff_id: diff_id, anchor: discussion.line_code)
diffs_namespace_project_merge_request_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: discussion.line_code)
elsif discussion.for_commit? elsif discussion.for_commit?
namespace_project_commit_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: discussion.line_code) anchor = discussion.line_code if discussion.diff_discussion?
namespace_project_commit_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: anchor)
end end
end end
end end
...@@ -63,6 +63,10 @@ module PreferencesHelper ...@@ -63,6 +63,10 @@ module PreferencesHelper
end end
def anonymous_project_view def anonymous_project_view
@project.empty_repo? || !can?(current_user, :download_code, @project) ? 'activity' : 'readme' if !@project.empty_repo? && can?(current_user, :download_code, @project)
'files'
else
'activity'
end
end end
end end
...@@ -42,12 +42,16 @@ class Blob < SimpleDelegator ...@@ -42,12 +42,16 @@ class Blob < SimpleDelegator
size && truncated? size && truncated?
end end
def extension
extname.downcase.delete('.')
end
def svg? def svg?
text? && language && language.name == 'SVG' text? && language && language.name == 'SVG'
end end
def pdf? def pdf?
name && File.extname(name) == '.pdf' extension == 'pdf'
end end
def ipython_notebook? def ipython_notebook?
...@@ -55,11 +59,15 @@ class Blob < SimpleDelegator ...@@ -55,11 +59,15 @@ class Blob < SimpleDelegator
end end
def sketch? def sketch?
binary? && extname.downcase.delete('.') == 'sketch' binary? && extension == 'sketch'
end end
def stl? def stl?
extname.downcase.delete('.') == 'stl' extension == 'stl'
end
def markup?
text? && Gitlab::MarkupHelper.markup?(name)
end end
def size_within_svg_limits? def size_within_svg_limits?
...@@ -77,8 +85,10 @@ class Blob < SimpleDelegator ...@@ -77,8 +85,10 @@ class Blob < SimpleDelegator
else else
'text' 'text'
end end
elsif image? || svg? elsif image?
'image' 'image'
elsif svg?
'svg'
elsif pdf? elsif pdf?
'pdf' 'pdf'
elsif ipython_notebook? elsif ipython_notebook?
...@@ -87,8 +97,18 @@ class Blob < SimpleDelegator ...@@ -87,8 +97,18 @@ class Blob < SimpleDelegator
'sketch' 'sketch'
elsif stl? elsif stl?
'stl' 'stl'
elsif markup?
if only_display_raw?
'too_large'
else
'markup'
end
elsif text? elsif text?
if only_display_raw?
'too_large'
else
'text' 'text'
end
else else
'download' 'download'
end end
......
...@@ -7,7 +7,7 @@ module Ci ...@@ -7,7 +7,7 @@ module Ci
belongs_to :project belongs_to :project
belongs_to :owner, class_name: "User" belongs_to :owner, class_name: "User"
has_many :trigger_requests, dependent: :destroy has_many :trigger_requests
has_one :trigger_schedule, dependent: :destroy has_one :trigger_schedule, dependent: :destroy
validates :token, presence: true, uniqueness: true validates :token, presence: true, uniqueness: true
......
...@@ -5,8 +5,6 @@ module DiscussionOnDiff ...@@ -5,8 +5,6 @@ module DiscussionOnDiff
included do included do
NUMBER_OF_TRUNCATED_DIFF_LINES = 16 NUMBER_OF_TRUNCATED_DIFF_LINES = 16
memoized_values << :active
delegate :line_code, delegate :line_code,
:original_line_code, :original_line_code,
:diff_file, :diff_file,
...@@ -29,12 +27,6 @@ module DiscussionOnDiff ...@@ -29,12 +27,6 @@ module DiscussionOnDiff
true true
end end
def active?
return @active if @active.present?
@active = first_note.active?
end
# Returns an array of at most 16 highlighted lines above a diff note # Returns an array of at most 16 highlighted lines above a diff note
def truncated_diff_lines(highlight: true) def truncated_diff_lines(highlight: true)
lines = highlight ? highlighted_diff_lines : diff_lines lines = highlight ? highlighted_diff_lines : diff_lines
......
...@@ -25,4 +25,18 @@ module NoteOnDiff ...@@ -25,4 +25,18 @@ module NoteOnDiff
def diff_attributes def diff_attributes
raise NotImplementedError raise NotImplementedError
end end
def active?(diff_refs = nil)
raise NotImplementedError
end
private
def noteable_diff_refs
if noteable.respond_to?(:diff_sha_refs)
noteable.diff_sha_refs
else
noteable.diff_refs
end
end
end end
...@@ -36,10 +36,10 @@ module Noteable ...@@ -36,10 +36,10 @@ module Noteable
.discussions(self) .discussions(self)
end end
def grouped_diff_discussions def grouped_diff_discussions(*args)
# Doesn't use `discussion_notes`, because this may include commit diff notes # Doesn't use `discussion_notes`, because this may include commit diff notes
# besides MR diff notes, that we do no want to display on the MR Changes tab. # besides MR diff notes, that we do no want to display on the MR Changes tab.
notes.inc_relations_for_view.grouped_diff_discussions notes.inc_relations_for_view.grouped_diff_discussions(*args)
end end
def resolvable_discussions def resolvable_discussions
......
...@@ -23,6 +23,10 @@ class ContainerRepository < ActiveRecord::Base ...@@ -23,6 +23,10 @@ class ContainerRepository < ActiveRecord::Base
@path ||= [project.full_path, name].select(&:present?).join('/') @path ||= [project.full_path, name].select(&:present?).join('/')
end end
def location
File.join(registry.path, path)
end
def tag(tag) def tag(tag)
ContainerRegistry::Tag.new(self, tag) ContainerRegistry::Tag.new(self, tag)
end end
......
...@@ -10,6 +10,7 @@ class DiffDiscussion < Discussion ...@@ -10,6 +10,7 @@ class DiffDiscussion < Discussion
delegate :position, delegate :position,
:original_position, :original_position,
:latest_merge_request_diff,
to: :first_note to: :first_note
......
...@@ -65,20 +65,18 @@ class DiffNote < Note ...@@ -65,20 +65,18 @@ class DiffNote < Note
self.position.diff_refs == diff_refs self.position.diff_refs == diff_refs
end end
def latest_merge_request_diff
return unless for_merge_request?
self.noteable.merge_request_diff_for(self.position.diff_refs)
end
private private
def supported? def supported?
for_commit? || self.noteable.has_complete_diff_refs? for_commit? || self.noteable.has_complete_diff_refs?
end end
def noteable_diff_refs
if noteable.respond_to?(:diff_sha_refs)
noteable.diff_sha_refs
else
noteable.diff_refs
end
end
def set_original_position def set_original_position
self.original_position = self.position.dup unless self.original_position&.complete? self.original_position = self.position.dup unless self.original_position&.complete?
end end
......
...@@ -26,8 +26,6 @@ class Issue < ActiveRecord::Base ...@@ -26,8 +26,6 @@ class Issue < ActiveRecord::Base
validates :project, presence: true validates :project, presence: true
scope :cared, ->(user) { where(assignee_id: user) }
scope :open_for, ->(user) { opened.assigned_to(user) }
scope :in_projects, ->(project_ids) { where(project_id: project_ids) } scope :in_projects, ->(project_ids) { where(project_id: project_ids) }
scope :without_due_date, -> { where(due_date: nil) } scope :without_due_date, -> { where(due_date: nil) }
......
...@@ -7,6 +7,8 @@ ...@@ -7,6 +7,8 @@
class LegacyDiffDiscussion < Discussion class LegacyDiffDiscussion < Discussion
include DiscussionOnDiff include DiscussionOnDiff
memoized_values << :active
def legacy_diff_discussion? def legacy_diff_discussion?
true true
end end
...@@ -15,6 +17,12 @@ class LegacyDiffDiscussion < Discussion ...@@ -15,6 +17,12 @@ class LegacyDiffDiscussion < Discussion
LegacyDiffNote LegacyDiffNote
end end
def active?(*args)
return @active if @active.present?
@active = first_note.active?(*args)
end
def collapsed? def collapsed?
!active? !active?
end end
......
...@@ -56,11 +56,12 @@ class LegacyDiffNote < Note ...@@ -56,11 +56,12 @@ class LegacyDiffNote < Note
# #
# If the note's current diff cannot be matched in the MergeRequest's current # If the note's current diff cannot be matched in the MergeRequest's current
# diff, it's considered inactive. # diff, it's considered inactive.
def active? def active?(diff_refs = nil)
return @active if defined?(@active) return @active if defined?(@active)
return true if for_commit? return true if for_commit?
return true unless diff_line return true unless diff_line
return false unless noteable return false unless noteable
return false if diff_refs && diff_refs != noteable_diff_refs
noteable_diff = find_noteable_diff noteable_diff = find_noteable_diff
......
...@@ -104,7 +104,6 @@ class MergeRequest < ActiveRecord::Base ...@@ -104,7 +104,6 @@ class MergeRequest < ActiveRecord::Base
scope :by_source_or_target_branch, ->(branch_name) do scope :by_source_or_target_branch, ->(branch_name) do
where("source_branch = :branch OR target_branch = :branch", branch: branch_name) where("source_branch = :branch OR target_branch = :branch", branch: branch_name)
end end
scope :cared, ->(user) { where('assignee_id = :user OR author_id = :user', user: user.id) }
scope :by_milestone, ->(milestone) { where(milestone_id: milestone) } scope :by_milestone, ->(milestone) { where(milestone_id: milestone) }
scope :of_projects, ->(ids) { where(target_project_id: ids) } scope :of_projects, ->(ids) { where(target_project_id: ids) }
scope :from_project, ->(project) { where(source_project_id: project.id) } scope :from_project, ->(project) { where(source_project_id: project.id) }
...@@ -367,6 +366,14 @@ class MergeRequest < ActiveRecord::Base ...@@ -367,6 +366,14 @@ class MergeRequest < ActiveRecord::Base
merge_request_diff(true) merge_request_diff(true)
end end
def merge_request_diff_for(diff_refs)
@merge_request_diffs_by_diff_refs ||= Hash.new do |h, diff_refs|
h[diff_refs] = merge_request_diffs.viewable.select_without_diff.find_by_diff_refs(diff_refs)
end
@merge_request_diffs_by_diff_refs[diff_refs]
end
def reload_diff_if_branch_changed def reload_diff_if_branch_changed
if source_branch_changed? || target_branch_changed? if source_branch_changed? || target_branch_changed?
reload_diff reload_diff
......
...@@ -31,6 +31,10 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -31,6 +31,10 @@ class MergeRequestDiff < ActiveRecord::Base
# It allows you to override variables like head_commit_sha before getting diff. # It allows you to override variables like head_commit_sha before getting diff.
after_create :save_git_content, unless: :importing? after_create :save_git_content, unless: :importing?
def self.find_by_diff_refs(diff_refs)
find_by(start_commit_sha: diff_refs.start_sha, head_commit_sha: diff_refs.head_sha, base_commit_sha: diff_refs.base_sha)
end
def self.select_without_diff def self.select_without_diff
select(column_names - ['st_diffs']) select(column_names - ['st_diffs'])
end end
...@@ -130,6 +134,12 @@ class MergeRequestDiff < ActiveRecord::Base ...@@ -130,6 +134,12 @@ class MergeRequestDiff < ActiveRecord::Base
st_commits.map { |commit| commit[:id] } st_commits.map { |commit| commit[:id] }
end end
def diff_refs=(new_diff_refs)
self.base_commit_sha = new_diff_refs&.base_sha
self.start_commit_sha = new_diff_refs&.start_sha
self.head_commit_sha = new_diff_refs&.head_sha
end
def diff_refs def diff_refs
return unless start_commit_sha || base_commit_sha return unless start_commit_sha || base_commit_sha
......
...@@ -113,11 +113,11 @@ class Note < ActiveRecord::Base ...@@ -113,11 +113,11 @@ class Note < ActiveRecord::Base
Discussion.build(notes) Discussion.build(notes)
end end
def grouped_diff_discussions def grouped_diff_discussions(diff_refs = nil)
diff_notes. diff_notes.
fresh. fresh.
discussions. discussions.
select(&:active?). select { |n| n.active?(diff_refs) }.
group_by(&:line_code) group_by(&:line_code)
end end
...@@ -140,6 +140,10 @@ class Note < ActiveRecord::Base ...@@ -140,6 +140,10 @@ class Note < ActiveRecord::Base
true true
end end
def latest_merge_request_diff
nil
end
def max_attachment_size def max_attachment_size
current_application_settings.max_attachment_size.megabytes.to_i current_application_settings.max_attachment_size.megabytes.to_i
end end
......
...@@ -407,8 +407,6 @@ class Repository ...@@ -407,8 +407,6 @@ class Repository
# Runs code after a repository has been forked/imported. # Runs code after a repository has been forked/imported.
def after_import def after_import
expire_content_cache expire_content_cache
expire_tags_cache
expire_branches_cache
end end
# Runs code after a new commit has been pushed. # Runs code after a new commit has been pushed.
......
...@@ -587,10 +587,6 @@ class User < ActiveRecord::Base ...@@ -587,10 +587,6 @@ class User < ActiveRecord::Base
name.split.first unless name.blank? name.split.first unless name.blank?
end end
def cared_merge_requests
MergeRequest.cared(self)
end
def projects_limit_left def projects_limit_left
projects_limit - personal_projects.count projects_limit - personal_projects.count
end end
......
...@@ -571,6 +571,7 @@ ...@@ -571,6 +571,7 @@
The multiplier can also have a decimal value. The multiplier can also have a decimal value.
The default value (1) is a reasonable choice for the majority of GitLab The default value (1) is a reasonable choice for the majority of GitLab
installations. Set to 0 to completely disable polling. installations. Set to 0 to completely disable polling.
= link_to icon('question-circle'), help_page_path('administration/polling')
.form-actions .form-actions
= f.submit 'Save', class: 'btn btn-save' = f.submit 'Save', class: 'btn btn-save'
...@@ -20,19 +20,20 @@ ...@@ -20,19 +20,20 @@
= discussion.author.to_reference = discussion.author.to_reference
started a discussion started a discussion
- url = discussion_diff_path(discussion)
- if discussion.for_commit? && @noteable != discussion.noteable - if discussion.for_commit? && @noteable != discussion.noteable
on on
- commit = discussion.noteable - commit = discussion.noteable
- if commit - if commit
commit commit
- anchor = discussion.line_code if discussion.diff_discussion? = link_to commit.short_id, url, class: 'monospace'
= link_to commit.short_id, namespace_project_commit_path(discussion.project.namespace, discussion.project, discussion.noteable, anchor: anchor), class: 'monospace'
- else - else
a deleted commit a deleted commit
- elsif discussion.diff_discussion? - elsif discussion.diff_discussion?
on on
= conditional_link_to url.present?, url do
- if discussion.active? - if discussion.active?
= link_to 'the diff', discussion_diff_path(discussion) the diff
- else - else
an outdated diff an outdated diff
......
%ul %ul
= nav_link(path: ['dashboard#show', 'root#show', 'projects#trending', 'projects#starred', 'projects#index'], html_options: {class: 'home'}) do = nav_link(path: ['dashboard#show', 'root#show', 'projects#trending', 'projects#starred', 'projects#index'], html_options: {class: 'home'}) do
= link_to explore_root_path, title: 'Projects' do = link_to explore_root_path, title: 'Projects', class: 'dashboard-shortcuts-projects' do
.shortcut-mappings
.key
= icon('arrow-up', 'aria-label' => 'hidden')
P
%span %span
Projects Projects
= nav_link(controller: [:groups, 'groups/milestones', 'groups/group_members']) do = nav_link(controller: [:groups, 'groups/milestones', 'groups/group_members']) do
= link_to explore_groups_path, title: 'Groups' do = link_to explore_groups_path, title: 'Groups', class: 'dashboard-shortcuts-groups' do
.shortcut-mappings
.key
= icon('arrow-up', 'aria-label' => 'hidden')
G
%span %span
Groups Groups
= nav_link(controller: :snippets) do = nav_link(controller: :snippets) do
= link_to explore_snippets_path, title: 'Snippets' do = link_to explore_snippets_path, title: 'Snippets', class: 'dashboard-shortcuts-snippets' do
.shortcut-mappings
.key
= icon('arrow-up', 'aria-label' => 'hidden')
S
%span %span
Snippets Snippets
%li.divider
= nav_link(controller: :help) do = nav_link(controller: :help) do
= link_to help_path, title: 'Help' do = link_to help_path, title: 'Help' do
%span %span
......
...@@ -2,7 +2,7 @@ ...@@ -2,7 +2,7 @@
Project #{@project.name} was exported successfully. Project #{@project.name} was exported successfully.
%p %p
The project export can be downloaded from: The project export can be downloaded from:
= link_to download_export_namespace_project_url(@project.namespace, @project), rel: 'nofollow', download: '', do = link_to download_export_namespace_project_url(@project.namespace, @project), rel: 'nofollow', download: '' do
= @project.name_with_namespace + " export" = @project.name_with_namespace + " export"
%p %p
The download link will expire in 24 hours. The download link will expire in 24 hours.
...@@ -25,11 +25,10 @@ ...@@ -25,11 +25,10 @@
#blob-content-holder.blob-content-holder #blob-content-holder.blob-content-holder
%article.file-holder %article.file-holder
= render "projects/blob/header", blob: blob = render "projects/blob/header", blob: blob
- if current_user
.js-file-fork-suggestion-section.file-fork-suggestion.hidden - if blob.empty?
%span.file-fork-suggestion-note .file-content.code
You don't have permission to edit this file. Try forking this project to edit the file. .nothing-here-block
= link_to 'Fork', fork_path, method: :post, class: 'btn btn-grouped btn-inverted btn-new' Empty file
%button.js-cancel-fork-suggestion.btn.btn-grouped{ type: 'button' } - else
Cancel
= render blob.to_partial_path(@project), blob: blob = render blob.to_partial_path(@project), blob: blob
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
.file-actions.hidden-xs .file-actions.hidden-xs
.btn-group{ role: "group" }< .btn-group{ role: "group" }<
= copy_blob_content_button(blob) if !blame && blob_text_viewable?(blob) = copy_blob_content_button(blob) if !blame && blob_rendered_as_text?(blob)
= open_raw_file_button(namespace_project_raw_path(@project.namespace, @project, @id)) = open_raw_file_button(namespace_project_raw_path(@project.namespace, @project, @id))
= view_on_environment_button(@commit.sha, @path, @environment) if @environment = view_on_environment_button(@commit.sha, @path, @environment) if @environment
...@@ -38,3 +38,10 @@ ...@@ -38,3 +38,10 @@
- if current_user - if current_user
= replace_blob_link = replace_blob_link
= delete_blob_link = delete_blob_link
- if current_user
.js-file-fork-suggestion-section.file-fork-suggestion.hidden
%span.file-fork-suggestion-note
You don't have permission to edit this file. Try forking this project to edit the file.
= link_to 'Fork', fork_path, method: :post, class: 'btn btn-grouped btn-inverted btn-new'
%button.js-cancel-fork-suggestion.btn.btn-grouped{ type: 'button' }
Cancel
.file-content.image_file .file-content.image_file
- if blob.svg? %img{ src: namespace_project_raw_path(@project.namespace, @project, @id), alt: blob.name }
- if blob.size_within_svg_limits?
-# We need to scrub SVG but we cannot do so in the RawController: it would
-# be wrong/strange if RawController modified the data.
- blob.load_all_data!(@repository)
- blob = sanitize_svg(blob)
%img{ src: "data:#{blob.mime_type};base64,#{Base64.encode64(blob.data)}", alt: "#{blob.name}" }
- else
.nothing-here-block
The SVG could not be displayed as it is too large, you can
#{link_to('view the raw file', namespace_project_raw_path(@project.namespace, @project, @id), target: '_blank', rel: 'noopener noreferrer')}
instead.
- else
%img{ src: namespace_project_raw_path(@project.namespace, @project, tree_join(@commit.id, blob.path)), alt: "#{blob.name}" }
- blob.load_all_data!(@repository)
.file-content.wiki
= render_markup(blob.name, blob.data)
- if blob.size_within_svg_limits?
-# We need to scrub SVG but we cannot do so in the RawController: it would
-# be wrong/strange if RawController modified the data.
- blob.load_all_data!(@repository)
- blob = sanitize_svg(blob)
.file-content.image_file
%img{ src: "data:#{blob.mime_type};base64,#{Base64.encode64(blob.data)}", alt: blob.name }
- else
= render 'too_large'
- if blob.only_display_raw? - blob.load_all_data!(@repository)
.file-content.code = render 'shared/file_highlight', blob: blob, repository: @repository
.nothing-here-block
File too large, you can
= succeed '.' do
= link_to 'view the raw file', namespace_project_raw_path(@project.namespace, @project, @id), target: '_blank', rel: 'noopener noreferrer'
- else
- blob.load_all_data!(@repository)
- if blob.empty?
.file-content.code
.nothing-here-block Empty file
- else
- if markup?(blob.name)
.file-content.wiki
= render_markup(blob.name, blob.data)
- else
= render 'shared/file_highlight', blob: blob, repository: @repository
.file-content.code
.nothing-here-block
The file could not be displayed as it is too large, you can
#{link_to('view the raw file', namespace_project_raw_path(@project.namespace, @project, @id), target: '_blank', rel: 'noopener noreferrer')}
instead.
...@@ -5,7 +5,6 @@ ...@@ -5,7 +5,6 @@
- left = line[:left] - left = line[:left]
- right = line[:right] - right = line[:right]
- last_line = right.new_pos if right - last_line = right.new_pos if right
- unless @diff_notes_disabled
- discussions_left, discussions_right = parallel_diff_discussions(left, right, diff_file) - discussions_left, discussions_right = parallel_diff_discussions(left, right, diff_file)
%tr.line_holder.parallel %tr.line_holder.parallel
- if left - if left
......
...@@ -4,11 +4,10 @@ ...@@ -4,11 +4,10 @@
%a.show-suppressed-diff.js-show-suppressed-diff Changes suppressed. Click to show. %a.show-suppressed-diff.js-show-suppressed-diff Changes suppressed. Click to show.
%table.text-file.code.js-syntax-highlight{ data: diff_view_data, class: too_big ? 'hide' : '' } %table.text-file.code.js-syntax-highlight{ data: diff_view_data, class: too_big ? 'hide' : '' }
- discussions = @grouped_diff_discussions unless @diff_notes_disabled
= render partial: "projects/diffs/line", = render partial: "projects/diffs/line",
collection: diff_file.highlighted_diff_lines, collection: diff_file.highlighted_diff_lines,
as: :line, as: :line,
locals: { diff_file: diff_file, discussions: discussions } locals: { diff_file: diff_file, discussions: @grouped_diff_discussions }
- if !diff_file.new_file && !diff_file.deleted_file && diff_file.highlighted_diff_lines.any? - if !diff_file.new_file && !diff_file.deleted_file && diff_file.highlighted_diff_lines.any?
- last_line = diff_file.highlighted_diff_lines.last - last_line = diff_file.highlighted_diff_lines.last
......
...@@ -72,13 +72,16 @@ ...@@ -72,13 +72,16 @@
= link_to namespace_project_compare_path(@project.namespace, @project, from: @start_version.base_commit_sha, to: @merge_request_diff.base_commit_sha) do = link_to namespace_project_compare_path(@project.namespace, @project, from: @start_version.base_commit_sha, to: @merge_request_diff.base_commit_sha) do
new commits new commits
from from
= succeed '.' do
%code= @merge_request.target_branch %code= @merge_request.target_branch
- unless @merge_request_diff.latest? && !@start_sha - if @diff_notes_disabled
.comments-disabled-notif.content-block .comments-disabled-notif.content-block
= icon('info-circle') = icon('info-circle')
- if @start_sha - if @start_sha
Comments are disabled because you're comparing two versions of this merge request. Comments are disabled because you're comparing two versions of this merge request.
- else - else
Comments are disabled because you're viewing an old version of this merge request. Discussions on this version of the merge request are displayed but comment creation is disabled.
.pull-right
= link_to 'Show latest version', diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn btn-sm' = link_to 'Show latest version', diffs_namespace_project_merge_request_path(@project.namespace, @project, @merge_request), class: 'btn btn-sm'
...@@ -18,7 +18,7 @@ ...@@ -18,7 +18,7 @@
Select merge moment Select merge moment
%ul.js-merge-dropdown.dropdown-menu.dropdown-menu-right{ role: 'menu' } %ul.js-merge-dropdown.dropdown-menu.dropdown-menu-right{ role: 'menu' }
%li %li
= link_to "#", class: "merge_when_pipeline_succeeds" do = link_to "#", class: "merge-when-pipeline-succeeds" do
= icon('check fw') = icon('check fw')
Merge when pipeline succeeds Merge when pipeline succeeds
%li %li
......
...@@ -4,7 +4,7 @@ ...@@ -4,7 +4,7 @@
= icon('chevron-down', 'aria-hidden': 'true') = icon('chevron-down', 'aria-hidden': 'true')
= escape_once(image.path) = escape_once(image.path)
= clipboard_button(clipboard_text: "docker pull #{image.path}") = clipboard_button(clipboard_text: "docker pull #{image.location}")
.controls.hidden-xs.pull-right .controls.hidden-xs.pull-right
= link_to namespace_project_container_registry_path(@project.namespace, @project, image), = link_to namespace_project_container_registry_path(@project.namespace, @project, image),
......
%tr.tag %tr.tag
%td %td
= escape_once(tag.name) = escape_once(tag.name)
= clipboard_button(text: "docker pull #{tag.path}") = clipboard_button(text: "docker pull #{tag.location}")
%td %td
- if tag.revision - if tag.revision
%span.has-tooltip{ title: "#{tag.revision}" } %span.has-tooltip{ title: "#{tag.revision}" }
......
...@@ -13,7 +13,7 @@ ...@@ -13,7 +13,7 @@
= render "home_panel" = render "home_panel"
- if current_user && can?(current_user, :download_code, @project) - if current_user && can?(current_user, :download_code, @project)
%nav.project-stats.limit-container-width{ class: container_class } %nav.project-stats{ class: container_class }
%ul.nav %ul.nav
%li %li
= link_to project_files_path(@project) do = link_to project_files_path(@project) do
...@@ -74,11 +74,11 @@ ...@@ -74,11 +74,11 @@
Set up auto deploy Set up auto deploy
- if @repository.commit - if @repository.commit
.limit-container-width{ class: container_class } %div{ class: container_class }
.project-last-commit .project-last-commit
= render 'projects/last_commit', commit: @repository.commit, ref: current_ref, project: @project = render 'projects/last_commit', commit: @repository.commit, ref: current_ref, project: @project
.limit-container-width{ class: container_class } %div{ class: container_class }
- if @project.archived? - if @project.archived?
.text-warning.center.prepend-top-20 .text-warning.center.prepend-top-20
%p %p
......
--- ---
title: Disable invalid service templates title: Separate CE params on Grape API
merge_request: merge_request:
author: author:
---
title: Add shortcuts and counters to MRs and issues in navbar
merge_request:
author:
---
title: Keep webpack-dev-server process functional across branch changes
merge_request: 10581
author:
---
title: add support for .vue templates
merge_request: 10517
author:
---
title: "[BB Importer] Save the error trace and the whole raw document to debug problems
easier"
merge_request:
author:
---
title: Add tooltip to header of Done board
merge_request: 10574
author: Andy Brown
---
title: Link to outdated diff in older MR version from outdated diff discussion
merge_request:
author:
---
title: Change project view default for existing users and anonymous visitors to files+readme
merge_request: 10498
author:
---
title: Fix redundant cache expiration in Repository
merge_request: 10575
author: blackst0ne
---
title: Fix MR widget bug that merged a MR when Merge when pipeline succeeds was clicked
via the dropdown
merge_request: 10611
author:
---
title: Handle SSH keys that have multiple spaces between each marker
merge_request:
author:
---
title: Add spec for schema.rb
merge_request: 10580
author: blackst0ne
---
title: Add foreign key for ci_trigger_requests on ci_triggers
merge_request: 10537
author:
...@@ -344,3 +344,57 @@ ...@@ -344,3 +344,57 @@
:why: https://github.com/nodeca/pako/blob/master/LICENSE :why: https://github.com/nodeca/pako/blob/master/LICENSE
:versions: [] :versions: []
:when: 2017-04-05 10:43:45.897720000 Z :when: 2017-04-05 10:43:45.897720000 Z
- - :approve
- caniuse-db
- :who: Mike Greiling
:why: https://github.com/Fyrd/caniuse/blob/master/LICENSE
:versions: []
:when: 2017-04-07 16:05:14.185549000 Z
- - :approve
- domelementtype
- :who: Mike Greiling
:why: https://github.com/fb55/domelementtype/blob/master/LICENSE
:versions: []
:when: 2017-04-07 16:19:17.992640000 Z
- - :approve
- domhandler
- :who: Mike Greiling
:why: https://github.com/fb55/domhandler/blob/master/LICENSE
:versions: []
:when: 2017-04-07 16:19:19.628953000 Z
- - :approve
- domutils
- :who: Mike Greiling
:why: https://github.com/fb55/domutils/blob/master/LICENSE
:versions: []
:when: 2017-04-07 16:19:21.159356000 Z
- - :approve
- entities
- :who: Mike Greiling
:why: https://github.com/fb55/entities/blob/master/LICENSE
:versions: []
:when: 2017-04-07 16:19:23.900571000 Z
- - :approve
- ansi-html
- :who: Mike Greiling
:why: https://github.com/Tjatse/ansi-html/blob/master/LICENSE
:versions: []
:when: 2017-04-10 05:42:12.898178000 Z
- - :approve
- map-stream
- :who: Mike Greiling
:why: https://github.com/dominictarr/map-stream/blob/master/LICENCE
:versions: []
:when: 2017-04-10 06:27:52.269085000 Z
- - :approve
- pause-stream
- :who: Mike Greiling
:why: https://github.com/dominictarr/pause-stream/blob/master/LICENSE
:versions: []
:when: 2017-04-10 06:28:39.825894000 Z
- - :approve
- undefsafe
- :who: Mike Greiling
:why: https://github.com/remy/undefsafe/blob/master/LICENSE
:versions: []
:when: 2017-04-10 06:30:00.002555000 Z
...@@ -6,6 +6,7 @@ var webpack = require('webpack'); ...@@ -6,6 +6,7 @@ var webpack = require('webpack');
var StatsPlugin = require('stats-webpack-plugin'); var StatsPlugin = require('stats-webpack-plugin');
var CompressionPlugin = require('compression-webpack-plugin'); var CompressionPlugin = require('compression-webpack-plugin');
var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin; var BundleAnalyzerPlugin = require('webpack-bundle-analyzer').BundleAnalyzerPlugin;
var WatchMissingNodeModulesPlugin = require('react-dev-utils/WatchMissingNodeModulesPlugin');
var ROOT_PATH = path.resolve(__dirname, '..'); var ROOT_PATH = path.resolve(__dirname, '..');
var IS_PRODUCTION = process.env.NODE_ENV === 'production'; var IS_PRODUCTION = process.env.NODE_ENV === 'production';
...@@ -65,13 +66,18 @@ var config = { ...@@ -65,13 +66,18 @@ var config = {
{ {
test: /\.js$/, test: /\.js$/,
exclude: /(node_modules|vendor\/assets)/, exclude: /(node_modules|vendor\/assets)/,
loader: 'babel-loader' loader: 'babel-loader',
},
{
test: /\.vue$/,
loader: 'vue-loader',
}, },
{ {
test: /\.svg$/, test: /\.svg$/,
use: 'raw-loader' loader: 'raw-loader',
}, { },
test: /\.(worker.js|pdf)$/, {
test: /\.(worker\.js|pdf)$/,
exclude: /node_modules/, exclude: /node_modules/,
loader: 'file-loader', loader: 'file-loader',
}, },
...@@ -182,6 +188,10 @@ if (IS_DEV_SERVER) { ...@@ -182,6 +188,10 @@ if (IS_DEV_SERVER) {
inline: DEV_SERVER_LIVERELOAD inline: DEV_SERVER_LIVERELOAD
}; };
config.output.publicPath = '//localhost:' + DEV_SERVER_PORT + config.output.publicPath; config.output.publicPath = '//localhost:' + DEV_SERVER_PORT + config.output.publicPath;
config.plugins.push(
// watch node_modules for changes if we encounter a missing module compile error
new WatchMissingNodeModulesPlugin(path.join(ROOT_PATH, 'node_modules'))
);
} }
if (WEBPACK_REPORT) { if (WEBPACK_REPORT) {
......
...@@ -223,7 +223,9 @@ class Gitlab::Seeder::CycleAnalytics ...@@ -223,7 +223,9 @@ class Gitlab::Seeder::CycleAnalytics
end end
Gitlab::Seeder.quiet do Gitlab::Seeder.quiet do
if ENV['SEED_CYCLE_ANALYTICS'] flag = 'SEED_CYCLE_ANALYTICS'
if ENV[flag]
Project.all.each do |project| Project.all.each do |project|
seeder = Gitlab::Seeder::CycleAnalytics.new(project) seeder = Gitlab::Seeder::CycleAnalytics.new(project)
seeder.seed! seeder.seed!
...@@ -235,6 +237,6 @@ Gitlab::Seeder.quiet do ...@@ -235,6 +237,6 @@ Gitlab::Seeder.quiet do
seeder = Gitlab::Seeder::CycleAnalytics.new(Project.order(:id).first, perf: true) seeder = Gitlab::Seeder::CycleAnalytics.new(Project.order(:id).first, perf: true)
seeder.seed_metrics! seeder.seed_metrics!
else else
puts "Not running the cycle analytics seed file. Use the `SEED_CYCLE_ANALYTICS` environment variable to enable it." puts "Skipped. Use the `#{flag}` environment variable to enable."
end end
end end
...@@ -27,6 +27,9 @@ end ...@@ -27,6 +27,9 @@ end
Sidekiq::Testing.inline! do Sidekiq::Testing.inline! do
Gitlab::Seeder.quiet do Gitlab::Seeder.quiet do
flag = 'SEED_NESTED_GROUPS'
if ENV[flag]
project_urls = [ project_urls = [
'https://android.googlesource.com/platform/hardware/broadcom/libbt.git', 'https://android.googlesource.com/platform/hardware/broadcom/libbt.git',
'https://android.googlesource.com/platform/hardware/broadcom/wlan.git', 'https://android.googlesource.com/platform/hardware/broadcom/wlan.git',
...@@ -65,5 +68,8 @@ Sidekiq::Testing.inline! do ...@@ -65,5 +68,8 @@ Sidekiq::Testing.inline! do
print 'F' print 'F'
end end
end end
else
puts "Skipped. Use the `#{flag}` environment variable to enable."
end
end end
end end
class AddForeighKeyTriggerRequestsTrigger < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
DOWNTIME = false
disable_ddl_transaction!
def up
add_concurrent_foreign_key(:ci_trigger_requests, :ci_triggers, column: :trigger_id)
end
def down
remove_foreign_key(:ci_trigger_requests, column: :trigger_id)
end
end
# See http://doc.gitlab.com/ce/development/migration_style_guide.html
# for more information on how to write migrations for GitLab.
class MigrateUserProjectView < ActiveRecord::Migration
include Gitlab::Database::MigrationHelpers
# Set this constant to true if this migration requires downtime.
DOWNTIME = false
def up
update_column_in_batches(:users, :project_view, 2) do |table, query|
query.where(table[:project_view].eq(0))
end
end
def down
# Nothing can be done to restore old values
end
end
...@@ -12,6 +12,7 @@ ...@@ -12,6 +12,7 @@
# It's strongly recommended that you check this file into your version control system. # It's strongly recommended that you check this file into your version control system.
ActiveRecord::Schema.define(version: 20170408033905) do ActiveRecord::Schema.define(version: 20170408033905) do
# These are extensions that must be enabled in order to support this database # These are extensions that must be enabled in order to support this database
enable_extension "plpgsql" enable_extension "plpgsql"
enable_extension "pg_trgm" enable_extension "pg_trgm"
...@@ -1356,6 +1357,7 @@ ActiveRecord::Schema.define(version: 20170408033905) do ...@@ -1356,6 +1357,7 @@ ActiveRecord::Schema.define(version: 20170408033905) do
add_foreign_key "chat_teams", "namespaces", on_delete: :cascade add_foreign_key "chat_teams", "namespaces", on_delete: :cascade
add_foreign_key "ci_builds", "ci_pipelines", column: "auto_canceled_by_id", name: "fk_a2141b1522", on_delete: :nullify add_foreign_key "ci_builds", "ci_pipelines", column: "auto_canceled_by_id", name: "fk_a2141b1522", on_delete: :nullify
add_foreign_key "ci_pipelines", "ci_pipelines", column: "auto_canceled_by_id", name: "fk_262d4c2d19", on_delete: :nullify add_foreign_key "ci_pipelines", "ci_pipelines", column: "auto_canceled_by_id", name: "fk_262d4c2d19", on_delete: :nullify
add_foreign_key "ci_trigger_requests", "ci_triggers", column: "trigger_id", name: "fk_b8ec8b7245", on_delete: :cascade
add_foreign_key "ci_trigger_schedules", "ci_triggers", column: "trigger_id", name: "fk_90a406cc94", on_delete: :cascade add_foreign_key "ci_trigger_schedules", "ci_triggers", column: "trigger_id", name: "fk_90a406cc94", on_delete: :cascade
add_foreign_key "ci_triggers", "users", column: "owner_id", name: "fk_e8e10d1964", on_delete: :cascade add_foreign_key "ci_triggers", "users", column: "owner_id", name: "fk_e8e10d1964", on_delete: :cascade
add_foreign_key "container_repositories", "projects" add_foreign_key "container_repositories", "projects"
......
...@@ -62,6 +62,7 @@ All technical content published by GitLab lives in the documentation, including: ...@@ -62,6 +62,7 @@ All technical content published by GitLab lives in the documentation, including:
- [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE. - [Migrate GitLab CI to CE/EE](migrate_ci_to_ce/README.md) Follow this guide to migrate your existing GitLab CI data to GitLab CE/EE.
- [Monitoring uptime](user/admin_area/monitoring/health_check.md) Check the server status using the health check endpoint. - [Monitoring uptime](user/admin_area/monitoring/health_check.md) Check the server status using the health check endpoint.
- [Operations](administration/operations.md) Keeping GitLab up and running. - [Operations](administration/operations.md) Keeping GitLab up and running.
- [Polling](administration/polling.md) Configure how often the GitLab UI polls for updates
- [Raketasks](raketasks/README.md) Backups, maintenance, automatic webhook setup and the importing of projects. - [Raketasks](raketasks/README.md) Backups, maintenance, automatic webhook setup and the importing of projects.
- [Reply by email](administration/reply_by_email.md) Allow users to comment on issues and merge requests by replying to notification emails. - [Reply by email](administration/reply_by_email.md) Allow users to comment on issues and merge requests by replying to notification emails.
- [Repository checks](administration/repository_checks.md) Periodic Git repository checks. - [Repository checks](administration/repository_checks.md) Periodic Git repository checks.
......
# Polling configuration
The GitLab UI polls for updates for different resources (issue notes, issue
titles, pipeline statuses, etc.) on a schedule appropriate to the resource.
In "Application settings -> Real-time features" you can configure "Polling
interval multiplier". This multiplier is applied to all resources at once,
and decimal values are supported. For the sake of the examples below, we will
say that issue notes poll every 2 seconds, and issue titles poll every 5
seconds; these are _not_ the actual values.
- 1 is the default, and recommended for most installations. (Issue notes poll
every 2 seconds, and issue titles poll every 5 seconds.)
- 0 will disable UI polling completely. (On the next poll, clients will stop
polling for updates.)
- A value greater than 1 will slow polling down. If you see issues with
database load from lots of clients polling for updates, increasing the
multiplier from 1 can be a good compromise, rather than disabling polling
completely. (For example: If this is set to 2, then issue notes poll every 4
seconds, and issue titles poll every 10 seconds.)
- A value between 0 and 1 will make the UI poll more frequently (so updates
will show in other sessions faster), but is **not recommended**. 1 should be
fast enough. (For example, if this is set to 0.5, then issue notes poll every
1 second, and issue titles poll every 2.5 seconds.)
...@@ -303,6 +303,17 @@ Additional pagination headers are also sent back. ...@@ -303,6 +303,17 @@ Additional pagination headers are also sent back.
| `X-Next-Page` | The index of the next page | | `X-Next-Page` | The index of the next page |
| `X-Prev-Page` | The index of the previous page | | `X-Prev-Page` | The index of the previous page |
## Namespaced path encoding
If using namespaced API calls, make sure that the `NAMESPACE/PROJECT_NAME` is
URL-encoded.
For example, `/` is represented by `%2F`:
```
/api/v4/projects/diaspora%2Fdiaspora
```
## `id` vs `iid` ## `id` vs `iid`
When you work with the API, you may notice two similar fields in API entities: When you work with the API, you may notice two similar fields in API entities:
...@@ -398,7 +409,6 @@ Content-Type: application/json ...@@ -398,7 +409,6 @@ Content-Type: application/json
} }
``` ```
## Clients ## Clients
There are many unofficial GitLab API Clients for most of the popular There are many unofficial GitLab API Clients for most of the popular
......
...@@ -25,7 +25,7 @@ GET /projects/:id/access_requests ...@@ -25,7 +25,7 @@ GET /projects/:id/access_requests
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The group/project ID or path | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/access_requests curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/access_requests
...@@ -66,7 +66,7 @@ POST /projects/:id/access_requests ...@@ -66,7 +66,7 @@ POST /projects/:id/access_requests
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The group/project ID or path | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/access_requests curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/:id/access_requests
...@@ -97,7 +97,7 @@ PUT /projects/:id/access_requests/:user_id/approve ...@@ -97,7 +97,7 @@ PUT /projects/:id/access_requests/:user_id/approve
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The group/project ID or path | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `user_id` | integer | yes | The user ID of the access requester | | `user_id` | integer | yes | The user ID of the access requester |
| `access_level` | integer | no | A valid access level (defaults: `30`, developer access level) | | `access_level` | integer | no | A valid access level (defaults: `30`, developer access level) |
...@@ -130,7 +130,7 @@ DELETE /projects/:id/access_requests/:user_id ...@@ -130,7 +130,7 @@ DELETE /projects/:id/access_requests/:user_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The group/project ID or path | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `user_id` | integer | yes | The user ID of the access requester | | `user_id` | integer | yes | The user ID of the access requester |
```bash ```bash
......
...@@ -23,7 +23,7 @@ Parameters: ...@@ -23,7 +23,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `awardable_id` | integer | yes | The ID (`iid` for merge requests/issues, `id` for snippets) of an awardable | | `awardable_id` | integer | yes | The ID (`iid` for merge requests/issues, `id` for snippets) of an awardable |
```bash ```bash
...@@ -83,7 +83,7 @@ Parameters: ...@@ -83,7 +83,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `awardable_id` | integer | yes | The ID (`iid` for merge requests/issues, `id` for snippets) of an awardable | | `awardable_id` | integer | yes | The ID (`iid` for merge requests/issues, `id` for snippets) of an awardable |
| `award_id` | integer | yes | The ID of the award emoji | | `award_id` | integer | yes | The ID of the award emoji |
...@@ -126,7 +126,7 @@ Parameters: ...@@ -126,7 +126,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `awardable_id` | integer | yes | The ID (`iid` for merge requests/issues, `id` for snippets) of an awardable | | `awardable_id` | integer | yes | The ID (`iid` for merge requests/issues, `id` for snippets) of an awardable |
| `name` | string | yes | The name of the emoji, without colons | | `name` | string | yes | The name of the emoji, without colons |
...@@ -170,7 +170,7 @@ Parameters: ...@@ -170,7 +170,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `issue_iid` | integer | yes | The internal ID of an issue | | `issue_iid` | integer | yes | The internal ID of an issue |
| `award_id` | integer | yes | The ID of a award_emoji | | `award_id` | integer | yes | The ID of a award_emoji |
...@@ -195,7 +195,7 @@ Parameters: ...@@ -195,7 +195,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `issue_iid` | integer | yes | The internal ID of an issue | | `issue_iid` | integer | yes | The internal ID of an issue |
| `note_id` | integer | yes | The ID of an note | | `note_id` | integer | yes | The ID of an note |
...@@ -237,7 +237,7 @@ Parameters: ...@@ -237,7 +237,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `issue_iid` | integer | yes | The internal ID of an issue | | `issue_iid` | integer | yes | The internal ID of an issue |
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
| `award_id` | integer | yes | The ID of the award emoji | | `award_id` | integer | yes | The ID of the award emoji |
...@@ -277,7 +277,7 @@ Parameters: ...@@ -277,7 +277,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `issue_iid` | integer | yes | The internal ID of an issue | | `issue_iid` | integer | yes | The internal ID of an issue |
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
| `name` | string | yes | The name of the emoji, without colons | | `name` | string | yes | The name of the emoji, without colons |
...@@ -320,7 +320,7 @@ Parameters: ...@@ -320,7 +320,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `issue_iid` | integer | yes | The internal ID of an issue | | `issue_iid` | integer | yes | The internal ID of an issue |
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
| `award_id` | integer | yes | The ID of a award_emoji | | `award_id` | integer | yes | The ID of a award_emoji |
......
...@@ -15,7 +15,7 @@ GET /projects/:id/boards ...@@ -15,7 +15,7 @@ GET /projects/:id/boards
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/boards curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/:id/boards
...@@ -71,7 +71,7 @@ GET /projects/:id/boards/:board_id/lists ...@@ -71,7 +71,7 @@ GET /projects/:id/boards/:board_id/lists
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `board_id` | integer | yes | The ID of a board | | `board_id` | integer | yes | The ID of a board |
```bash ```bash
...@@ -122,7 +122,7 @@ GET /projects/:id/boards/:board_id/lists/:list_id ...@@ -122,7 +122,7 @@ GET /projects/:id/boards/:board_id/lists/:list_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `board_id` | integer | yes | The ID of a board | | `board_id` | integer | yes | The ID of a board |
| `list_id`| integer | yes | The ID of a board's list | | `list_id`| integer | yes | The ID of a board's list |
...@@ -154,7 +154,7 @@ POST /projects/:id/boards/:board_id/lists ...@@ -154,7 +154,7 @@ POST /projects/:id/boards/:board_id/lists
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `board_id` | integer | yes | The ID of a board | | `board_id` | integer | yes | The ID of a board |
| `label_id` | integer | yes | The ID of a label | | `label_id` | integer | yes | The ID of a label |
...@@ -186,7 +186,7 @@ PUT /projects/:id/boards/:board_id/lists/:list_id ...@@ -186,7 +186,7 @@ PUT /projects/:id/boards/:board_id/lists/:list_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `board_id` | integer | yes | The ID of a board | | `board_id` | integer | yes | The ID of a board |
| `list_id` | integer | yes | The ID of a board's list | | `list_id` | integer | yes | The ID of a board's list |
| `position` | integer | yes | The position of the list | | `position` | integer | yes | The position of the list |
...@@ -219,7 +219,7 @@ DELETE /projects/:id/boards/:board_id/lists/:list_id ...@@ -219,7 +219,7 @@ DELETE /projects/:id/boards/:board_id/lists/:list_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `board_id` | integer | yes | The ID of a board | | `board_id` | integer | yes | The ID of a board |
| `list_id` | integer | yes | The ID of a board's list | | `list_id` | integer | yes | The ID of a board's list |
......
...@@ -12,7 +12,7 @@ GET /projects/:id/repository/branches ...@@ -12,7 +12,7 @@ GET /projects/:id/repository/branches
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/repository/branches curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/5/repository/branches
...@@ -59,7 +59,7 @@ GET /projects/:id/repository/branches/:branch ...@@ -59,7 +59,7 @@ GET /projects/:id/repository/branches/:branch
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `branch` | string | yes | The name of the branch | | `branch` | string | yes | The name of the branch |
```bash ```bash
...@@ -109,7 +109,7 @@ curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab ...@@ -109,7 +109,7 @@ curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `branch` | string | yes | The name of the branch | | `branch` | string | yes | The name of the branch |
| `developers_can_push` | boolean | no | Flag if developers can push to the branch | | `developers_can_push` | boolean | no | Flag if developers can push to the branch |
| `developers_can_merge` | boolean | no | Flag if developers can merge to the branch | | `developers_can_merge` | boolean | no | Flag if developers can merge to the branch |
...@@ -157,7 +157,7 @@ curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab ...@@ -157,7 +157,7 @@ curl --request PUT --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `branch` | string | yes | The name of the branch | | `branch` | string | yes | The name of the branch |
Example response: Example response:
...@@ -195,7 +195,7 @@ POST /projects/:id/repository/branches ...@@ -195,7 +195,7 @@ POST /projects/:id/repository/branches
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `branch` | string | yes | The name of the branch | | `branch` | string | yes | The name of the branch |
| `ref` | string | yes | The branch name or commit SHA to create branch from | | `ref` | string | yes | The branch name or commit SHA to create branch from |
...@@ -238,7 +238,7 @@ DELETE /projects/:id/repository/branches/:branch ...@@ -238,7 +238,7 @@ DELETE /projects/:id/repository/branches/:branch
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `branch` | string | yes | The name of the branch | | `branch` | string | yes | The name of the branch |
In case of an error, an explaining message is provided. In case of an error, an explaining message is provided.
...@@ -257,7 +257,7 @@ DELETE /projects/:id/repository/merged_branches ...@@ -257,7 +257,7 @@ DELETE /projects/:id/repository/merged_branches
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
......
...@@ -10,7 +10,7 @@ GET /projects/:id/variables ...@@ -10,7 +10,7 @@ GET /projects/:id/variables
| Attribute | Type | required | Description | | Attribute | Type | required | Description |
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID of a project or [urlencoded NAMESPACE/PROJECT_NAME of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/variables" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/variables"
...@@ -39,7 +39,7 @@ GET /projects/:id/variables/:key ...@@ -39,7 +39,7 @@ GET /projects/:id/variables/:key
| Attribute | Type | required | Description | | Attribute | Type | required | Description |
|-----------|---------|----------|-----------------------| |-----------|---------|----------|-----------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID of a project or [urlencoded NAMESPACE/PROJECT_NAME of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable | | `key` | string | yes | The `key` of a variable |
``` ```
...@@ -63,7 +63,7 @@ POST /projects/:id/variables ...@@ -63,7 +63,7 @@ POST /projects/:id/variables
| Attribute | Type | required | Description | | Attribute | Type | required | Description |
|-----------|---------|----------|-----------------------| |-----------|---------|----------|-----------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID of a project or [urlencoded NAMESPACE/PROJECT_NAME of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable; must have no more than 255 characters; only `A-Z`, `a-z`, `0-9`, and `_` are allowed | | `key` | string | yes | The `key` of a variable; must have no more than 255 characters; only `A-Z`, `a-z`, `0-9`, and `_` are allowed |
| `value` | string | yes | The `value` of a variable | | `value` | string | yes | The `value` of a variable |
...@@ -88,7 +88,7 @@ PUT /projects/:id/variables/:key ...@@ -88,7 +88,7 @@ PUT /projects/:id/variables/:key
| Attribute | Type | required | Description | | Attribute | Type | required | Description |
|-----------|---------|----------|-------------------------| |-----------|---------|----------|-------------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID of a project or [urlencoded NAMESPACE/PROJECT_NAME of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable | | `key` | string | yes | The `key` of a variable |
| `value` | string | yes | The `value` of a variable | | `value` | string | yes | The `value` of a variable |
...@@ -113,7 +113,7 @@ DELETE /projects/:id/variables/:key ...@@ -113,7 +113,7 @@ DELETE /projects/:id/variables/:key
| Attribute | Type | required | Description | | Attribute | Type | required | Description |
|-----------|---------|----------|-------------------------| |-----------|---------|----------|-------------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID of a project or [urlencoded NAMESPACE/PROJECT_NAME of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key` | string | yes | The `key` of a variable | | `key` | string | yes | The `key` of a variable |
``` ```
......
...@@ -10,7 +10,7 @@ GET /projects/:id/repository/commits ...@@ -10,7 +10,7 @@ GET /projects/:id/repository/commits
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
| `ref_name` | string | no | The name of a repository branch or tag or if not given the default branch | | `ref_name` | string | no | The name of a repository branch or tag or if not given the default branch |
| `since` | string | no | Only commits after or on this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ | | `since` | string | no | Only commits after or on this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ |
| `until` | string | no | Only commits before or on this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ | | `until` | string | no | Only commits before or on this date will be returned in ISO 8601 format YYYY-MM-DDTHH:MM:SSZ |
...@@ -68,7 +68,7 @@ POST /projects/:id/repository/commits ...@@ -68,7 +68,7 @@ POST /projects/:id/repository/commits
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) |
| `branch` | string | yes | The name of a branch | | `branch` | string | yes | The name of a branch |
| `commit_message` | string | yes | Commit message | | `commit_message` | string | yes | Commit message |
| `actions[]` | array | yes | An array of action hashes to commit as a batch. See the next table for what attributes it can take. | | `actions[]` | array | yes | An array of action hashes to commit as a batch. See the next table for what attributes it can take. |
...@@ -155,7 +155,7 @@ Parameters: ...@@ -155,7 +155,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
| `sha` | string | yes | The commit hash or name of a repository branch or tag | | `sha` | string | yes | The commit hash or name of a repository branch or tag |
```bash ```bash
...@@ -203,7 +203,7 @@ Parameters: ...@@ -203,7 +203,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
| `sha` | string | yes | The commit hash | | `sha` | string | yes | The commit hash |
| `branch` | string | yes | The name of the branch | | `branch` | string | yes | The name of the branch |
...@@ -245,7 +245,7 @@ Parameters: ...@@ -245,7 +245,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
| `sha` | string | yes | The commit hash or name of a repository branch or tag | | `sha` | string | yes | The commit hash or name of a repository branch or tag |
```bash ```bash
...@@ -281,7 +281,7 @@ Parameters: ...@@ -281,7 +281,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
| `sha` | string | yes | The commit hash or name of a repository branch or tag | | `sha` | string | yes | The commit hash or name of a repository branch or tag |
```bash ```bash
...@@ -330,7 +330,7 @@ POST /projects/:id/repository/commits/:sha/comments ...@@ -330,7 +330,7 @@ POST /projects/:id/repository/commits/:sha/comments
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
| `sha` | string | yes | The commit SHA or name of a repository branch or tag | | `sha` | string | yes | The commit SHA or name of a repository branch or tag |
| `note` | string | yes | The text of the comment | | `note` | string | yes | The text of the comment |
| `path` | string | no | The file path relative to the repository | | `path` | string | no | The file path relative to the repository |
...@@ -375,7 +375,7 @@ GET /projects/:id/repository/commits/:sha/statuses ...@@ -375,7 +375,7 @@ GET /projects/:id/repository/commits/:sha/statuses
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
| `sha` | string | yes | The commit SHA | `sha` | string | yes | The commit SHA
| `ref` | string | no | The name of a repository branch or tag or, if not given, the default branch | `ref` | string | no | The name of a repository branch or tag or, if not given, the default branch
| `stage` | string | no | Filter by [build stage](../ci/yaml/README.md#stages), e.g., `test` | `stage` | string | no | Filter by [build stage](../ci/yaml/README.md#stages), e.g., `test`
...@@ -449,7 +449,7 @@ POST /projects/:id/statuses/:sha ...@@ -449,7 +449,7 @@ POST /projects/:id/statuses/:sha
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID of a project or NAMESPACE/PROJECT_NAME owned by the authenticated user | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
| `sha` | string | yes | The commit SHA | `sha` | string | yes | The commit SHA
| `state` | string | yes | The state of the status. Can be one of the following: `pending`, `running`, `success`, `failed`, `canceled` | `state` | string | yes | The state of the status. Can be one of the following: `pending`, `running`, `success`, `failed`, `canceled`
| `ref` | string | no | The `ref` (branch or tag) to which the status refers | `ref` | string | no | The `ref` (branch or tag) to which the status refers
......
...@@ -43,7 +43,7 @@ GET /projects/:id/deploy_keys ...@@ -43,7 +43,7 @@ GET /projects/:id/deploy_keys
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/deploy_keys" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/5/deploy_keys"
...@@ -82,7 +82,7 @@ Parameters: ...@@ -82,7 +82,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key_id` | integer | yes | The ID of the deploy key | | `key_id` | integer | yes | The ID of the deploy key |
```bash ```bash
...@@ -114,7 +114,7 @@ POST /projects/:id/deploy_keys ...@@ -114,7 +114,7 @@ POST /projects/:id/deploy_keys
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `title` | string | yes | New deploy key's title | | `title` | string | yes | New deploy key's title |
| `key` | string | yes | New deploy key | | `key` | string | yes | New deploy key |
| `can_push` | boolean | no | Can deploy key push to the project's repository | | `can_push` | boolean | no | Can deploy key push to the project's repository |
...@@ -145,7 +145,7 @@ DELETE /projects/:id/deploy_keys/:key_id ...@@ -145,7 +145,7 @@ DELETE /projects/:id/deploy_keys/:key_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key_id` | integer | yes | The ID of the deploy key | | `key_id` | integer | yes | The ID of the deploy key |
```bash ```bash
...@@ -162,7 +162,7 @@ curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitla ...@@ -162,7 +162,7 @@ curl --request POST --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitla
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `key_id` | integer | yes | The ID of the deploy key | | `key_id` | integer | yes | The ID of the deploy key |
Example response: Example response:
......
...@@ -10,7 +10,7 @@ GET /projects/:id/deployments ...@@ -10,7 +10,7 @@ GET /projects/:id/deployments
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/deployments" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/deployments"
...@@ -147,7 +147,7 @@ GET /projects/:id/deployments/:deployment_id ...@@ -147,7 +147,7 @@ GET /projects/:id/deployments/:deployment_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `deployment_id` | integer | yes | The ID of the deployment | | `deployment_id` | integer | yes | The ID of the deployment |
```bash ```bash
......
...@@ -10,7 +10,7 @@ GET /projects/:id/environments ...@@ -10,7 +10,7 @@ GET /projects/:id/environments
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- | | --------- | ------- | -------- | --------------------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/environments curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/environments
...@@ -41,7 +41,7 @@ POST /projects/:id/environment ...@@ -41,7 +41,7 @@ POST /projects/:id/environment
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| ------------- | ------- | -------- | ---------------------------- | | ------------- | ------- | -------- | ---------------------------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `name` | string | yes | The name of the environment | | `name` | string | yes | The name of the environment |
| `external_url` | string | no | Place to link to for this environment | | `external_url` | string | no | Place to link to for this environment |
...@@ -72,7 +72,7 @@ PUT /projects/:id/environments/:environments_id ...@@ -72,7 +72,7 @@ PUT /projects/:id/environments/:environments_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------------- | ------- | --------------------------------- | ------------------------------- | | --------------- | ------- | --------------------------------- | ------------------------------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `environment_id` | integer | yes | The ID of the environment | The ID of the environment | | `environment_id` | integer | yes | The ID of the environment | The ID of the environment |
| `name` | string | no | The new name of the environment | | `name` | string | no | The new name of the environment |
| `external_url` | string | no | The new external_url | | `external_url` | string | no | The new external_url |
...@@ -102,7 +102,7 @@ DELETE /projects/:id/environments/:environment_id ...@@ -102,7 +102,7 @@ DELETE /projects/:id/environments/:environment_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- | | --------- | ------- | -------- | --------------------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `environment_id` | integer | yes | The ID of the environment | | `environment_id` | integer | yes | The ID of the environment |
```bash ```bash
...@@ -119,7 +119,7 @@ POST /projects/:id/environments/:environment_id/stop ...@@ -119,7 +119,7 @@ POST /projects/:id/environments/:environment_id/stop
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- | | --------- | ------- | -------- | --------------------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `environment_id` | integer | yes | The ID of the environment | | `environment_id` | integer | yes | The ID of the environment |
```bash ```bash
......
...@@ -53,7 +53,7 @@ Parameters: ...@@ -53,7 +53,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or path of a group | | `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `archived` | boolean | no | Limit by archived status | | `archived` | boolean | no | Limit by archived status |
| `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` | | `visibility` | string | no | Limit by visibility `public`, `internal`, or `private` |
| `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` | | `order_by` | string | no | Return projects ordered by `id`, `name`, `path`, `created_at`, `updated_at`, or `last_activity_at` fields. Default is `created_at` |
...@@ -119,7 +119,7 @@ Parameters: ...@@ -119,7 +119,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The ID or path of a group | | `id` | integer/string | yes | The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/4 curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/groups/4
...@@ -299,7 +299,7 @@ POST /groups/:id/projects/:project_id ...@@ -299,7 +299,7 @@ POST /groups/:id/projects/:project_id
Parameters: Parameters:
- `id` (required) - The ID or path of a group - `id` (required) - The ID or [URL-encoded path of the group](README.md#namespaced-path-encoding) owned by the authenticated user
- `project_id` (required) - The ID or path of a project - `project_id` (required) - The ID or path of a project
## Update group ## Update group
......
This diff is collapsed.
...@@ -10,7 +10,7 @@ GET /projects/:id/jobs ...@@ -10,7 +10,7 @@ GET /projects/:id/jobs
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `scope` | string **or** array of strings | no | The scope of jobs to show, one or array of: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`; showing all jobs if none provided | | `scope` | string **or** array of strings | no | The scope of jobs to show, one or array of: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`; showing all jobs if none provided |
``` ```
...@@ -125,7 +125,7 @@ GET /projects/:id/pipeline/:pipeline_id/jobs ...@@ -125,7 +125,7 @@ GET /projects/:id/pipeline/:pipeline_id/jobs
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|---------------|--------------------------------|----------|----------------------| |---------------|--------------------------------|----------|----------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `pipeline_id` | integer | yes | The ID of a pipeline | | `pipeline_id` | integer | yes | The ID of a pipeline |
| `scope` | string **or** array of strings | no | The scope of jobs to show, one or array of: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`; showing all jobs if none provided | | `scope` | string **or** array of strings | no | The scope of jobs to show, one or array of: `created`, `pending`, `running`, `failed`, `success`, `canceled`, `skipped`; showing all jobs if none provided |
...@@ -241,7 +241,7 @@ GET /projects/:id/jobs/:job_id ...@@ -241,7 +241,7 @@ GET /projects/:id/jobs/:job_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|------------|---------|----------|---------------------| |------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `job_id` | integer | yes | The ID of a job | | `job_id` | integer | yes | The ID of a job |
``` ```
...@@ -309,7 +309,7 @@ GET /projects/:id/jobs/:job_id/artifacts ...@@ -309,7 +309,7 @@ GET /projects/:id/jobs/:job_id/artifacts
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|------------|---------|----------|---------------------| |------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `job_id` | integer | yes | The ID of a job | | `job_id` | integer | yes | The ID of a job |
``` ```
...@@ -340,7 +340,7 @@ Parameters ...@@ -340,7 +340,7 @@ Parameters
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|-------------|---------|----------|-------------------------- | |-------------|---------|----------|-------------------------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `ref_name` | string | yes | The ref from a repository | | `ref_name` | string | yes | The ref from a repository |
| `job` | string | yes | The name of the job | | `job` | string | yes | The name of the job |
...@@ -369,7 +369,7 @@ GET /projects/:id/jobs/:job_id/trace ...@@ -369,7 +369,7 @@ GET /projects/:id/jobs/:job_id/trace
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|------------|---------|----------|---------------------| |------------|---------|----------|---------------------|
| id | integer | yes | The ID of a project | | id | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| job_id | integer | yes | The ID of a job | | job_id | integer | yes | The ID of a job |
``` ```
...@@ -393,7 +393,7 @@ POST /projects/:id/jobs/:job_id/cancel ...@@ -393,7 +393,7 @@ POST /projects/:id/jobs/:job_id/cancel
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|------------|---------|----------|---------------------| |------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `job_id` | integer | yes | The ID of a job | | `job_id` | integer | yes | The ID of a job |
``` ```
...@@ -439,7 +439,7 @@ POST /projects/:id/jobs/:job_id/retry ...@@ -439,7 +439,7 @@ POST /projects/:id/jobs/:job_id/retry
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|------------|---------|----------|---------------------| |------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `job_id` | integer | yes | The ID of a job | | `job_id` | integer | yes | The ID of a job |
``` ```
...@@ -487,7 +487,7 @@ Parameters ...@@ -487,7 +487,7 @@ Parameters
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|-------------|---------|----------|---------------------| |-------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `job_id` | integer | yes | The ID of a job | | `job_id` | integer | yes | The ID of a job |
Example of request Example of request
...@@ -537,7 +537,7 @@ Parameters ...@@ -537,7 +537,7 @@ Parameters
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|-------------|---------|----------|---------------------| |-------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `job_id` | integer | yes | The ID of a job | | `job_id` | integer | yes | The ID of a job |
Example request: Example request:
...@@ -585,7 +585,7 @@ POST /projects/:id/jobs/:job_id/play ...@@ -585,7 +585,7 @@ POST /projects/:id/jobs/:job_id/play
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `job_id` | integer | yes | The ID of a job | | `job_id` | integer | yes | The ID of a job |
``` ```
......
...@@ -10,7 +10,7 @@ GET /projects/:id/labels ...@@ -10,7 +10,7 @@ GET /projects/:id/labels
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- | | --------- | ------- | -------- | --------------------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
```bash ```bash
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/labels curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" https://gitlab.example.com/api/v4/projects/1/labels
...@@ -88,7 +88,7 @@ POST /projects/:id/labels ...@@ -88,7 +88,7 @@ POST /projects/:id/labels
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| ------------- | ------- | -------- | ---------------------------- | | ------------- | ------- | -------- | ---------------------------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `name` | string | yes | The name of the label | | `name` | string | yes | The name of the label |
| `color` | string | yes | The color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the [CSS color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords) | | `color` | string | yes | The color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the [CSS color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords) |
| `description` | string | no | The description of the label | | `description` | string | no | The description of the label |
...@@ -124,7 +124,7 @@ DELETE /projects/:id/labels ...@@ -124,7 +124,7 @@ DELETE /projects/:id/labels
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ------- | -------- | --------------------- | | --------- | ------- | -------- | --------------------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `name` | string | yes | The name of the label | | `name` | string | yes | The name of the label |
```bash ```bash
...@@ -142,7 +142,7 @@ PUT /projects/:id/labels ...@@ -142,7 +142,7 @@ PUT /projects/:id/labels
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------------- | ------- | --------------------------------- | ------------------------------- | | --------------- | ------- | --------------------------------- | ------------------------------- |
| `id` | integer | yes | The ID of the project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `name` | string | yes | The name of the existing label | | `name` | string | yes | The name of the existing label |
| `new_name` | string | yes if `color` is not provided | The new name of the label | | `new_name` | string | yes if `color` is not provided | The new name of the label |
| `color` | string | yes if `new_name` is not provided | The color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the [CSS color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords) | | `color` | string | yes if `new_name` is not provided | The color of the label given in 6-digit hex notation with leading '#' sign (e.g. #FFAABB) or one of the [CSS color names](https://developer.mozilla.org/en-US/docs/Web/CSS/color_value#Color_keywords) |
...@@ -182,7 +182,7 @@ POST /projects/:id/labels/:label_id/subscribe ...@@ -182,7 +182,7 @@ POST /projects/:id/labels/:label_id/subscribe
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| ---------- | ----------------- | -------- | ------------------------------------ | | ---------- | ----------------- | -------- | ------------------------------------ |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `label_id` | integer or string | yes | The ID or title of a project's label | | `label_id` | integer or string | yes | The ID or title of a project's label |
```bash ```bash
...@@ -217,7 +217,7 @@ POST /projects/:id/labels/:label_id/unsubscribe ...@@ -217,7 +217,7 @@ POST /projects/:id/labels/:label_id/unsubscribe
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| ---------- | ----------------- | -------- | ------------------------------------ | | ---------- | ----------------- | -------- | ------------------------------------ |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `label_id` | integer or string | yes | The ID or title of a project's label | | `label_id` | integer or string | yes | The ID or title of a project's label |
```bash ```bash
......
...@@ -23,7 +23,7 @@ GET /projects/:id/members ...@@ -23,7 +23,7 @@ GET /projects/:id/members
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The group/project ID or path | | `id` | integer/string | yes | The ID or [URL-encoded path of the project or group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `query` | string | no | A query string to search for members | | `query` | string | no | A query string to search for members |
```bash ```bash
...@@ -65,7 +65,7 @@ GET /projects/:id/members/:user_id ...@@ -65,7 +65,7 @@ GET /projects/:id/members/:user_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The group/project ID or path | | `id` | integer/string | yes | The ID or [URL-encoded path of the project or group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `user_id` | integer | yes | The user ID of the member | | `user_id` | integer | yes | The user ID of the member |
```bash ```bash
...@@ -98,7 +98,7 @@ POST /projects/:id/members ...@@ -98,7 +98,7 @@ POST /projects/:id/members
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The group/project ID or path | | `id` | integer/string | yes | The ID or [URL-encoded path of the project or group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `user_id` | integer | yes | The user ID of the new member | | `user_id` | integer | yes | The user ID of the new member |
| `access_level` | integer | yes | A valid access level | | `access_level` | integer | yes | A valid access level |
| `expires_at` | string | no | A date string in the format YEAR-MONTH-DAY | | `expires_at` | string | no | A date string in the format YEAR-MONTH-DAY |
...@@ -132,7 +132,7 @@ PUT /projects/:id/members/:user_id ...@@ -132,7 +132,7 @@ PUT /projects/:id/members/:user_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The group/project ID or path | | `id` | integer/string | yes | The ID or [URL-encoded path of the project or group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `user_id` | integer | yes | The user ID of the member | | `user_id` | integer | yes | The user ID of the member |
| `access_level` | integer | yes | A valid access level | | `access_level` | integer | yes | A valid access level |
| `expires_at` | string | no | A date string in the format YEAR-MONTH-DAY | | `expires_at` | string | no | A date string in the format YEAR-MONTH-DAY |
...@@ -166,7 +166,7 @@ DELETE /projects/:id/members/:user_id ...@@ -166,7 +166,7 @@ DELETE /projects/:id/members/:user_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer/string | yes | The group/project ID or path | | `id` | integer/string | yes | The ID or [URL-encoded path of the project or group](README.md#namespaced-path-encoding) owned by the authenticated user |
| `user_id` | integer | yes | The user ID of the member | | `user_id` | integer | yes | The user ID of the member |
```bash ```bash
......
This diff is collapsed.
...@@ -17,7 +17,7 @@ Parameters: ...@@ -17,7 +17,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `iids` | Array[integer] | optional | Return only the milestones having the given `iids` | | `iids` | Array[integer] | optional | Return only the milestones having the given `iids` |
| `state` | string | optional | Return only `active` or `closed` milestones` | | `state` | string | optional | Return only `active` or `closed` milestones` |
| `search` | string | optional | Return only milestones with a title or description matching the provided string | | `search` | string | optional | Return only milestones with a title or description matching the provided string |
...@@ -56,8 +56,8 @@ GET /projects/:id/milestones/:milestone_id ...@@ -56,8 +56,8 @@ GET /projects/:id/milestones/:milestone_id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `milestone_id` (required) - The ID of a project milestone - `milestone_id` (required) - The ID of the project's milestone
## Create new milestone ## Create new milestone
...@@ -69,7 +69,7 @@ POST /projects/:id/milestones ...@@ -69,7 +69,7 @@ POST /projects/:id/milestones
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `title` (required) - The title of an milestone - `title` (required) - The title of an milestone
- `description` (optional) - The description of the milestone - `description` (optional) - The description of the milestone
- `due_date` (optional) - The due date of the milestone - `due_date` (optional) - The due date of the milestone
...@@ -85,7 +85,7 @@ PUT /projects/:id/milestones/:milestone_id ...@@ -85,7 +85,7 @@ PUT /projects/:id/milestones/:milestone_id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `milestone_id` (required) - The ID of a project milestone - `milestone_id` (required) - The ID of a project milestone
- `title` (optional) - The title of a milestone - `title` (optional) - The title of a milestone
- `description` (optional) - The description of a milestone - `description` (optional) - The description of a milestone
...@@ -103,7 +103,7 @@ GET /projects/:id/milestones/:milestone_id/issues ...@@ -103,7 +103,7 @@ GET /projects/:id/milestones/:milestone_id/issues
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `milestone_id` (required) - The ID of a project milestone - `milestone_id` (required) - The ID of a project milestone
## Get all merge requests assigned to a single milestone ## Get all merge requests assigned to a single milestone
...@@ -116,5 +116,5 @@ GET /projects/:id/milestones/:milestone_id/merge_requests ...@@ -116,5 +116,5 @@ GET /projects/:id/milestones/:milestone_id/merge_requests
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `milestone_id` (required) - The ID of a project milestone - `milestone_id` (required) - The ID of a project milestone
...@@ -14,7 +14,7 @@ GET /projects/:id/issues/:issue_iid/notes ...@@ -14,7 +14,7 @@ GET /projects/:id/issues/:issue_iid/notes
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `issue_iid` (required) - The IID of an issue - `issue_iid` (required) - The IID of an issue
```json ```json
...@@ -68,7 +68,7 @@ GET /projects/:id/issues/:issue_iid/notes/:note_id ...@@ -68,7 +68,7 @@ GET /projects/:id/issues/:issue_iid/notes/:note_id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `issue_iid` (required) - The IID of a project issue - `issue_iid` (required) - The IID of a project issue
- `note_id` (required) - The ID of an issue note - `note_id` (required) - The ID of an issue note
...@@ -83,7 +83,7 @@ POST /projects/:id/issues/:issue_iid/notes ...@@ -83,7 +83,7 @@ POST /projects/:id/issues/:issue_iid/notes
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `issue_id` (required) - The IID of an issue - `issue_id` (required) - The IID of an issue
- `body` (required) - The content of a note - `body` (required) - The content of a note
- `created_at` (optional) - Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z - `created_at` (optional) - Date time string, ISO 8601 formatted, e.g. 2016-03-11T03:45:40Z
...@@ -98,7 +98,7 @@ PUT /projects/:id/issues/:issue_iid/notes/:note_id ...@@ -98,7 +98,7 @@ PUT /projects/:id/issues/:issue_iid/notes/:note_id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `issue_iid` (required) - The IID of an issue - `issue_iid` (required) - The IID of an issue
- `note_id` (required) - The ID of a note - `note_id` (required) - The ID of a note
- `body` (required) - The content of a note - `body` (required) - The content of a note
...@@ -115,7 +115,7 @@ Parameters: ...@@ -115,7 +115,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `issue_iid` | integer | yes | The IID of an issue | | `issue_iid` | integer | yes | The IID of an issue |
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
...@@ -135,7 +135,7 @@ GET /projects/:id/snippets/:snippet_id/notes ...@@ -135,7 +135,7 @@ GET /projects/:id/snippets/:snippet_id/notes
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `snippet_id` (required) - The ID of a project snippet - `snippet_id` (required) - The ID of a project snippet
### Get single snippet note ### Get single snippet note
...@@ -148,7 +148,7 @@ GET /projects/:id/snippets/:snippet_id/notes/:note_id ...@@ -148,7 +148,7 @@ GET /projects/:id/snippets/:snippet_id/notes/:note_id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `snippet_id` (required) - The ID of a project snippet - `snippet_id` (required) - The ID of a project snippet
- `note_id` (required) - The ID of an snippet note - `note_id` (required) - The ID of an snippet note
...@@ -182,7 +182,7 @@ POST /projects/:id/snippets/:snippet_id/notes ...@@ -182,7 +182,7 @@ POST /projects/:id/snippets/:snippet_id/notes
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `snippet_id` (required) - The ID of a snippet - `snippet_id` (required) - The ID of a snippet
- `body` (required) - The content of a note - `body` (required) - The content of a note
...@@ -196,7 +196,7 @@ PUT /projects/:id/snippets/:snippet_id/notes/:note_id ...@@ -196,7 +196,7 @@ PUT /projects/:id/snippets/:snippet_id/notes/:note_id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `snippet_id` (required) - The ID of a snippet - `snippet_id` (required) - The ID of a snippet
- `note_id` (required) - The ID of a note - `note_id` (required) - The ID of a note
- `body` (required) - The content of a note - `body` (required) - The content of a note
...@@ -213,7 +213,7 @@ Parameters: ...@@ -213,7 +213,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `snippet_id` | integer | yes | The ID of a snippet | | `snippet_id` | integer | yes | The ID of a snippet |
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
...@@ -233,7 +233,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/notes ...@@ -233,7 +233,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/notes
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `merge_request_iid` (required) - The IID of a project merge request - `merge_request_iid` (required) - The IID of a project merge request
### Get single merge request note ### Get single merge request note
...@@ -246,7 +246,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/notes/:note_id ...@@ -246,7 +246,7 @@ GET /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `merge_request_iid` (required) - The IID of a project merge request - `merge_request_iid` (required) - The IID of a project merge request
- `note_id` (required) - The ID of a merge request note - `note_id` (required) - The ID of a merge request note
...@@ -283,7 +283,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/notes ...@@ -283,7 +283,7 @@ POST /projects/:id/merge_requests/:merge_request_iid/notes
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `merge_request_iid` (required) - The IID of a merge request - `merge_request_iid` (required) - The IID of a merge request
- `body` (required) - The content of a note - `body` (required) - The content of a note
...@@ -297,7 +297,7 @@ PUT /projects/:id/merge_requests/:merge_request_iid/notes/:note_id ...@@ -297,7 +297,7 @@ PUT /projects/:id/merge_requests/:merge_request_iid/notes/:note_id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `merge_request_iid` (required) - The IID of a merge request - `merge_request_iid` (required) - The IID of a merge request
- `note_id` (required) - The ID of a note - `note_id` (required) - The ID of a note
- `body` (required) - The content of a note - `body` (required) - The content of a note
...@@ -314,7 +314,7 @@ Parameters: ...@@ -314,7 +314,7 @@ Parameters:
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
| --------- | ---- | -------- | ----------- | | --------- | ---- | -------- | ----------- |
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `merge_request_iid` | integer | yes | The IID of a merge request | | `merge_request_iid` | integer | yes | The IID of a merge request |
| `note_id` | integer | yes | The ID of a note | | `note_id` | integer | yes | The ID of a note |
......
...@@ -12,7 +12,7 @@ GET /projects/:id/triggers ...@@ -12,7 +12,7 @@ GET /projects/:id/triggers
| Attribute | Type | required | Description | | Attribute | Type | required | Description |
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/triggers" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/triggers"
...@@ -43,7 +43,7 @@ GET /projects/:id/triggers/:trigger_id ...@@ -43,7 +43,7 @@ GET /projects/:id/triggers/:trigger_id
| Attribute | Type | required | Description | | Attribute | Type | required | Description |
|--------------|---------|----------|--------------------------| |--------------|---------|----------|--------------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `trigger_id` | integer | yes | The trigger id | | `trigger_id` | integer | yes | The trigger id |
``` ```
...@@ -73,7 +73,7 @@ POST /projects/:id/triggers ...@@ -73,7 +73,7 @@ POST /projects/:id/triggers
| Attribute | Type | required | Description | | Attribute | Type | required | Description |
|---------------|---------|----------|--------------------------| |---------------|---------|----------|--------------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `description` | string | yes | The trigger name | | `description` | string | yes | The trigger name |
``` ```
...@@ -103,7 +103,7 @@ PUT /projects/:id/triggers/:trigger_id ...@@ -103,7 +103,7 @@ PUT /projects/:id/triggers/:trigger_id
| Attribute | Type | required | Description | | Attribute | Type | required | Description |
|---------------|---------|----------|--------------------------| |---------------|---------|----------|--------------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `trigger_id` | integer | yes | The trigger id | | `trigger_id` | integer | yes | The trigger id |
| `description` | string | no | The trigger name | | `description` | string | no | The trigger name |
...@@ -134,7 +134,7 @@ POST /projects/:id/triggers/:trigger_id/take_ownership ...@@ -134,7 +134,7 @@ POST /projects/:id/triggers/:trigger_id/take_ownership
| Attribute | Type | required | Description | | Attribute | Type | required | Description |
|---------------|---------|----------|--------------------------| |---------------|---------|----------|--------------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `trigger_id` | integer | yes | The trigger id | | `trigger_id` | integer | yes | The trigger id |
``` ```
...@@ -164,7 +164,7 @@ DELETE /projects/:id/triggers/:trigger_id ...@@ -164,7 +164,7 @@ DELETE /projects/:id/triggers/:trigger_id
| Attribute | Type | required | Description | | Attribute | Type | required | Description |
|----------------|---------|----------|--------------------------| |----------------|---------|----------|--------------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `trigger_id` | integer | yes | The trigger id | | `trigger_id` | integer | yes | The trigger id |
``` ```
......
...@@ -10,7 +10,7 @@ GET /projects/:id/pipelines ...@@ -10,7 +10,7 @@ GET /projects/:id/pipelines
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|-----------|---------|----------|---------------------| |-----------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
``` ```
curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/pipelines" curl --header "PRIVATE-TOKEN: 9koXpg98eAheJpvBs5tK" "https://gitlab.example.com/api/v4/projects/1/pipelines"
...@@ -45,7 +45,7 @@ GET /projects/:id/pipelines/:pipeline_id ...@@ -45,7 +45,7 @@ GET /projects/:id/pipelines/:pipeline_id
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|------------|---------|----------|---------------------| |------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `pipeline_id` | integer | yes | The ID of a pipeline | | `pipeline_id` | integer | yes | The ID of a pipeline |
``` ```
...@@ -91,7 +91,7 @@ POST /projects/:id/pipeline ...@@ -91,7 +91,7 @@ POST /projects/:id/pipeline
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|------------|---------|----------|---------------------| |------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `ref` | string | yes | Reference to commit | | `ref` | string | yes | Reference to commit |
``` ```
...@@ -137,7 +137,7 @@ POST /projects/:id/pipelines/:pipeline_id/retry ...@@ -137,7 +137,7 @@ POST /projects/:id/pipelines/:pipeline_id/retry
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|------------|---------|----------|---------------------| |------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `pipeline_id` | integer | yes | The ID of a pipeline | | `pipeline_id` | integer | yes | The ID of a pipeline |
``` ```
...@@ -183,7 +183,7 @@ POST /projects/:id/pipelines/:pipeline_id/cancel ...@@ -183,7 +183,7 @@ POST /projects/:id/pipelines/:pipeline_id/cancel
| Attribute | Type | Required | Description | | Attribute | Type | Required | Description |
|------------|---------|----------|---------------------| |------------|---------|----------|---------------------|
| `id` | integer | yes | The ID of a project | | `id` | integer/string | yes | The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user |
| `pipeline_id` | integer | yes | The ID of a pipeline | | `pipeline_id` | integer | yes | The ID of a pipeline |
``` ```
......
...@@ -23,7 +23,7 @@ GET /projects/:id/snippets ...@@ -23,7 +23,7 @@ GET /projects/:id/snippets
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
## Single snippet ## Single snippet
...@@ -35,7 +35,7 @@ GET /projects/:id/snippets/:snippet_id ...@@ -35,7 +35,7 @@ GET /projects/:id/snippets/:snippet_id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `snippet_id` (required) - The ID of a project's snippet - `snippet_id` (required) - The ID of a project's snippet
```json ```json
...@@ -67,7 +67,7 @@ POST /projects/:id/snippets ...@@ -67,7 +67,7 @@ POST /projects/:id/snippets
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `title` (required) - The title of a snippet - `title` (required) - The title of a snippet
- `file_name` (required) - The name of a snippet file - `file_name` (required) - The name of a snippet file
- `code` (required) - The content of a snippet - `code` (required) - The content of a snippet
...@@ -83,7 +83,7 @@ PUT /projects/:id/snippets/:snippet_id ...@@ -83,7 +83,7 @@ PUT /projects/:id/snippets/:snippet_id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `snippet_id` (required) - The ID of a project's snippet - `snippet_id` (required) - The ID of a project's snippet
- `title` (optional) - The title of a snippet - `title` (optional) - The title of a snippet
- `file_name` (optional) - The name of a snippet file - `file_name` (optional) - The name of a snippet file
...@@ -101,7 +101,7 @@ DELETE /projects/:id/snippets/:snippet_id ...@@ -101,7 +101,7 @@ DELETE /projects/:id/snippets/:snippet_id
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `snippet_id` (required) - The ID of a project's snippet - `snippet_id` (required) - The ID of a project's snippet
## Snippet content ## Snippet content
...@@ -114,5 +114,5 @@ GET /projects/:id/snippets/:snippet_id/raw ...@@ -114,5 +114,5 @@ GET /projects/:id/snippets/:snippet_id/raw
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `snippet_id` (required) - The ID of a project's snippet - `snippet_id` (required) - The ID of a project's snippet
This diff is collapsed.
...@@ -13,7 +13,7 @@ GET /projects/:id/repository/tree ...@@ -13,7 +13,7 @@ GET /projects/:id/repository/tree
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `path` (optional) - The path inside repository. Used to get contend of subdirectories - `path` (optional) - The path inside repository. Used to get contend of subdirectories
- `ref` (optional) - The name of a repository branch or tag or if not given the default branch - `ref` (optional) - The name of a repository branch or tag or if not given the default branch
- `recursive` (optional) - Boolean value used to get a recursive tree (false by default) - `recursive` (optional) - Boolean value used to get a recursive tree (false by default)
...@@ -84,7 +84,7 @@ GET /projects/:id/repository/blobs/:sha ...@@ -84,7 +84,7 @@ GET /projects/:id/repository/blobs/:sha
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `sha` (required) - The commit or branch name - `sha` (required) - The commit or branch name
## Raw blob content ## Raw blob content
...@@ -98,7 +98,7 @@ GET /projects/:id/repository/blobs/:sha/raw ...@@ -98,7 +98,7 @@ GET /projects/:id/repository/blobs/:sha/raw
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `sha` (required) - The blob SHA - `sha` (required) - The blob SHA
## Get file archive ## Get file archive
...@@ -112,7 +112,7 @@ GET /projects/:id/repository/archive ...@@ -112,7 +112,7 @@ GET /projects/:id/repository/archive
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `sha` (optional) - The commit SHA to download defaults to the tip of the default branch - `sha` (optional) - The commit SHA to download defaults to the tip of the default branch
## Compare branches, tags or commits ## Compare branches, tags or commits
...@@ -126,7 +126,7 @@ GET /projects/:id/repository/compare ...@@ -126,7 +126,7 @@ GET /projects/:id/repository/compare
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
- `from` (required) - the commit SHA or branch name - `from` (required) - the commit SHA or branch name
- `to` (required) - the commit SHA or branch name - `to` (required) - the commit SHA or branch name
...@@ -181,7 +181,7 @@ GET /projects/:id/repository/contributors ...@@ -181,7 +181,7 @@ GET /projects/:id/repository/contributors
Parameters: Parameters:
- `id` (required) - The ID of a project - `id` (required) - The ID or [URL-encoded path of the project](README.md#namespaced-path-encoding) owned by the authenticated user
Response: Response:
......
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
This diff is collapsed.
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment