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

Add latest changes from gitlab-org/gitlab@master

parent 51a95129
No related branches found
No related tags found
No related merge requests found
Showing
with 85 additions and 66 deletions
Please view this file on the master branch, on stable branches it's out of date.
 
## 12.8.1
### Performance (1 change)
- Geo - Fix query to retrieve Job Artifacts when selective sync is disabled. !25388
## 12.8.0
 
### Removed (1 change)
Loading
Loading
8.22.0
8.23.0
Loading
Loading
@@ -55,9 +55,9 @@ export default {
<template>
<section id="grafana" class="settings no-animate js-grafana-integration">
<div class="settings-header">
<h4 class="js-section-header">
<h3 class="js-section-header h4">
{{ s__('GrafanaIntegration|Grafana Authentication') }}
</h4>
</h3>
<gl-button class="js-settings-toggle">{{ __('Expand') }}</gl-button>
<p class="js-section-sub-header">
{{ s__('GrafanaIntegration|Embed Grafana charts in GitLab issues.') }}
Loading
Loading
Loading
Loading
@@ -33,9 +33,9 @@ export default {
<template>
<section class="settings no-animate">
<div class="settings-header">
<h4 class="js-section-header">
<h3 class="js-section-header h4">
{{ s__('ExternalMetrics|External Dashboard') }}
</h4>
</h3>
<gl-button class="js-settings-toggle">{{ __('Expand') }}</gl-button>
<p class="js-section-sub-header">
{{
Loading
Loading
Loading
Loading
@@ -13,19 +13,21 @@ export default () => {
});
}
 
const pipelineTabLink = document.querySelector('.js-pipeline-tab-link a');
const { controllerAction } = document.querySelector('.js-pipeline-container').dataset;
const pipelineStatusUrl = `${document
.querySelector('.js-pipeline-tab-link a')
.getAttribute('href')}/status.json`;
 
// eslint-disable-next-line no-new
new Pipelines({
initTabs: true,
pipelineStatusUrl,
tabsOptions: {
action: controllerAction,
defaultAction: 'pipelines',
parentEl: '.pipelines-tabs',
},
});
if (pipelineTabLink) {
const pipelineStatusUrl = `${pipelineTabLink.getAttribute('href')}/status.json`;
// eslint-disable-next-line no-new
new Pipelines({
initTabs: true,
pipelineStatusUrl,
tabsOptions: {
action: controllerAction,
defaultAction: 'pipelines',
parentEl: '.pipelines-tabs',
},
});
}
};
import PersistentUserCallout from '~/persistent_user_callout';
document.addEventListener('DOMContentLoaded', () => {
const callout = document.querySelector('.js-webhooks-moved-alert');
PersistentUserCallout.factory(callout);
});
Loading
Loading
@@ -95,14 +95,14 @@ export default () => {
},
});
 
const tabsElement = document.querySelector('.pipelines-tabs');
const testReportsEnabled =
window.gon && window.gon.features && window.gon.features.junitPipelineView;
 
if (testReportsEnabled) {
if (tabsElement && testReportsEnabled) {
const fetchReportsAction = 'fetchReports';
testReportsStore.dispatch('setEndpoint', dataset.testReportEndpoint);
 
const tabsElmement = document.querySelector('.pipelines-tabs');
const isTestTabActive = Boolean(
document.querySelector('.pipelines-tabs > li > a.test-tab.active'),
);
Loading
Loading
@@ -113,11 +113,11 @@ export default () => {
const tabClickHandler = e => {
if (e.target.className === 'test-tab') {
testReportsStore.dispatch(fetchReportsAction);
tabsElmement.removeEventListener('click', tabClickHandler);
tabsElement.removeEventListener('click', tabClickHandler);
}
};
 
tabsElmement.addEventListener('click', tabClickHandler);
tabsElement.addEventListener('click', tabClickHandler);
}
 
// eslint-disable-next-line no-new
Loading
Loading
Loading
Loading
@@ -76,7 +76,7 @@ export default {
<div v-else-if="shouldRenderSuccessState" class="js-success-state">
<release-block
v-for="(release, index) in releases"
:key="release.tag_name"
:key="release.tagName"
:release="release"
:class="{ 'linked-card': releases.length > 1 && index !== releases.length - 1 }"
/>
Loading
Loading
Loading
Loading
@@ -25,16 +25,16 @@ export default {
},
computed: {
evidenceTitle() {
return sprintf(__('%{tag}-evidence.json'), { tag: this.release.tag_name });
return sprintf(__('%{tag}-evidence.json'), { tag: this.release.tagName });
},
evidenceUrl() {
return this.release.assets && this.release.assets.evidence_file_path;
return this.release.assets && this.release.assets.evidenceFilePath;
},
shortSha() {
return truncateSha(this.sha);
},
sha() {
return this.release.evidence_sha;
return this.release.evidenceSha;
},
},
};
Loading
Loading
Loading
Loading
@@ -38,13 +38,13 @@ export default {
},
computed: {
id() {
return slugify(this.release.tag_name);
return slugify(this.release.tagName);
},
assets() {
return this.release.assets || {};
},
hasEvidence() {
return Boolean(this.release.evidence_sha);
return Boolean(this.release.evidenceSha);
},
milestones() {
return this.release.milestones || [];
Loading
Loading
@@ -102,7 +102,7 @@ export default {
<evidence-block v-if="hasEvidence && shouldShowEvidence" :release="release" />
 
<div ref="gfm-content" class="card-text prepend-top-default">
<div v-html="release.description_html"></div>
<div v-html="release.descriptionHtml"></div>
</div>
</div>
 
Loading
Loading
@@ -110,11 +110,11 @@ export default {
v-if="shouldShowFooter"
class="card-footer"
:commit="release.commit"
:commit-path="release.commit_path"
:tag-name="release.tag_name"
:tag-path="release.tag_path"
:commit-path="release.commitPath"
:tag-name="release.tagName"
:tag-path="release.tagPath"
:author="release.author"
:released-at="release.released_at"
:released-at="release.releasedAt"
/>
</div>
</template>
Loading
Loading
@@ -31,8 +31,8 @@ export default {
<template #user>
<user-avatar-link
class="prepend-left-4"
:link-href="author.web_url"
:img-src="author.avatar_url"
:link-href="author.webUrl"
:img-src="author.avatarUrl"
:img-alt="userImageAltDescription"
:tooltip-text="author.username"
/>
Loading
Loading
Loading
Loading
@@ -66,9 +66,9 @@ export default {
<icon ref="commitIcon" name="commit" class="mr-1" />
<div v-gl-tooltip.bottom :title="commit.title">
<gl-link v-if="commitPath" :href="commitPath">
{{ commit.short_id }}
{{ commit.shortId }}
</gl-link>
<span v-else>{{ commit.short_id }}</span>
<span v-else>{{ commit.shortId }}</span>
</div>
</div>
 
Loading
Loading
@@ -100,8 +100,8 @@ export default {
<div v-if="author" class="d-flex">
<span class="text-secondary">{{ __('by') }}&nbsp;</span>
<user-avatar-link
:link-href="author.web_url"
:img-src="author.avatar_url"
:link-href="author.webUrl"
:img-src="author.avatarUrl"
:img-alt="userImageAltDescription"
:tooltip-text="author.username"
tooltip-placement="bottom"
Loading
Loading
Loading
Loading
@@ -20,10 +20,10 @@ export default {
},
computed: {
editLink() {
return this.release._links?.edit_url;
return this.release.Links?.editUrl;
},
selfLink() {
return this.release._links?.self;
return this.release.Links?.self;
},
},
};
Loading
Loading
@@ -36,7 +36,7 @@ export default {
{{ release.name }}
</gl-link>
<template v-else>{{ release.name }}</template>
<gl-badge v-if="release.upcoming_release" variant="warning" class="align-middle">{{
<gl-badge v-if="release.upcomingRelease" variant="warning" class="align-middle">{{
__('Upcoming Release')
}}</gl-badge>
</h2>
Loading
Loading
Loading
Loading
@@ -32,21 +32,21 @@ export default {
return this.release.commit || {};
},
commitUrl() {
return this.release.commit_path;
return this.release.commitPath;
},
hasAuthor() {
return Boolean(this.author);
},
releasedTimeAgo() {
return sprintf(__('released %{time}'), {
time: this.timeFormatted(this.release.released_at),
time: this.timeFormatted(this.release.releasedAt),
});
},
shouldRenderMilestones() {
return Boolean(this.release.milestones?.length);
},
tagUrl() {
return this.release.tag_path;
return this.release.tagPath;
},
},
};
Loading
Loading
@@ -57,24 +57,24 @@ export default {
<div class="append-right-8">
<icon name="commit" class="align-middle" />
<gl-link v-if="commitUrl" v-gl-tooltip.bottom :title="commit.title" :href="commitUrl">
{{ commit.short_id }}
{{ commit.shortId }}
</gl-link>
<span v-else v-gl-tooltip.bottom :title="commit.title">{{ commit.short_id }}</span>
<span v-else v-gl-tooltip.bottom :title="commit.title">{{ commit.shortId }}</span>
</div>
 
<div class="append-right-8">
<icon name="tag" class="align-middle" />
<gl-link v-if="tagUrl" v-gl-tooltip.bottom :title="__('Tag')" :href="tagUrl">
{{ release.tag_name }}
{{ release.tagName }}
</gl-link>
<span v-else v-gl-tooltip.bottom :title="__('Tag')">{{ release.tag_name }}</span>
<span v-else v-gl-tooltip.bottom :title="__('Tag')">{{ release.tagName }}</span>
</div>
 
<release-block-milestones v-if="shouldRenderMilestones" :milestones="release.milestones" />
 
<div class="append-right-4">
&bull;
<span v-gl-tooltip.bottom :title="tooltipTitle(release.released_at)">
<span v-gl-tooltip.bottom :title="tooltipTitle(release.releasedAt)">
{{ releasedTimeAgo }}
</span>
</div>
Loading
Loading
Loading
Loading
@@ -40,7 +40,7 @@ export default {
return Number.isNaN(percent) ? 0 : percent;
},
allIssueStats() {
return this.milestones.map(m => m.issue_stats || {});
return this.milestones.map(m => m.issueStats || {});
},
openIssuesCount() {
return this.allIssueStats.map(stats => stats.opened || 0).reduce(sumReducer);
Loading
Loading
@@ -109,7 +109,7 @@ export default {
:key="milestone.id"
v-gl-tooltip
:title="milestone.description"
:href="milestone.web_url"
:href="milestone.webUrl"
class="append-right-4"
>
{{ milestone.title }}
Loading
Loading
Loading
Loading
@@ -38,7 +38,7 @@ export default {
:key="milestone.id"
v-gl-tooltip
:title="milestone.description"
:href="milestone.web_url"
:href="milestone.webUrl"
class="mx-1 js-milestone-link"
>
{{ milestone.title }}
Loading
Loading
Loading
Loading
@@ -22,8 +22,7 @@ export const fetchRelease = ({ dispatch, state }) => {
return api
.release(state.projectId, state.tagName)
.then(({ data: release }) => {
const camelCasedRelease = convertObjectPropsToCamelCase(release, { deep: true });
dispatch('receiveReleaseSuccess', camelCasedRelease);
dispatch('receiveReleaseSuccess', convertObjectPropsToCamelCase(release, { deep: true }));
})
.catch(error => {
dispatch('receiveReleaseError', error);
Loading
Loading
Loading
Loading
@@ -2,7 +2,11 @@ import * as types from './mutation_types';
import createFlash from '~/flash';
import { __ } from '~/locale';
import api from '~/api';
import { normalizeHeaders, parseIntPagination } from '~/lib/utils/common_utils';
import {
normalizeHeaders,
parseIntPagination,
convertObjectPropsToCamelCase,
} from '~/lib/utils/common_utils';
 
/**
* Commits a mutation to update the state while the main endpoint is being requested.
Loading
Loading
@@ -28,7 +32,11 @@ export const fetchReleases = ({ dispatch }, { page = '1', projectId }) => {
 
export const receiveReleasesSuccess = ({ commit }, { data, headers }) => {
const pageInfo = parseIntPagination(normalizeHeaders(headers));
commit(types.RECEIVE_RELEASES_SUCCESS, { data, pageInfo });
const camelCasedReleases = convertObjectPropsToCamelCase(data, { deep: true });
commit(types.RECEIVE_RELEASES_SUCCESS, {
data: camelCasedReleases,
pageInfo,
});
};
 
export const receiveReleasesError = ({ commit }) => {
Loading
Loading
Loading
Loading
@@ -12,7 +12,8 @@ class Projects::HooksController < Projects::ApplicationController
layout "project_settings"
 
def index
redirect_to project_settings_integrations_path(@project)
@hooks = @project.hooks
@hook = ProjectHook.new
end
 
def create
Loading
Loading
@@ -24,7 +25,7 @@ class Projects::HooksController < Projects::ApplicationController
flash[:alert] = @hook.errors.full_messages.join.html_safe
end
 
redirect_to project_settings_integrations_path(@project)
redirect_to action: :index
end
 
def edit
Loading
Loading
@@ -33,7 +34,7 @@ class Projects::HooksController < Projects::ApplicationController
def update
if hook.update(hook_params)
flash[:notice] = _('Hook was successfully updated.')
redirect_to project_settings_integrations_path(@project)
redirect_to action: :index
else
render 'edit'
end
Loading
Loading
@@ -44,13 +45,13 @@ class Projects::HooksController < Projects::ApplicationController
 
set_hook_execution_notice(result)
 
redirect_back_or_default(default: { action: 'index' })
redirect_back_or_default(default: { action: :index })
end
 
def destroy
hook.destroy
 
redirect_to project_settings_integrations_path(@project), status: :found
redirect_to action: :index, status: :found
end
 
private
Loading
Loading
Loading
Loading
@@ -9,10 +9,6 @@ module Projects
layout "project_settings"
 
def show
@hooks = @project.hooks
@hook = ProjectHook.new
# Services
@services = @project.find_or_initialize_services(exceptions: service_exceptions)
end
 
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment