Skip to content

Commit 9305db9

Browse files
author
GitLab Bot
committed
Add latest changes from gitlab-org/gitlab@master
1 parent 24bc87b commit 9305db9

File tree

103 files changed

+1113
-420
lines changed

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

103 files changed

+1113
-420
lines changed

.gitlab/issue_templates/Secret_Detection_Pattern_Change.md

Lines changed: 15 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,26 @@ Please briefly describe what you are looking to add or change and select the app
1212
<!--
1313
Please add a link to the vendor, documentation and any contact information you may have.
1414
-->
15+
- Vendor:
16+
- Documentation:
17+
1518

1619
## Examples
1720

1821
<!--
19-
Please provide a list of examples of what this secret type could look like.
22+
Please provide a list of at least 5 examples of what this secret type could look like.
23+
-->
24+
1.
25+
1.
26+
1.
27+
1.
28+
1.
29+
30+
## Remediation Guidance (Optional)
31+
<!--
32+
Please include any information you might have on how to rotate or revoke this secret type.
2033
-->
34+
_If you would like to contribute your own changes, please open an MR in the [Secret Detection Rules](https://gitlab.com/gitlab-org/security-products/secret-detection/secret-detection-rules/-/tree/main) repository. To get started please reference the adding new rules section in the `README.MD`._
2135

2236

2337
/label ~"section::sec" ~"devops::application security testing" ~"group::secret detection" ~"GitLab Ultimate" ~"Category:Secret Detection" ~"Secret Detection:Pattern Change" ~"type::maintenance"

app/assets/javascripts/access_tokens/index.js

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,7 +31,11 @@ export const initAccessTokenTableApp = () => {
3131
// Default values
3232
const noActiveTokensMessage =
3333
noTokensMessage ||
34-
sprintf(__('This user has no active %{accessTokenTypePlural}.'), { accessTokenTypePlural });
34+
sprintf(
35+
__('This user has no active %{accessTokenTypePlural}.'),
36+
{ accessTokenTypePlural },
37+
false,
38+
);
3539
const showRole = 'showRole' in el.dataset;
3640

3741
const initialActiveAccessTokens = JSON.parse(initialActiveAccessTokensJson);

app/assets/javascripts/behaviors/markdown/render_gfm.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ import { renderJSONTable, renderJSONTableHTML } from './render_json_table';
88

99
function initPopovers(elements) {
1010
if (!elements.length) return;
11-
import(/* webpackChunkName: 'IssuablePopoverBundle' */ 'ee_else_ce/issuable/popover')
11+
import(/* webpackChunkName: 'IssuablePopoverBundle' */ '~/issuable/popover')
1212
.then(({ default: initIssuablePopovers }) => {
1313
initIssuablePopovers(elements);
1414
})

app/assets/javascripts/boards/components/issue_due_date.vue

Lines changed: 19 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,7 @@ import dateFormat from '~/lib/dateformat';
44
import {
55
getDayDifference,
66
getTimeago,
7+
humanTimeframe,
78
localeDateFormat,
89
newDate,
910
} from '~/lib/utils/datetime_utility';
@@ -25,6 +26,11 @@ export default {
2526
type: String,
2627
required: true,
2728
},
29+
startDate: {
30+
type: String,
31+
required: false,
32+
default: undefined,
33+
},
2834
cssClass: {
2935
type: String,
3036
required: false,
@@ -39,32 +45,28 @@ export default {
3945
computed: {
4046
title() {
4147
const timeago = getTimeago();
42-
const { timeDifference, standardDateFormat } = this;
43-
const formattedDate = standardDateFormat;
4448
45-
if (timeDifference >= -1 && timeDifference < 7) {
46-
return `${timeago.format(this.issueDueDate)} (${formattedDate})`;
49+
if (this.timeDifference >= -1 && this.timeDifference < 7) {
50+
return `${timeago.format(this.issueDueDate)} (${this.standardDateFormat})`;
4751
}
4852
4953
return timeago.format(this.issueDueDate);
5054
},
5155
body() {
52-
const { timeDifference, issueDueDate, standardDateFormat } = this;
53-
54-
if (timeDifference === 0) {
56+
if (this.timeDifference === 0) {
5557
return __('Today');
5658
}
57-
if (timeDifference === 1) {
59+
if (this.timeDifference === 1) {
5860
return __('Tomorrow');
5961
}
60-
if (timeDifference === -1) {
62+
if (this.timeDifference === -1) {
6163
return __('Yesterday');
6264
}
63-
if (timeDifference > 0 && timeDifference < 7) {
64-
return dateFormat(issueDueDate, 'dddd');
65+
if (this.timeDifference > 0 && this.timeDifference < 7) {
66+
return dateFormat(this.issueDueDate, 'dddd');
6567
}
6668
67-
return standardDateFormat;
69+
return this.standardDateFormat;
6870
},
6971
iconName() {
7072
return this.isOverdue ? 'calendar-overdue' : 'calendar';
@@ -77,10 +79,13 @@ export default {
7779
return getDayDifference(today, this.issueDueDate);
7880
},
7981
isOverdue() {
80-
if (this.timeDifference >= 0 || this.closed) return false;
81-
return true;
82+
return !this.closed && this.timeDifference < 0;
8283
},
8384
standardDateFormat() {
85+
if (this.startDate) {
86+
return humanTimeframe(newDate(this.startDate), this.issueDueDate);
87+
}
88+
8489
const today = new Date();
8590
return today.getFullYear() === this.issueDueDate.getFullYear()
8691
? localeDateFormat.asDateWithoutYear.format(this.issueDueDate)

app/assets/javascripts/ci/runner/components/runner_jobs.vue

Lines changed: 25 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,13 @@
11
<script>
2-
import { GlSkeletonLoader } from '@gitlab/ui';
32
import { createAlert } from '~/alert';
3+
import CrudComponent from '~/vue_shared/components/crud_component.vue';
44
import runnerJobsQuery from '../graphql/show/runner_jobs.query.graphql';
5-
import { I18N_FETCH_ERROR, I18N_NO_JOBS_FOUND, RUNNER_DETAILS_JOBS_PAGE_SIZE } from '../constants';
5+
import {
6+
I18N_FETCH_ERROR,
7+
I18N_JOBS,
8+
I18N_NO_JOBS_FOUND,
9+
RUNNER_DETAILS_JOBS_PAGE_SIZE,
10+
} from '../constants';
611
import { captureException } from '../sentry_utils';
712
import { getPaginationVariables } from '../utils';
813
import RunnerJobsTable from './runner_jobs_table.vue';
@@ -12,12 +17,11 @@ import RunnerJobsEmptyState from './runner_jobs_empty_state.vue';
1217
export default {
1318
name: 'RunnerJobs',
1419
components: {
15-
GlSkeletonLoader,
20+
CrudComponent,
1621
RunnerJobsTable,
1722
RunnerPagination,
1823
RunnerJobsEmptyState,
1924
},
20-
2125
props: {
2226
runner: {
2327
type: Object,
@@ -68,18 +72,28 @@ export default {
6872
this.pagination = value;
6973
},
7074
},
75+
I18N_JOBS,
7176
I18N_NO_JOBS_FOUND,
7277
};
7378
</script>
7479
7580
<template>
76-
<div class="gl-pt-3">
77-
<div v-if="loading" class="gl-py-5">
78-
<gl-skeleton-loader />
79-
</div>
80-
<runner-jobs-table v-else-if="jobs.items.length" :jobs="jobs.items" />
81+
<crud-component
82+
:title="$options.I18N_JOBS"
83+
icon="pipeline"
84+
:count="runner.jobCount"
85+
:is-loading="loading"
86+
class="gl-mt-5"
87+
>
88+
<runner-jobs-table v-if="jobs.items.length" :jobs="jobs.items" />
8189
<runner-jobs-empty-state v-else />
8290
83-
<runner-pagination :disabled="loading" :page-info="jobs.pageInfo" @input="onPaginationInput" />
84-
</div>
91+
<template #pagination>
92+
<runner-pagination
93+
:disabled="loading"
94+
:page-info="jobs.pageInfo"
95+
@input="onPaginationInput"
96+
/>
97+
</template>
98+
</crud-component>
8599
</template>

app/assets/javascripts/ci/runner/components/runner_pagination.vue

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,5 @@ export default {
3838
</script>
3939

4040
<template>
41-
<div v-if="isShown" class="gl-text-center">
42-
<gl-keyset-pagination v-bind="paginationProps" @prev="prevPage" @next="nextPage" />
43-
</div>
41+
<gl-keyset-pagination v-if="isShown" v-bind="paginationProps" @prev="prevPage" @next="nextPage" />
4442
</template>

app/assets/javascripts/ci/runner/constants.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ export const RUNNER_PAGE_SIZE = 20;
77
export const RUNNER_JOB_COUNT_LIMIT = 1000;
88

99
export const RUNNER_DETAILS_PROJECTS_PAGE_SIZE = 5;
10-
export const RUNNER_DETAILS_JOBS_PAGE_SIZE = 30;
10+
export const RUNNER_DETAILS_JOBS_PAGE_SIZE = 20;
1111

1212
export const I18N_FETCH_ERROR = s__('Runners|Something went wrong while fetching runner data.');
1313
export const I18N_CREATE_ERROR = s__(

app/assets/javascripts/diffs/components/diff_file.vue

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,7 @@ import NoteForm from '~/notes/components/note_form.vue';
2222
import diffLineNoteFormMixin from '~/notes/mixins/diff_line_note_form';
2323
import { fileContentsId } from '~/diffs/components/diff_row_utils';
2424
import { useLegacyDiffs } from '~/diffs/stores/legacy_diffs';
25+
import { useMrNotes } from '~/mr_notes/store/legacy_mr_notes';
2526
import {
2627
DIFF_FILE_AUTOMATIC_COLLAPSE,
2728
DIFF_FILE_MANUAL_COLLAPSE,
@@ -134,7 +135,8 @@ export default {
134135
'isVirtualScrollingEnabled',
135136
'linkedFile',
136137
]),
137-
...mapVuexGetters(['isLoggedIn', 'isNotesFetched', 'getNoteableData', 'noteableType']),
138+
...mapState(useMrNotes, ['isLoggedIn']),
139+
...mapVuexGetters(['isNotesFetched', 'getNoteableData', 'noteableType']),
138140
autosaveKey() {
139141
if (!this.isLoggedIn) return '';
140142

app/assets/javascripts/diffs/components/diff_line_note_form.vue

Lines changed: 3 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ import { commentLineOptions, formatLineRange } from '~/notes/components/multilin
1515
import NoteForm from '~/notes/components/note_form.vue';
1616
import { capitalizeFirstCharacter } from '~/lib/utils/text_utility';
1717
import { useLegacyDiffs } from '~/diffs/stores/legacy_diffs';
18+
import { useMrNotes } from '~/mr_notes/store/legacy_mr_notes';
1819
import {
1920
DIFF_NOTE_TYPE,
2021
INLINE_DIFF_LINES_KEY,
@@ -76,17 +77,12 @@ export default {
7677
'getDiffFileByHash',
7778
'diffLines',
7879
]),
80+
...mapState(useMrNotes, ['isLoggedIn']),
7981
...mapVuexState({
8082
noteableData: ({ notes }) => notes.noteableData,
8183
selectedCommentPosition: ({ notes }) => notes.selectedCommentPosition,
8284
}),
83-
...mapVuexGetters([
84-
'isLoggedIn',
85-
'noteableType',
86-
'getNoteableData',
87-
'getNotesDataByProp',
88-
'getUserData',
89-
]),
85+
...mapVuexGetters(['noteableType', 'getNoteableData', 'getNotesDataByProp', 'getUserData']),
9086
author() {
9187
return this.getUserData;
9288
},

app/assets/javascripts/diffs/index.js

Lines changed: 12 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,20 @@
11
import Vue from 'vue';
22
import VueApollo from 'vue-apollo';
33
// eslint-disable-next-line no-restricted-imports
4-
import { mapActions, mapState, mapGetters } from 'vuex';
4+
import {
5+
mapActions as mapVuexActions,
6+
mapState as mapVuexState,
7+
mapGetters as mapVuexGetters,
8+
} from 'vuex';
9+
import { mapState } from 'pinia';
510
import { cleanLeadingSeparator } from '~/lib/utils/url_utility';
611
import { apolloProvider } from '~/graphql_shared/issuable_client';
712
import { getCookie, parseBoolean, removeCookie } from '~/lib/utils/common_utils';
813
import store from '~/mr_notes/stores';
914
import { pinia } from '~/pinia/instance';
10-
15+
import { useMrNotes } from '~/mr_notes/store/legacy_mr_notes';
1116
import eventHub from '../notes/event_hub';
1217
import DiffsApp from './components/app.vue';
13-
1418
import { TREE_LIST_STORAGE_KEY, DIFF_WHITESPACE_COOKIE_NAME } from './constants';
1519

1620
export default function initDiffsApp() {
@@ -47,9 +51,7 @@ export default function initDiffsApp() {
4751
};
4852
},
4953
computed: {
50-
...mapState({
51-
activeTab: (state) => state.page.activeTab,
52-
}),
54+
...mapState(useMrNotes, ['activeTab']),
5355
},
5456
created() {
5557
const treeListStored = localStorage.getItem(TREE_LIST_STORAGE_KEY);
@@ -79,7 +81,7 @@ export default function initDiffsApp() {
7981
}
8082
},
8183
methods: {
82-
...mapActions('diffs', ['setRenderTreeList', 'setShowWhitespace']),
84+
...mapVuexActions('diffs', ['setRenderTreeList', 'setShowWhitespace']),
8385
},
8486
render(createElement) {
8587
return createElement('diffs-app', {
@@ -111,8 +113,8 @@ export default function initDiffsApp() {
111113
FindFile: () => import('~/vue_shared/components/file_finder/index.vue'),
112114
},
113115
computed: {
114-
...mapState('diffs', ['fileFinderVisible', 'isLoading']),
115-
...mapGetters('diffs', ['flatBlobsList']),
116+
...mapVuexState('diffs', ['fileFinderVisible', 'isLoading']),
117+
...mapVuexGetters('diffs', ['flatBlobsList']),
116118
},
117119
watch: {
118120
fileFinderVisible(newVal, oldVal) {
@@ -122,7 +124,7 @@ export default function initDiffsApp() {
122124
},
123125
},
124126
methods: {
125-
...mapActions('diffs', ['toggleFileFinder', 'scrollToFile']),
127+
...mapVuexActions('diffs', ['toggleFileFinder', 'scrollToFile']),
126128
openFile(file) {
127129
window.mrTabs.tabShown('diffs');
128130
this.scrollToFile({ path: file.path });

app/assets/javascripts/glql/components/presenters/issuable.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
import { GlLink, GlIntersperse } from '@gitlab/ui';
3-
import initIssuablePopovers from 'ee_else_ce/issuable/popover';
3+
import initIssuablePopovers from '~/issuable/popover';
44
import { extractGroupOrProject } from '../../utils/common';
55
66
const types = {

app/assets/javascripts/glql/components/presenters/milestone.vue

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
<script>
22
import { GlLink } from '@gitlab/ui';
3-
import initIssuablePopovers from 'ee_else_ce/issuable/popover';
3+
import initIssuablePopovers from '~/issuable/popover';
44
import { extractGroupOrProject } from '../../utils/common';
55
66
export default {

0 commit comments

Comments
 (0)