Add latest changes from gitlab-org/gitlab@master
This commit is contained in:
parent
d8a3221aa3
commit
798c93bca8
|
|
@ -51,6 +51,9 @@ rules:
|
|||
- '^$'
|
||||
- '^variables$'
|
||||
- 'attrs?$'
|
||||
'@gitlab/vue-no-undef-apollo-properties': error
|
||||
'@gitlab/tailwind': error
|
||||
'@gitlab/vue-tailwind': error
|
||||
no-param-reassign:
|
||||
- error
|
||||
- props: true
|
||||
|
|
@ -184,6 +187,8 @@ overrides:
|
|||
rules:
|
||||
'@gitlab/require-i18n-strings': off
|
||||
'@gitlab/no-runtime-template-compiler': off
|
||||
'@gitlab/tailwind': off
|
||||
'@gitlab/vue-tailwind': off
|
||||
'require-await': error
|
||||
'import/no-dynamic-require': off
|
||||
'no-import-assign': off
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ include:
|
|||
inputs:
|
||||
cng_path: 'charts/components/images'
|
||||
- project: 'gitlab-org/quality/pipeline-common'
|
||||
ref: '8.21.0'
|
||||
ref: '8.22.0'
|
||||
file: ci/base.gitlab-ci.yml
|
||||
|
||||
stages:
|
||||
|
|
|
|||
|
|
@ -53,5 +53,5 @@ include:
|
|||
gem_path_prefix: "vendor/gems/"
|
||||
- local: .gitlab/ci/templates/gem.gitlab-ci.yml
|
||||
inputs:
|
||||
gem_name: "sidekiq"
|
||||
gem_name: "sidekiq-7.2.4"
|
||||
gem_path_prefix: "vendor/gems/"
|
||||
|
|
|
|||
|
|
@ -3916,8 +3916,6 @@ Layout/LineLength:
|
|||
- 'spec/requests/api/commit_statuses_spec.rb'
|
||||
- 'spec/requests/api/commits_spec.rb'
|
||||
- 'spec/requests/api/composer_packages_spec.rb'
|
||||
- 'spec/requests/api/conan_instance_packages_spec.rb'
|
||||
- 'spec/requests/api/conan_project_packages_spec.rb'
|
||||
- 'spec/requests/api/debian_group_packages_spec.rb'
|
||||
- 'spec/requests/api/debian_project_packages_spec.rb'
|
||||
- 'spec/requests/api/deploy_keys_spec.rb'
|
||||
|
|
|
|||
|
|
@ -2168,8 +2168,6 @@ RSpec/ContextWording:
|
|||
- 'spec/requests/api/commit_statuses_spec.rb'
|
||||
- 'spec/requests/api/commits_spec.rb'
|
||||
- 'spec/requests/api/composer_packages_spec.rb'
|
||||
- 'spec/requests/api/conan_instance_packages_spec.rb'
|
||||
- 'spec/requests/api/conan_project_packages_spec.rb'
|
||||
- 'spec/requests/api/dependency_proxy_spec.rb'
|
||||
- 'spec/requests/api/deploy_keys_spec.rb'
|
||||
- 'spec/requests/api/deploy_tokens_spec.rb'
|
||||
|
|
|
|||
4
Gemfile
4
Gemfile
|
|
@ -279,7 +279,7 @@ end
|
|||
gem 'state_machines-activerecord', '~> 0.8.0' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
|
||||
# Background jobs
|
||||
gem 'sidekiq', path: 'vendor/gems/sidekiq', require: 'sidekiq', feature_category: :scalability
|
||||
gem 'sidekiq', path: 'vendor/gems/sidekiq-7.2.4', require: 'sidekiq', feature_category: :scalability
|
||||
gem 'sidekiq-cron', '~> 1.12.0', feature_category: :scalability
|
||||
gem 'gitlab-sidekiq-fetcher',
|
||||
path: 'vendor/gems/sidekiq-reliable-fetch',
|
||||
|
|
@ -463,7 +463,7 @@ end
|
|||
gem 'warning', '~> 1.3.0' # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
|
||||
group :development do
|
||||
gem 'lefthook', '~> 1.6.8', require: false, feature_category: :tooling
|
||||
gem 'lefthook', '~> 1.7.0', require: false, feature_category: :tooling
|
||||
gem 'rubocop', feature_category: :tooling
|
||||
gem 'solargraph', '~> 0.47.2', require: false # rubocop:todo Gemfile/MissingFeatureCategory
|
||||
|
||||
|
|
|
|||
|
|
@ -319,7 +319,7 @@
|
|||
{"name":"httpclient","version":"2.8.3","platform":"ruby","checksum":"2951e4991214464c3e92107e46438527d23048e634f3aee91c719e0bdfaebda6"},
|
||||
{"name":"i18n","version":"1.14.4","platform":"ruby","checksum":"c7deedead0866ea9102975a4eab7968f53de50793a0c211a37808f75dd187551"},
|
||||
{"name":"i18n_data","version":"0.13.1","platform":"ruby","checksum":"e5aa99b09a69b463bb0443fc1f9540351a49f3d1541c5e91316bafa035c63f66"},
|
||||
{"name":"icalendar","version":"2.10.1","platform":"ruby","checksum":"1f3108bb95c89e03d418ac95b2fd6182c0b5d112bbe757cf6e23e3282a3f710e"},
|
||||
{"name":"icalendar","version":"2.10.2","platform":"ruby","checksum":"d70ecdca4219ad6af220d8cb6aa78170f1931c6e56be45fdf0e077060a555608"},
|
||||
{"name":"ice_cube","version":"0.16.4","platform":"ruby","checksum":"da117e5de24bdc33931be629f9b55048641924442c7e9b72fedc05e5592531b7"},
|
||||
{"name":"ice_nine","version":"0.11.2","platform":"ruby","checksum":"5d506a7d2723d5592dc121b9928e4931742730131f22a1a37649df1c1e2e63db"},
|
||||
{"name":"imagen","version":"0.1.8","platform":"ruby","checksum":"fde7b727d4fe79c6bb5ac46c1f7184bf87a6d54df54d712ad2be039d2f93a162"},
|
||||
|
|
@ -352,7 +352,7 @@
|
|||
{"name":"kubeclient","version":"4.11.0","platform":"ruby","checksum":"4985fcd749fb8c364a668a8350a49821647f03aa52d9ee6cbc582beb8e883fcc"},
|
||||
{"name":"language_server-protocol","version":"3.17.0.3","platform":"ruby","checksum":"3d5c58c02f44a20d972957a9febe386d7e7468ab3900ce6bd2b563dd910c6b3f"},
|
||||
{"name":"launchy","version":"2.5.2","platform":"ruby","checksum":"8aa0441655aec5514008e1d04892c2de3ba57bd337afb984568da091121a241b"},
|
||||
{"name":"lefthook","version":"1.6.18","platform":"ruby","checksum":"b66c42a4de398c9bbe9bdb0ee3fc669f124244aced56d21e2e074f2980343173"},
|
||||
{"name":"lefthook","version":"1.7.14","platform":"ruby","checksum":"955c18c4dabaf92f82f085bcbf5955015853fe306f20c73343509ecd3d1bc236"},
|
||||
{"name":"letter_opener","version":"1.10.0","platform":"ruby","checksum":"2ff33f2e3b5c3c26d1959be54b395c086ca6d44826e8bf41a14ff96fdf1bdbb2"},
|
||||
{"name":"letter_opener_web","version":"3.0.0","platform":"ruby","checksum":"3f391efe0e8b9b24becfab5537dfb17a5cf5eb532038f947daab58cb4b749860"},
|
||||
{"name":"libyajl2","version":"2.1.0","platform":"ruby","checksum":"aa5df6c725776fc050c8418450de0f7c129cb7200b811907c4c0b3b5c0aea0ef"},
|
||||
|
|
|
|||
25
Gemfile.lock
25
Gemfile.lock
|
|
@ -193,6 +193,15 @@ PATH
|
|||
nokogiri (>= 1.4.4)
|
||||
omniauth (~> 2.0)
|
||||
|
||||
PATH
|
||||
remote: vendor/gems/sidekiq-7.2.4
|
||||
specs:
|
||||
sidekiq (7.2.4)
|
||||
concurrent-ruby (< 2)
|
||||
connection_pool (>= 2.3.0)
|
||||
rack (>= 2.2.4)
|
||||
redis-client (>= 0.19.0)
|
||||
|
||||
PATH
|
||||
remote: vendor/gems/sidekiq-reliable-fetch
|
||||
specs:
|
||||
|
|
@ -200,16 +209,6 @@ PATH
|
|||
json (>= 2.5)
|
||||
sidekiq (~> 7.0)
|
||||
|
||||
PATH
|
||||
remote: vendor/gems/sidekiq
|
||||
specs:
|
||||
sidekiq (7.3.1)
|
||||
concurrent-ruby (< 2)
|
||||
connection_pool (>= 2.3.0)
|
||||
logger
|
||||
rack (>= 2.2.4)
|
||||
redis-client (>= 0.22.2)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
|
|
@ -986,7 +985,7 @@ GEM
|
|||
i18n (1.14.4)
|
||||
concurrent-ruby (~> 1.0)
|
||||
i18n_data (0.13.1)
|
||||
icalendar (2.10.1)
|
||||
icalendar (2.10.2)
|
||||
ice_cube (~> 0.16)
|
||||
ice_cube (0.16.4)
|
||||
ice_nine (0.11.2)
|
||||
|
|
@ -1058,7 +1057,7 @@ GEM
|
|||
language_server-protocol (3.17.0.3)
|
||||
launchy (2.5.2)
|
||||
addressable (~> 2.8)
|
||||
lefthook (1.6.18)
|
||||
lefthook (1.7.14)
|
||||
letter_opener (1.10.0)
|
||||
launchy (>= 2.2, < 4)
|
||||
letter_opener_web (3.0.0)
|
||||
|
|
@ -2132,7 +2131,7 @@ DEPENDENCIES
|
|||
knapsack (~> 4.0.0)
|
||||
kramdown (~> 2.3.1)
|
||||
kubeclient (~> 4.11.0)
|
||||
lefthook (~> 1.6.8)
|
||||
lefthook (~> 1.7.0)
|
||||
letter_opener_web (~> 3.0.0)
|
||||
license_finder (~> 7.0)
|
||||
licensee (~> 9.16)
|
||||
|
|
|
|||
|
|
@ -356,7 +356,7 @@
|
|||
{"name":"kubeclient","version":"4.11.0","platform":"ruby","checksum":"4985fcd749fb8c364a668a8350a49821647f03aa52d9ee6cbc582beb8e883fcc"},
|
||||
{"name":"language_server-protocol","version":"3.17.0.3","platform":"ruby","checksum":"3d5c58c02f44a20d972957a9febe386d7e7468ab3900ce6bd2b563dd910c6b3f"},
|
||||
{"name":"launchy","version":"2.5.0","platform":"ruby","checksum":"954243c4255920982ce682f89a42e76372dba94770bf09c23a523e204bdebef5"},
|
||||
{"name":"lefthook","version":"1.6.18","platform":"ruby","checksum":"b66c42a4de398c9bbe9bdb0ee3fc669f124244aced56d21e2e074f2980343173"},
|
||||
{"name":"lefthook","version":"1.7.14","platform":"ruby","checksum":"955c18c4dabaf92f82f085bcbf5955015853fe306f20c73343509ecd3d1bc236"},
|
||||
{"name":"letter_opener","version":"1.10.0","platform":"ruby","checksum":"2ff33f2e3b5c3c26d1959be54b395c086ca6d44826e8bf41a14ff96fdf1bdbb2"},
|
||||
{"name":"letter_opener_web","version":"3.0.0","platform":"ruby","checksum":"3f391efe0e8b9b24becfab5537dfb17a5cf5eb532038f947daab58cb4b749860"},
|
||||
{"name":"libyajl2","version":"2.1.0","platform":"ruby","checksum":"aa5df6c725776fc050c8418450de0f7c129cb7200b811907c4c0b3b5c0aea0ef"},
|
||||
|
|
|
|||
|
|
@ -193,6 +193,15 @@ PATH
|
|||
nokogiri (>= 1.4.4)
|
||||
omniauth (~> 2.0)
|
||||
|
||||
PATH
|
||||
remote: vendor/gems/sidekiq-7.2.4
|
||||
specs:
|
||||
sidekiq (7.2.4)
|
||||
concurrent-ruby (< 2)
|
||||
connection_pool (>= 2.3.0)
|
||||
rack (>= 2.2.4)
|
||||
redis-client (>= 0.19.0)
|
||||
|
||||
PATH
|
||||
remote: vendor/gems/sidekiq-reliable-fetch
|
||||
specs:
|
||||
|
|
@ -200,16 +209,6 @@ PATH
|
|||
json (>= 2.5)
|
||||
sidekiq (~> 7.0)
|
||||
|
||||
PATH
|
||||
remote: vendor/gems/sidekiq
|
||||
specs:
|
||||
sidekiq (7.3.1)
|
||||
concurrent-ruby (< 2)
|
||||
connection_pool (>= 2.3.0)
|
||||
logger
|
||||
rack (>= 2.2.4)
|
||||
redis-client (>= 0.22.2)
|
||||
|
||||
GEM
|
||||
remote: https://rubygems.org/
|
||||
specs:
|
||||
|
|
@ -1071,7 +1070,7 @@ GEM
|
|||
language_server-protocol (3.17.0.3)
|
||||
launchy (2.5.0)
|
||||
addressable (~> 2.7)
|
||||
lefthook (1.6.18)
|
||||
lefthook (1.7.14)
|
||||
letter_opener (1.10.0)
|
||||
launchy (>= 2.2, < 4)
|
||||
letter_opener_web (3.0.0)
|
||||
|
|
@ -2159,7 +2158,7 @@ DEPENDENCIES
|
|||
knapsack (~> 4.0.0)
|
||||
kramdown (~> 2.3.1)
|
||||
kubeclient (~> 4.11.0)
|
||||
lefthook (~> 1.6.8)
|
||||
lefthook (~> 1.7.0)
|
||||
letter_opener_web (~> 3.0.0)
|
||||
license_finder (~> 7.0)
|
||||
licensee (~> 9.16)
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
abuseReportNotes: {
|
||||
query: abuseReportNotesQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ class CopyCodeButton extends HTMLElement {
|
|||
type: 'button',
|
||||
class: 'btn btn-default btn-md gl-button btn-icon has-tooltip',
|
||||
'data-title': __('Copy to clipboard'),
|
||||
'aria-label': __('Copy to clipboard'),
|
||||
'data-clipboard-target': `pre#${this.for}`,
|
||||
});
|
||||
|
||||
|
|
|
|||
|
|
@ -17,6 +17,7 @@ export default {
|
|||
WebIdeLink: () => import('ee_else_ce/vue_shared/components/web_ide_link.vue'),
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
currentUser: {
|
||||
query: userInfoQuery,
|
||||
error() {
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
activeBoardItem: {
|
||||
query: activeBoardItemQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
activeBoardItem: {
|
||||
query: activeBoardItemQuery,
|
||||
variables() {
|
||||
|
|
@ -50,6 +51,7 @@ export default {
|
|||
};
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
selectedBoardItems: {
|
||||
query: selectedBoardItemsQuery,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -79,6 +79,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
isShowingLabels: {
|
||||
query: isShowingLabelsQuery,
|
||||
update: (data) => data.isShowingLabels,
|
||||
|
|
|
|||
|
|
@ -96,6 +96,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
activeBoardCard: {
|
||||
query: activeBoardItemQuery,
|
||||
variables: {
|
||||
|
|
|
|||
|
|
@ -30,6 +30,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
activeBoardItem: {
|
||||
query: activeBoardItemQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -97,6 +97,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
error: {
|
||||
query: errorQuery,
|
||||
update: (data) => data.boardsAppError,
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
boardList: {
|
||||
query: listQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -206,6 +206,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
boardList: {
|
||||
fetchPolicy: fetchPolicies.CACHE_AND_NETWORK,
|
||||
query() {
|
||||
|
|
|
|||
|
|
@ -90,6 +90,7 @@ export default {
|
|||
this.error = this.$options.i18n.jobsCountErrorMsg;
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
cancelable: {
|
||||
query: getCancelableJobs,
|
||||
update(data) {
|
||||
|
|
|
|||
|
|
@ -158,6 +158,7 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
environments: {
|
||||
query() {
|
||||
return this.queryData?.environments?.query || {};
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ export default {
|
|||
);
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
headerPipeline: {
|
||||
query: getPipelineQuery,
|
||||
// this query is already being called in pipeline_header.vue, which shares the same cache as this component
|
||||
|
|
|
|||
|
|
@ -13,6 +13,7 @@ export default {
|
|||
},
|
||||
inject: ['manualVariablesCount', 'projectPath', 'pipelineIid'],
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
variables: {
|
||||
query: getManualVariablesQuery,
|
||||
skip() {
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
currentBranch: {
|
||||
query: getCurrentBranch,
|
||||
update(data) {
|
||||
|
|
|
|||
|
|
@ -75,6 +75,7 @@ export default {
|
|||
this.showFetchError();
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
currentBranch: {
|
||||
query: getCurrentBranch,
|
||||
update(data) {
|
||||
|
|
|
|||
|
|
@ -29,6 +29,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
appStatus: {
|
||||
query: getAppStatus,
|
||||
update(data) {
|
||||
|
|
|
|||
|
|
@ -47,12 +47,14 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
pipelineEtag: {
|
||||
query: getPipelineEtag,
|
||||
update(data) {
|
||||
return data.etags?.pipeline;
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
pipeline: {
|
||||
context() {
|
||||
return getQueryHeaders(this.pipelineEtag);
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
appStatus: {
|
||||
query: getAppStatus,
|
||||
update(data) {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
runners: {
|
||||
query: getRunnerTags,
|
||||
update(data) {
|
||||
|
|
|
|||
|
|
@ -101,6 +101,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
appStatus: {
|
||||
query: getAppStatus,
|
||||
update(data) {
|
||||
|
|
|
|||
|
|
@ -80,6 +80,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
initialBlobContent: {
|
||||
query: getBlobContent,
|
||||
variables() {
|
||||
|
|
@ -93,6 +94,7 @@ export default {
|
|||
return data?.project?.repository?.blobs?.nodes[0]?.rawBlob;
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
currentBranch: {
|
||||
query: getCurrentBranch,
|
||||
update(data) {
|
||||
|
|
|
|||
|
|
@ -169,12 +169,14 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
appStatus: {
|
||||
query: getAppStatus,
|
||||
update(data) {
|
||||
return data.app.status;
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
commitSha: {
|
||||
query: getLatestCommitShaQuery,
|
||||
skip({ currentBranch }) {
|
||||
|
|
@ -202,6 +204,7 @@ export default {
|
|||
this.reportFailure(LOAD_FAILURE_UNKNOWN);
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
currentBranch: {
|
||||
query: getCurrentBranch,
|
||||
update(data) {
|
||||
|
|
|
|||
|
|
@ -146,6 +146,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
ciConfigVariables: {
|
||||
fetchPolicy: fetchPolicies.NO_CACHE,
|
||||
query: ciConfigVariablesQuery,
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ export default {
|
|||
}),
|
||||
borderClasses: 'gl-border-b-1 gl-border-b-solid gl-border-b-gray-100',
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
agentEvents: {
|
||||
query: getAgentActivityEventsQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -32,6 +32,7 @@ export default {
|
|||
},
|
||||
connectModalId: CONNECT_MODAL_ID,
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
clusterAgent: {
|
||||
query: getClusterAgentQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -24,6 +24,7 @@ export default {
|
|||
AGENT_FEEDBACK_ISSUE,
|
||||
AGENT_FEEDBACK_KEY,
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
agents: {
|
||||
query: getAgentsQuery,
|
||||
variables() {
|
||||
|
|
@ -41,6 +42,7 @@ export default {
|
|||
this.queryErrored = true;
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
treeList: {
|
||||
query: getTreeList,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -60,6 +60,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
agents: {
|
||||
query: agentConfigurations,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,9 @@ export default {
|
|||
update(data) {
|
||||
return data?.project?.deployKeys || [];
|
||||
},
|
||||
skip() {
|
||||
return !this.currentPage || !this.currentScope;
|
||||
},
|
||||
error(error) {
|
||||
createAlert({
|
||||
message: s__('DeployKeys|Error getting deploy keys'),
|
||||
|
|
@ -65,9 +68,11 @@ export default {
|
|||
return pageInfo || {};
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
currentPage: {
|
||||
query: currentPageQuery,
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
currentScope: {
|
||||
query: currentScopeQuery,
|
||||
},
|
||||
|
|
@ -79,6 +84,8 @@ export default {
|
|||
return {
|
||||
deployKeys: [],
|
||||
pageInfo: {},
|
||||
currentPage: null,
|
||||
currentScope: null,
|
||||
deployKeyToRemove: null,
|
||||
};
|
||||
},
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
currentScope: {
|
||||
query: currentScopeQuery,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -165,6 +165,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
getMRCodequalityAndSecurityReports: {
|
||||
query: getMRCodequalityAndSecurityReports,
|
||||
pollInterval: FINDINGS_POLL_INTERVAL,
|
||||
|
|
|
|||
|
|
@ -2389,6 +2389,10 @@
|
|||
"path_prefix": {
|
||||
"type": "string",
|
||||
"markdownDescription": "The GitLab Pages URL path prefix used in this version of pages. The given value is converted to lowercase, shortened to 63 bytes, and everything except alphanumeric characters is replaced with a hyphen. Leading and trailing hyphens are not permitted."
|
||||
},
|
||||
"expire_in": {
|
||||
"type": "string",
|
||||
"markdownDescription": "How long the deployment should be active. Deployments that have expired are no longer available on the web. Supports a wide variety of formats, e.g. '1 week', '3 mins 4 sec', '2 hrs 20 min', '2h20min', '6 mos 1 day', '47 yrs 6 mos and 4d', '3 weeks and 2 days'. Set to 'never' to prevent extra deployments from expiring. [Learn More](https://docs.gitlab.com/ee/ci/yaml/#pagesexpire_in)."
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
tags: {
|
||||
query: deploymentDetails,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -15,6 +15,7 @@ export default {
|
|||
mixins: [glFeatureFlagsMixin()],
|
||||
inject: ['projectEnvironmentsPath', 'projectPath', 'environmentName'],
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
environment: {
|
||||
query: getEnvironment,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
fluxKustomizations: {
|
||||
query: fluxKustomizationsQuery,
|
||||
variables() {
|
||||
|
|
@ -75,6 +76,7 @@ export default {
|
|||
}
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
fluxHelmReleases: {
|
||||
query: fluxHelmReleasesQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -34,6 +34,7 @@ export default {
|
|||
return { visible: false, interval: undefined };
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
folder: {
|
||||
query: folderQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -42,6 +42,7 @@ export default {
|
|||
GlTabs,
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
environmentApp: {
|
||||
query: environmentAppQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -62,6 +62,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
isLastDeployment: {
|
||||
query: isLastDeployment,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -48,6 +48,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
k8sLogs: {
|
||||
query: k8sLogsQuery,
|
||||
variables() {
|
||||
|
|
@ -62,6 +63,7 @@ export default {
|
|||
return Boolean(!this.gitlabAgentId);
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
environment: {
|
||||
query: environmentClusterAgentQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -91,6 +91,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
fluxKustomization: {
|
||||
query: fluxKustomizationQuery,
|
||||
variables() {
|
||||
|
|
@ -108,6 +109,7 @@ export default {
|
|||
this.fluxApiError = err.message;
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
fluxHelmRelease: {
|
||||
query: fluxHelmReleaseQueryStatus,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -23,6 +23,7 @@ export default {
|
|||
WorkloadTable,
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
k8sPods: {
|
||||
query: k8sPodsQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -18,6 +18,7 @@ export default {
|
|||
GlLoadingIcon,
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
k8sServices: {
|
||||
query: k8sServicesQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
k8sDeployments: {
|
||||
query: k8sDeploymentsQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -38,6 +38,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
environment: {
|
||||
query: environmentClusterAgentQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -56,6 +56,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
folder: {
|
||||
query: folderQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -57,6 +57,7 @@ export default {
|
|||
},
|
||||
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
namespaces: {
|
||||
query: searchNamespacesWhereUserCanImportProjectsQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -121,12 +121,14 @@ export default {
|
|||
},
|
||||
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
bulkImportSourceGroups: {
|
||||
query: bulkImportSourceGroupsQuery,
|
||||
variables() {
|
||||
return { page: this.page, filter: this.filter, perPage: this.perPage };
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
availableNamespaces: {
|
||||
query: searchNamespacesWhereUserCanImportProjectsQuery,
|
||||
update(data) {
|
||||
|
|
|
|||
|
|
@ -183,7 +183,7 @@ export default {
|
|||
|
||||
<!-- Attributes area: CI, epic count, weight, milestone -->
|
||||
<!-- They have a different order on large screen sizes -->
|
||||
<div class="item-attributes-area gl-flex gl-flex-wrap gl-items-center gl-gap-3">
|
||||
<div class="item-attributes-area gl-flex gl-items-center gl-gap-3">
|
||||
<span v-if="hasPipeline" class="mr-ci-status order-md-last -gl-mr-2 md:gl-ml-3">
|
||||
<ci-icon :status="pipelineStatus" />
|
||||
</span>
|
||||
|
|
|
|||
|
|
@ -103,6 +103,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
issuableReference: {
|
||||
query: issueReferenceQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -33,6 +33,7 @@ export default {
|
|||
},
|
||||
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
projects: {
|
||||
query: getProjectsQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,5 @@
|
|||
import Vue from 'vue';
|
||||
import { InternalEvents } from '~/tracking';
|
||||
|
||||
export function confirmAction(
|
||||
message,
|
||||
|
|
@ -13,6 +14,7 @@ export function confirmAction(
|
|||
title,
|
||||
hideCancel,
|
||||
size,
|
||||
trackingEvent,
|
||||
} = {},
|
||||
) {
|
||||
return new Promise((resolve) => {
|
||||
|
|
@ -42,6 +44,13 @@ export function confirmAction(
|
|||
on: {
|
||||
confirmed() {
|
||||
confirmed = true;
|
||||
if (trackingEvent) {
|
||||
InternalEvents.trackEvent(trackingEvent.name, {
|
||||
label: trackingEvent.label,
|
||||
property: trackingEvent.property,
|
||||
value: trackingEvent.value,
|
||||
});
|
||||
}
|
||||
},
|
||||
closed() {
|
||||
component.$destroy();
|
||||
|
|
|
|||
|
|
@ -1,13 +1,34 @@
|
|||
import { confirmAction } from './confirm_action';
|
||||
|
||||
function confirmViaGlModal(message, element) {
|
||||
const { confirmBtnVariant, title, isHtmlMessage } = element.dataset;
|
||||
const {
|
||||
confirmBtnVariant,
|
||||
title,
|
||||
isHtmlMessage,
|
||||
trackingEventName,
|
||||
trackingEventLabel,
|
||||
trackingEventProperty,
|
||||
trackingEventValue,
|
||||
} = element.dataset;
|
||||
|
||||
const screenReaderText =
|
||||
element.querySelector('.gl-sr-only')?.textContent ||
|
||||
element.querySelector('.sr-only')?.textContent ||
|
||||
element.getAttribute('aria-label');
|
||||
|
||||
const getTrackingEventConfig = (trackingEventNameFromDataset) => {
|
||||
if (!trackingEventNameFromDataset) return null;
|
||||
|
||||
return {
|
||||
name: trackingEventNameFromDataset,
|
||||
label: trackingEventLabel,
|
||||
property: trackingEventProperty,
|
||||
value: trackingEventValue,
|
||||
};
|
||||
};
|
||||
|
||||
const trackingEventConfig = getTrackingEventConfig(trackingEventName);
|
||||
|
||||
const config = {
|
||||
...(screenReaderText && { primaryBtnText: screenReaderText }),
|
||||
...(confirmBtnVariant && { primaryBtnVariant: confirmBtnVariant }),
|
||||
|
|
@ -15,6 +36,10 @@ function confirmViaGlModal(message, element) {
|
|||
...(isHtmlMessage && { modalHtmlMessage: message }),
|
||||
};
|
||||
|
||||
if (trackingEventConfig) {
|
||||
config.trackingEvent = trackingEventConfig;
|
||||
}
|
||||
|
||||
return confirmAction(message, config);
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ export default {
|
|||
},
|
||||
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
users: {
|
||||
query: searchUsersQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -63,6 +63,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
sourceUsers: {
|
||||
query: importSourceUsersQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -12,6 +12,7 @@ import userPermissionsQuery from './queries/user_permissions.query.graphql';
|
|||
|
||||
export default {
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
userPermissions: {
|
||||
query: userPermissionsQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export default {
|
|||
TYPE_MERGE_REQUEST,
|
||||
apollo: {
|
||||
$subscribe: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
title: {
|
||||
query() {
|
||||
return titleSubscription;
|
||||
|
|
|
|||
|
|
@ -174,6 +174,7 @@ export default {
|
|||
},
|
||||
canResolve() {
|
||||
if (!this.discussionRoot) return false;
|
||||
if (!this.note.resolvable) return false;
|
||||
|
||||
return this.note.current_user.can_resolve_discussion;
|
||||
},
|
||||
|
|
|
|||
|
|
@ -20,6 +20,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
usersQuery: {
|
||||
query: searchUsersQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -0,0 +1,14 @@
|
|||
import { GlTabsBehavior, HISTORY_TYPE_HASH } from '~/tabs';
|
||||
|
||||
export default class EmptyProject {
|
||||
constructor() {
|
||||
this.configureGitTabsEl = document.querySelector('.js-configure-git-tabs');
|
||||
|
||||
this.emptyProjectTabsEl = document.querySelector('.js-empty-project-tabs');
|
||||
|
||||
// eslint-disable-next-line no-new
|
||||
new GlTabsBehavior(this.configureGitTabsEl, { history: HISTORY_TYPE_HASH });
|
||||
// eslint-disable-next-line no-new
|
||||
new GlTabsBehavior(this.emptyProjectTabsEl, { history: HISTORY_TYPE_HASH });
|
||||
}
|
||||
}
|
||||
|
|
@ -10,6 +10,7 @@ import initReadMore from '~/read_more';
|
|||
import initAmbiguousRefModal from '~/ref/init_ambiguous_ref_modal';
|
||||
import CodeDropdown from '~/vue_shared/components/code_dropdown/code_dropdown.vue';
|
||||
import initSourceCodeDropdowns from '~/vue_shared/components/download_dropdown/init_download_dropdowns';
|
||||
import EmptyProject from '~/pages/projects/show/empty_project';
|
||||
import { initHomePanel } from '../home_panel';
|
||||
|
||||
// Project show page loads different overview content based on user preferences
|
||||
|
|
@ -81,6 +82,15 @@ const initCodeDropdown = () => {
|
|||
});
|
||||
};
|
||||
|
||||
const initEmptyProjectTabs = () => {
|
||||
const emptyProjectEl = document.querySelector('#js-project-show-empty-page');
|
||||
|
||||
if (!emptyProjectEl) return;
|
||||
|
||||
new EmptyProject(); // eslint-disable-line no-new
|
||||
};
|
||||
|
||||
initCodeDropdown();
|
||||
initSourceCodeDropdowns();
|
||||
initFindFileShortcut();
|
||||
initEmptyProjectTabs();
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
project: {
|
||||
query: getFileMetaDataQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -37,6 +37,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
userSnippets: {
|
||||
query: getUserSnippets,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -14,6 +14,7 @@ export default {
|
|||
mixins: [timeagoMixin],
|
||||
inject: ['rootUrl', 'userId'],
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
userAchievements: {
|
||||
query: getUserAchievements,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ export default {
|
|||
},
|
||||
inject: ['fullPath', 'commitSha'],
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
project: {
|
||||
query: commitReferencesQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -10,6 +10,7 @@ import {
|
|||
visitUrl,
|
||||
setUrlParams,
|
||||
} from '~/lib/utils/url_utility';
|
||||
import { InternalEvents } from '~/tracking';
|
||||
import { helpPagePath } from '~/helpers/help_page_helper';
|
||||
import branchRulesQuery from 'ee_else_ce/projects/settings/branch_rules/queries/branch_rules_details.query.graphql';
|
||||
import { createAlert } from '~/alert';
|
||||
|
|
@ -19,6 +20,15 @@ import CrudComponent from '~/vue_shared/components/crud_component.vue';
|
|||
import SettingsSection from '~/vue_shared/components/settings/settings_section.vue';
|
||||
import editBranchRuleMutation from 'ee_else_ce/projects/settings/branch_rules/mutations/edit_branch_rule.mutation.graphql';
|
||||
import { getAccessLevels, getAccessLevelInputFromEdges } from 'ee_else_ce/projects/settings/utils';
|
||||
import {
|
||||
BRANCH_RULE_DETAILS_LABEL,
|
||||
CHANGED_BRANCH_RULE_TARGET,
|
||||
CHANGED_ALLOWED_TO_MERGE,
|
||||
CHANGED_ALLOWED_TO_PUSH_AND_MERGE,
|
||||
CHANGED_ALLOW_FORCE_PUSH,
|
||||
UNPROTECTED_BRANCH,
|
||||
CHANGED_REQUIRE_CODEOWNER_APPROVAL,
|
||||
} from 'ee_else_ce/projects/settings/branch_rules/tracking/constants';
|
||||
import deleteBranchRuleMutation from '../../mutations/branch_rule_delete.mutation.graphql';
|
||||
import BranchRuleModal from '../../../components/branch_rule_modal.vue';
|
||||
import Protection from './protection.vue';
|
||||
|
|
@ -83,6 +93,7 @@ export default {
|
|||
showCodeOwners: { default: false },
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
project: {
|
||||
query: branchRulesQuery,
|
||||
variables() {
|
||||
|
|
@ -225,6 +236,9 @@ export default {
|
|||
.then(
|
||||
// eslint-disable-next-line consistent-return
|
||||
({ data: { branchRuleDelete } = {} } = {}) => {
|
||||
InternalEvents.trackEvent(UNPROTECTED_BRANCH, {
|
||||
label: BRANCH_RULE_DETAILS_LABEL,
|
||||
});
|
||||
const [error] = branchRuleDelete.errors;
|
||||
if (error) {
|
||||
return createAlert({
|
||||
|
|
@ -252,6 +266,12 @@ export default {
|
|||
openAllowedToPushAndMergeDrawer() {
|
||||
this.isAllowedToPushAndMergeDrawerOpen = true;
|
||||
},
|
||||
onEditRuleTarget(ruleTarget) {
|
||||
this.editBranchRule({
|
||||
name: ruleTarget,
|
||||
trackEvent: CHANGED_BRANCH_RULE_TARGET,
|
||||
});
|
||||
},
|
||||
onEnableForcePushToggle(isChecked) {
|
||||
this.isAllowForcePushLoading = true;
|
||||
const toastMessage = isChecked
|
||||
|
|
@ -261,6 +281,7 @@ export default {
|
|||
this.editBranchRule({
|
||||
branchProtection: { allowForcePush: isChecked },
|
||||
toastMessage,
|
||||
trackEvent: CHANGED_ALLOW_FORCE_PUSH,
|
||||
});
|
||||
},
|
||||
onEnableCodeOwnersToggle(isChecked) {
|
||||
|
|
@ -272,6 +293,7 @@ export default {
|
|||
this.editBranchRule({
|
||||
branchProtection: { codeOwnerApprovalRequired: isChecked },
|
||||
toastMessage,
|
||||
trackEvent: CHANGED_REQUIRE_CODEOWNER_APPROVAL,
|
||||
});
|
||||
},
|
||||
onEditAccessLevels(accessLevels) {
|
||||
|
|
@ -281,15 +303,22 @@ export default {
|
|||
this.editBranchRule({
|
||||
branchProtection: { mergeAccessLevels: accessLevels },
|
||||
toastMessage: s__('BranchRules|Allowed to merge updated'),
|
||||
trackEvent: CHANGED_ALLOWED_TO_MERGE,
|
||||
});
|
||||
} else if (this.isAllowedToPushAndMergeDrawerOpen) {
|
||||
this.editBranchRule({
|
||||
branchProtection: { pushAccessLevels: accessLevels },
|
||||
toastMessage: s__('BranchRules|Allowed to push and merge updated'),
|
||||
trackEvent: CHANGED_ALLOWED_TO_PUSH_AND_MERGE,
|
||||
});
|
||||
}
|
||||
},
|
||||
editBranchRule({ name = this.branchRule.name, branchProtection = null, toastMessage = '' }) {
|
||||
editBranchRule({
|
||||
name = this.branchRule.name,
|
||||
branchProtection = null,
|
||||
toastMessage = '',
|
||||
trackEvent = '',
|
||||
}) {
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: editBranchRuleMutation,
|
||||
|
|
@ -317,6 +346,12 @@ export default {
|
|||
return;
|
||||
}
|
||||
|
||||
if (trackEvent.length) {
|
||||
InternalEvents.trackEvent(trackEvent, {
|
||||
label: BRANCH_RULE_DETAILS_LABEL,
|
||||
});
|
||||
}
|
||||
|
||||
const isRedirectNeeded = !branchProtection;
|
||||
if (isRedirectNeeded) {
|
||||
visitUrl(setUrlParams({ branch: name }));
|
||||
|
|
@ -559,7 +594,7 @@ export default {
|
|||
:ref="$options.editModalId"
|
||||
:title="$options.i18n.updateTargetRule"
|
||||
:action-primary-text="$options.i18n.update"
|
||||
@primary="editBranchRule({ name: $event })"
|
||||
@primary="onEditRuleTarget"
|
||||
/>
|
||||
</div>
|
||||
</div>
|
||||
|
|
|
|||
|
|
@ -0,0 +1,10 @@
|
|||
export const BRANCH_RULE_DETAILS_LABEL = 'branch_rule_details';
|
||||
export const REPOSITORY_SETTINGS_LABEL = 'repository_settings';
|
||||
|
||||
export const PROTECTED_BRANCH = 'protect_branch';
|
||||
export const CHANGED_BRANCH_RULE_TARGET = 'change_branch_rule_target';
|
||||
export const CHANGED_ALLOWED_TO_MERGE = 'change_allowed_to_merge';
|
||||
export const CHANGED_ALLOWED_TO_PUSH_AND_MERGE = 'change_allowed_to_push_and_merge';
|
||||
export const CHANGED_ALLOW_FORCE_PUSH = 'change_allow_force_push';
|
||||
export const UNPROTECTED_BRANCH = 'unprotect_branch';
|
||||
export const CHANGED_REQUIRE_CODEOWNER_APPROVAL = 'change_require_codeowner_approval';
|
||||
|
|
@ -37,6 +37,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
project: {
|
||||
query: getProtectableBranches,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -2,11 +2,16 @@
|
|||
import { GlButton, GlModal, GlModalDirective, GlDisclosureDropdown } from '@gitlab/ui';
|
||||
import CrudComponent from '~/vue_shared/components/crud_component.vue';
|
||||
import { createAlert } from '~/alert';
|
||||
import { InternalEvents } from '~/tracking';
|
||||
import branchRulesQuery from 'ee_else_ce/projects/settings/repository/branch_rules/graphql/queries/branch_rules.query.graphql';
|
||||
import glFeatureFlagsMixin from '~/vue_shared/mixins/gl_feature_flags_mixin';
|
||||
import { expandSection } from '~/settings_panels';
|
||||
import { scrollToElement } from '~/lib/utils/common_utils';
|
||||
import { visitUrl } from '~/lib/utils/url_utility';
|
||||
import {
|
||||
BRANCH_RULE_DETAILS_LABEL,
|
||||
PROTECTED_BRANCH,
|
||||
} from '~/projects/settings/branch_rules/tracking/constants';
|
||||
import BranchRuleModal from '../../components/branch_rule_modal.vue';
|
||||
import createBranchRuleMutation from './graphql/mutations/create_branch_rule.mutation.graphql';
|
||||
import BranchRule from './components/branch_rule.vue';
|
||||
|
|
@ -124,6 +129,9 @@ export default {
|
|||
this.$refs[this.$options.modalId].show();
|
||||
},
|
||||
addBranchRule({ name }) {
|
||||
InternalEvents.trackEvent(PROTECTED_BRANCH, {
|
||||
label: BRANCH_RULE_DETAILS_LABEL,
|
||||
});
|
||||
this.$apollo
|
||||
.mutate({
|
||||
mutation: createBranchRuleMutation,
|
||||
|
|
|
|||
|
|
@ -3,6 +3,14 @@ import { createAlert } from '~/alert';
|
|||
import axios from '~/lib/utils/axios_utils';
|
||||
import { __ } from '~/locale';
|
||||
import { initToggle } from '~/toggles';
|
||||
import {
|
||||
REPOSITORY_SETTINGS_LABEL,
|
||||
CHANGED_ALLOWED_TO_MERGE,
|
||||
CHANGED_ALLOWED_TO_PUSH_AND_MERGE,
|
||||
CHANGED_ALLOW_FORCE_PUSH,
|
||||
CHANGED_REQUIRE_CODEOWNER_APPROVAL,
|
||||
} from 'ee_else_ce/projects/settings/branch_rules/tracking/constants';
|
||||
import { InternalEvents } from '~/tracking';
|
||||
import { initAccessDropdown } from '~/projects/settings/init_access_dropdown';
|
||||
import { ACCESS_LEVELS, LEVEL_TYPES } from './constants';
|
||||
|
||||
|
|
@ -39,6 +47,9 @@ export default class ProtectedBranchEdit {
|
|||
allow_force_push: value,
|
||||
},
|
||||
() => {
|
||||
InternalEvents.trackEvent(CHANGED_ALLOW_FORCE_PUSH, {
|
||||
label: REPOSITORY_SETTINGS_LABEL,
|
||||
});
|
||||
forcePushToggle.isLoading = false;
|
||||
forcePushToggle.disabled = false;
|
||||
},
|
||||
|
|
@ -57,6 +68,9 @@ export default class ProtectedBranchEdit {
|
|||
code_owner_approval_required: value,
|
||||
},
|
||||
() => {
|
||||
InternalEvents.trackEvent(CHANGED_REQUIRE_CODEOWNER_APPROVAL, {
|
||||
label: REPOSITORY_SETTINGS_LABEL,
|
||||
});
|
||||
codeOwnerToggle.isLoading = false;
|
||||
codeOwnerToggle.disabled = false;
|
||||
},
|
||||
|
|
@ -73,6 +87,7 @@ export default class ProtectedBranchEdit {
|
|||
ACCESS_LEVELS.MERGE,
|
||||
gon.merge_access_levels,
|
||||
'protected-branch-allowed-to-merge',
|
||||
CHANGED_ALLOWED_TO_MERGE,
|
||||
);
|
||||
|
||||
// Allowed to Push dropdown
|
||||
|
|
@ -81,11 +96,12 @@ export default class ProtectedBranchEdit {
|
|||
ACCESS_LEVELS.PUSH,
|
||||
gon.push_access_levels,
|
||||
'protected-branch-allowed-to-push',
|
||||
CHANGED_ALLOWED_TO_PUSH_AND_MERGE,
|
||||
);
|
||||
}
|
||||
|
||||
// eslint-disable-next-line max-params
|
||||
buildDropdown(selector, accessLevel, accessLevelsData, testId) {
|
||||
buildDropdown(selector, accessLevel, accessLevelsData, testId, trackingEventName) {
|
||||
const [el] = this.$wrap.find(`.${selector}`);
|
||||
if (!el) return undefined;
|
||||
|
||||
|
|
@ -103,7 +119,7 @@ export default class ProtectedBranchEdit {
|
|||
});
|
||||
|
||||
dropdown.$on('select', (selected) => this.onSelectItems(accessLevel, selected));
|
||||
dropdown.$on('hidden', () => this.onDropdownHide());
|
||||
dropdown.$on('hidden', () => this.onDropdownHide(trackingEventName));
|
||||
|
||||
this.initSelectedItems(dropdown, accessLevel);
|
||||
return dropdown;
|
||||
|
|
@ -126,9 +142,9 @@ export default class ProtectedBranchEdit {
|
|||
this.hasChanges = true;
|
||||
}
|
||||
|
||||
onDropdownHide() {
|
||||
onDropdownHide(trackingEventName) {
|
||||
if (!this.hasChanges) return;
|
||||
this.updatePermissions();
|
||||
this.updatePermissions(trackingEventName);
|
||||
}
|
||||
|
||||
updateProtectedBranch(formData, callback) {
|
||||
|
|
@ -142,13 +158,16 @@ export default class ProtectedBranchEdit {
|
|||
});
|
||||
}
|
||||
|
||||
updatePermissions() {
|
||||
updatePermissions(trackingEventName) {
|
||||
const formData = Object.values(ACCESS_LEVELS).reduce((acc, level) => {
|
||||
acc[`${level}_attributes`] = this.selectedItems[level];
|
||||
return acc;
|
||||
}, {});
|
||||
this.updateProtectedBranch(formData, ({ data }) => {
|
||||
this.hasChanges = false;
|
||||
InternalEvents.trackEvent(trackingEventName, {
|
||||
label: REPOSITORY_SETTINGS_LABEL,
|
||||
});
|
||||
Object.values(ACCESS_LEVELS).forEach((level) => {
|
||||
this.setSelectedItemsToDropdown(data[level], level);
|
||||
});
|
||||
|
|
|
|||
|
|
@ -55,6 +55,7 @@ export default {
|
|||
* quickly than `fullGraphqlResponse`, which allows the page to show
|
||||
* meaningful content to the user much earlier.
|
||||
*/
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
singleGraphqlResponse: {
|
||||
query: allReleasesQuery,
|
||||
// This trick only works when paginating _forward_.
|
||||
|
|
@ -76,6 +77,7 @@ export default {
|
|||
this.singleRequestError = true;
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
fullGraphqlResponse: {
|
||||
query: allReleasesQuery,
|
||||
variables() {
|
||||
|
|
@ -94,6 +96,7 @@ export default {
|
|||
});
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
isCatalogResource: {
|
||||
query: getCiCatalogSettingsQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -22,6 +22,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
release: {
|
||||
query: oneReleaseQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -39,6 +39,7 @@ export default {
|
|||
explainCodeAvailable: { default: false },
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
projectInfo: {
|
||||
query: projectInfoQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -26,6 +26,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
issuable: {
|
||||
query() {
|
||||
return assigneesQueries[this.issuableType].query;
|
||||
|
|
|
|||
|
|
@ -50,6 +50,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
issuable: {
|
||||
query: getMergeRequestReviewersQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -110,6 +110,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
issuableTimeTracking: {
|
||||
query() {
|
||||
return timeTrackingQueries[this.issuableType].query;
|
||||
|
|
|
|||
|
|
@ -89,6 +89,7 @@ export default {
|
|||
return Boolean(this.timelogs);
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
workItem: {
|
||||
query: workItemByIidQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -52,6 +52,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
todoId: {
|
||||
query() {
|
||||
return todoQueries[this.issuableType].query;
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ export default {
|
|||
},
|
||||
inject: ['groupsPath'],
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
frecentGroups: {
|
||||
query: currentUserFrecentGroupsQuery,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@ export default {
|
|||
},
|
||||
inject: ['projectsPath'],
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
frecentProjects: {
|
||||
query: currentUserFrecentProjectsQuery,
|
||||
},
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@ import StatesTable from './states_table.vue';
|
|||
|
||||
export default {
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
states: {
|
||||
query: getStatesQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -19,6 +19,7 @@ export default {
|
|||
},
|
||||
inject: ['fullPath'],
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
ciCdSettings: {
|
||||
query: getCiJobTokenPermissionsQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -1,4 +1,4 @@
|
|||
subscription mergeChecksSubscrption($issuableId: IssuableID!) {
|
||||
subscription mergeChecksSubscription($issuableId: IssuableID!) {
|
||||
mergeRequestMergeStatusUpdated(issuableId: $issuableId) {
|
||||
... on MergeRequest {
|
||||
id
|
||||
|
|
|
|||
|
|
@ -31,6 +31,7 @@ export default {
|
|||
},
|
||||
reportTypes: ['sast', 'secret_detection'],
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
reportArtifacts: {
|
||||
query: securityReportMergeRequestDownloadPathsQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -116,6 +116,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
workItem: {
|
||||
query: workItemByIidQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -180,6 +180,7 @@ export default {
|
|||
};
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
workItemTypes: {
|
||||
query: namespaceWorkItemTypesQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -74,6 +74,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
awardEmoji: {
|
||||
query: projectWorkItemAwardEmojiQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -64,6 +64,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
workItem: {
|
||||
query: workItemByIidQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -105,6 +105,7 @@ export default {
|
|||
},
|
||||
},
|
||||
apollo: {
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
searchItems: {
|
||||
query: getGroupContactsQuery,
|
||||
variables() {
|
||||
|
|
@ -123,6 +124,7 @@ export default {
|
|||
this.$emit('error', I18N_WORK_ITEM_ERROR_FETCHING_CRM_CONTACTS);
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
workItem: {
|
||||
query: workItemByIidQuery,
|
||||
variables() {
|
||||
|
|
|
|||
|
|
@ -202,6 +202,7 @@ export default {
|
|||
},
|
||||
},
|
||||
},
|
||||
// eslint-disable-next-line @gitlab/vue-no-undef-apollo-properties
|
||||
allowedChildTypes: {
|
||||
query: getAllowedWorkItemChildTypes,
|
||||
variables() {
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show More
Loading…
Reference in New Issue