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

Add latest changes from gitlab-org/gitlab@master

parent 0e2fc170
No related branches found
No related tags found
No related merge requests found
Showing
with 152 additions and 37 deletions
Loading
Loading
@@ -166,6 +166,7 @@ export default () => {
humanTotalTimeSpent,
weight,
epic,
assignees,
} = convertObjectPropsToCamelCase(data);
 
newIssue.setFetchingState('subscriptions', false);
Loading
Loading
@@ -179,6 +180,7 @@ export default () => {
subscribed,
weight,
epic,
assignees,
});
})
.catch(() => {
Loading
Loading
/* eslint-disable func-names, no-var, no-else-return, consistent-return, one-var, no-return-assign */
/* eslint-disable func-names, no-else-return, consistent-return, one-var, no-return-assign */
 
import $ from 'jquery';
 
Loading
Loading
@@ -51,7 +51,7 @@ export default class ImageFile {
}
// eslint-disable-next-line class-methods-use-this
initDraggable($el, padding, callback) {
var dragging = false;
let dragging = false;
const $body = $('body');
const $offsetEl = $el.parent();
const dragStart = function() {
Loading
Loading
@@ -88,14 +88,12 @@ export default class ImageFile {
}
 
static prepareFrames(view) {
var maxHeight, maxWidth;
maxWidth = 0;
maxHeight = 0;
let maxWidth = 0;
let maxHeight = 0;
$('.frame', view)
.each((index, frame) => {
var height, width;
width = $(frame).width();
height = $(frame).height();
const width = $(frame).width();
const height = $(frame).height();
maxWidth = width > maxWidth ? width : maxWidth;
return (maxHeight = height > maxHeight ? height : maxHeight);
})
Loading
Loading
@@ -110,8 +108,7 @@ export default class ImageFile {
'two-up': function() {
return $('.two-up.view .wrap', this.file).each((index, wrap) => {
$('img', wrap).each(function() {
var currentWidth;
currentWidth = $(this).width();
const currentWidth = $(this).width();
if (currentWidth > availWidth / 2) {
return $(this).width(availWidth / 2);
}
Loading
Loading
@@ -124,16 +121,14 @@ export default class ImageFile {
});
},
swipe() {
var maxHeight, maxWidth;
maxWidth = 0;
maxHeight = 0;
let maxWidth = 0;
let maxHeight = 0;
return $('.swipe.view', this.file).each((index, view) => {
var $swipeWrap, $swipeBar, $swipeFrame, wrapPadding;
const ref = ImageFile.prepareFrames(view);
[maxWidth, maxHeight] = ref;
$swipeFrame = $('.swipe-frame', view);
$swipeWrap = $('.swipe-wrap', view);
$swipeBar = $('.swipe-bar', view);
const $swipeFrame = $('.swipe-frame', view);
const $swipeWrap = $('.swipe-wrap', view);
const $swipeBar = $('.swipe-bar', view);
 
$swipeFrame.css({
width: maxWidth + 16,
Loading
Loading
@@ -148,7 +143,7 @@ export default class ImageFile {
left: 1,
});
 
wrapPadding = parseInt($swipeWrap.css('right').replace('px', ''), 10);
const wrapPadding = parseInt($swipeWrap.css('right').replace('px', ''), 10);
 
this.initDraggable($swipeBar, wrapPadding, (e, left) => {
if (left > 0 && left < $swipeFrame.width() - wrapPadding * 2) {
Loading
Loading
@@ -159,19 +154,17 @@ export default class ImageFile {
});
},
'onion-skin': function() {
var dragTrackWidth, maxHeight, maxWidth;
let maxHeight, maxWidth;
maxWidth = 0;
maxHeight = 0;
dragTrackWidth = $('.drag-track', this.file).width() - $('.dragger', this.file).width();
const dragTrackWidth = $('.drag-track', this.file).width() - $('.dragger', this.file).width();
return $('.onion-skin.view', this.file).each((index, view) => {
var $frame, $track, $dragger, $frameAdded, framePadding;
const ref = ImageFile.prepareFrames(view);
[maxWidth, maxHeight] = ref;
$frame = $('.onion-skin-frame', view);
$frameAdded = $('.frame.added', view);
$track = $('.drag-track', view);
$dragger = $('.dragger', $track);
const $frame = $('.onion-skin-frame', view);
const $frameAdded = $('.frame.added', view);
const $track = $('.drag-track', view);
const $dragger = $('.dragger', $track);
 
$frame.css({
width: maxWidth + 16,
Loading
Loading
@@ -186,10 +179,10 @@ export default class ImageFile {
});
 
$frameAdded.css('opacity', 1);
framePadding = parseInt($frameAdded.css('right').replace('px', ''), 10);
const framePadding = parseInt($frameAdded.css('right').replace('px', ''), 10);
 
this.initDraggable($dragger, framePadding, (e, left) => {
var opacity = left / dragTrackWidth;
const opacity = left / dragTrackWidth;
 
if (opacity >= 0 && opacity <= 1) {
$dragger.css('left', left);
Loading
Loading
Loading
Loading
@@ -97,7 +97,6 @@ export default {
v-for="(graphData, graphIndex) in charts"
:key="`panel-type-${graphIndex}`"
class="w-100"
clipboard-text=""
:graph-data="graphData"
:group-id="dashboardUrl"
/>
Loading
Loading
Loading
Loading
@@ -36,7 +36,8 @@ export default {
props: {
clipboardText: {
type: String,
required: true,
required: false,
default: '',
},
graphData: {
type: Object,
Loading
Loading
@@ -152,6 +153,7 @@ export default {
{{ __('Download CSV') }}
</gl-dropdown-item>
<gl-dropdown-item
v-if="clipboardText"
v-track-event="generateLinkToChartOptions(clipboardText)"
class="js-chart-link"
:data-clipboard-text="clipboardText"
Loading
Loading
Loading
Loading
@@ -12,6 +12,9 @@ export default {
},
mixins: [Issuable, issuableStateMixin],
computed: {
projectArchivedWarning() {
return __('This project is archived and cannot be commented on.');
},
lockedIssueWarning() {
return sprintf(
__('This %{issuableDisplayName} is locked. Only project members can comment.'),
Loading
Loading
@@ -26,9 +29,15 @@ export default {
<div class="disabled-comment text-center">
<span class="issuable-note-warning inline">
<icon :size="16" name="lock" class="icon" />
<span>
{{ lockedIssueWarning }}
<span v-if="isProjectArchived">
{{ projectArchivedWarning }}
<gl-link :href="archivedProjectDocsPath" target="_blank" class="learn-more">
{{ __('Learn more') }}
</gl-link>
</span>
 
<span v-else>
{{ lockedIssueWarning }}
<gl-link :href="lockedIssueDocsPath" target="_blank" class="learn-more">
{{ __('Learn more') }}
</gl-link>
Loading
Loading
Loading
Loading
@@ -3,6 +3,12 @@ import { mapGetters } from 'vuex';
export default {
computed: {
...mapGetters(['getNoteableDataByProp']),
isProjectArchived() {
return this.getNoteableDataByProp('is_project_archived');
},
archivedProjectDocsPath() {
return this.getNoteableDataByProp('archived_project_docs_path');
},
lockedIssueDocsPath() {
return this.getNoteableDataByProp('locked_discussion_docs_path');
},
Loading
Loading
<script>
import { GlTooltipDirective, GlLink } from '@gitlab/ui';
import { __, sprintf } from '~/locale';
import { joinPaths } from '~/lib/utils/url_utility';
import AssigneeAvatar from './assignee_avatar.vue';
 
export default {
Loading
Loading
@@ -60,7 +59,7 @@ export default {
};
},
assigneeUrl() {
return joinPaths(`${this.rootPath}`, `${this.user.username}`);
return this.user.web_url;
},
},
};
Loading
Loading
Loading
Loading
@@ -53,7 +53,7 @@ class AutocompleteController < ApplicationController
private
 
def target_branch_params
params.permit(:group_id, :project_id)
params.permit(:group_id, :project_id).select { |_, v| v.present? }
end
end
 
Loading
Loading
Loading
Loading
@@ -502,6 +502,10 @@ module Ci
builds.skipped.after_stage(stage_idx).find_each(&:process)
end
 
def child?
false
end
def latest?
return false unless git_ref && commit.present?
 
Loading
Loading
Loading
Loading
@@ -64,4 +64,12 @@ class IssueEntity < IssuableEntity
expose :locked_discussion_docs_path, if: -> (issue) { issue.discussion_locked? } do |issue|
help_page_path('user/discussions/index.md', anchor: 'lock-discussions')
end
expose :is_project_archived do |issue|
issue.project.archived?
end
expose :archived_project_docs_path, if: -> (issue) { issue.project.archived? } do |issue|
help_page_path('user/project/settings/index.md', anchor: 'archiving-a-project')
end
end
Loading
Loading
@@ -42,6 +42,18 @@ class MergeRequestNoteableEntity < IssuableEntity
end
end
 
expose :locked_discussion_docs_path, if: -> (merge_request) { merge_request.discussion_locked? } do |merge_request|
help_page_path('user/discussions/index.md', anchor: 'lock-discussions')
end
expose :is_project_archived do |merge_request|
merge_request.project.archived?
end
expose :archived_project_docs_path, if: -> (merge_request) { merge_request.project.archived? } do |merge_request|
help_page_path('user/project/settings/index.md', anchor: 'archiving-a-project')
end
private
 
delegate :current_user, to: :request
Loading
Loading
Loading
Loading
@@ -19,7 +19,8 @@
= group_icon(@group, class: "avatar s60")
%li
%span.light= _('Name:')
%strong= @group.name
%strong
= link_to @group.name, group_path(@group)
%li
%span.light= _('Path:')
%strong
Loading
Loading
Loading
Loading
@@ -20,6 +20,11 @@
.well-segment.qa-pipeline-badges
.icon-container
= sprite_icon('flag')
- if @pipeline.child?
%span.js-pipeline-child.badge.badge-primary.has-tooltip{ title: s_("Pipelines|This is a child pipeline within the parent pipeline") }
= s_('Pipelines|Child pipeline')
= surround '(', ')' do
= link_to s_('Pipelines|parent'), pipeline_path(@pipeline.triggered_by_pipeline), class: 'text-white text-underline'
- if @pipeline.latest?
%span.js-pipeline-url-latest.badge.badge-success.has-tooltip{ title: _("Latest pipeline for the most recent commit on this branch") }
latest
Loading
Loading
---
title: Show correct warning on issue when project is archived
merge_request: 20078
author:
type: fixed
---
title: Add child label to commit box
merge_request: 21323
author:
type: added
---
title: Fix assignee url in issue board sidebar
merge_request: 20992
author: Lee Tickett
type: fixed
---
title: Remove var from app/assets/javascripts/commit/image_file.js
merge_request: 21649
author: Abubakar Hassan
type: other
---
title: link to group on group admin page
merge_request: 21709
author:
type: added
Loading
Loading
@@ -91,7 +91,7 @@ GitLab.com, CI/CD, and related services are deployed into Google Cloud Platform
IP based firewall can be configured by looking up all
[IP address ranges or CIDR blocks for GCP](https://cloud.google.com/compute/docs/faq#where_can_i_find_product_name_short_ip_ranges).
 
[Static endpoints](https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/5071) are being considered.
[Static endpoints](https://gitlab.com/groups/gitlab-com/gl-infra/-/epics/97) are being considered.
 
## Shared Runners
 
Loading
Loading
---
type: reference, howto
description: "Documentation on Git file blame."
---
# Git file blame
> [Introduced](https://git.sphere.ly/staff/publicgitlab/commit/39c657930625ddc3ac8a921f01ffc83acadce68f) in GitLab 2.5
[Git blame](https://git-scm.com/docs/git-blame) provides more information
about every line in a file, including the last modified time, author, and
commit hash.
You can find the **Blame** button with each file in a project.
![File blame button](img/file_blame_button_v12_6.png "Blame button")
When you select the **Blame** button, you'll see a screen with the
noted information:
![Git blame output](img/file_blame_output_v12_6.png "Blame button output")
If you hover over a commit in the UI, you'll see a precise date and time
for that commit.
## Associated `git` command
If you're running `git` from the command line, the equivalent command is
`git blame <filename>`. For example, if you want to find `blame` information
about a `README.md` file in the local directory, run the following command:
```bash
git blame README.md
```
You'll see output similar to the following, which includes the commit time
in UTC format:
```bash
62e2353a (Achilleas Pipinellis 2019-07-11 14:52:18 +0300 1) [![build status](https://gitlab.com/gitlab-org/gitlab-docs/badges/master/build.svg)](https://gitlab.com/gitlab-com/gitlab-docs/commits/master)
fb0fc7d6 (Achilleas Pipinellis 2016-11-07 22:21:22 +0100 2)
^764ca75 (Connor Shea 2016-10-05 23:40:24 -0600 3) # GitLab Documentation
^764ca75 (Connor Shea 2016-10-05 23:40:24 -0600 4)
0e62ed6d (Mike Jang 2019-11-26 21:44:53 +0000 5) This project hosts the repository used to generate the GitLab
0e62ed6d (Mike Jang 2019-11-26 21:44:53 +0000 6) documentation website and deployed to https://docs.gitlab.com. It uses the
```
## File blame through the API
You can also get this information over the [Git file blame REST API](../../../api/repository_files.md#get-file-blame-from-repository).
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment