Skip to content

Commit

Permalink
Add latest changes from gitlab-org/gitlab@master
Browse files Browse the repository at this point in the history
  • Loading branch information
GitLab Bot committed Sep 14, 2022
1 parent 16daf11 commit c014b6b
Show file tree
Hide file tree
Showing 370 changed files with 7,555 additions and 1,595 deletions.
6 changes: 4 additions & 2 deletions .gitlab/CODEOWNERS
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,9 @@ docs/CODEOWNERS @clefelhocz1 @timzallmann @cdu1 @whaber @dsatcher @sgoldstein @j
## Allows release tooling to update the Gitaly Version
GITALY_SERVER_VERSION @project_278964_bot6 @gitlab-org/maintainers/rails-backend @gitlab-org/delivery

## Excludes documentation files and deprecation/removal announcements from required approval
## Files that are excluded from required approval
/.gitlab/issue_templates/
/.gitlab/merge_request_templates/
/doc/*.md
/doc/**/*.md
/doc/**/*.png
Expand Down Expand Up @@ -332,8 +334,8 @@ lib/gitlab/checks/** @proglottis @toon @zj-gitlab

^[Documentation Directories]
.markdownlint.yml @marcel.amirault @eread @aqualls @dianalogan @kpaizee
/doc/.markdownlint @marcel.amirault @eread @aqualls @dianalogan @kpaizee
/doc/ @gl-docsteam
/doc/.markdownlint/ @marcel.amirault @eread @aqualls @dianalogan @kpaizee
/doc/.vale/ @marcel.amirault @eread @aqualls @dianalogan @kpaizee

^[Documentation Pages]
Expand Down
13 changes: 0 additions & 13 deletions .rubocop_todo/rails/application_controller.yml

This file was deleted.

11 changes: 5 additions & 6 deletions Gemfile
Original file line number Diff line number Diff line change
Expand Up @@ -36,25 +36,24 @@ gem 'doorkeeper', '~> 5.5.0.rc2'
gem 'doorkeeper-openid_connect', '~> 1.7.5'
gem 'rexml', '~> 3.2.5'
gem 'ruby-saml', '~> 1.13.0'
gem 'omniauth-rails_csrf_protection'
gem 'omniauth', '~> 2.1.0'
gem 'omniauth', '~> 1.8'
gem 'omniauth-auth0', '~> 2.0.0'
gem 'omniauth-azure-activedirectory-v2', '~> 1.0'
gem 'omniauth-azure-oauth2', '~> 0.0.9', path: 'vendor/gems/omniauth-azure-oauth2' # See gem README.md
gem 'omniauth-cas3', '~> 1.1.4', path: 'vendor/gems/omniauth-cas3' # See vendor/gems/omniauth-cas3/README.md
gem 'omniauth-dingtalk-oauth2', '~> 1.0'
gem 'omniauth-alicloud', '~> 1.0.1'
gem 'omniauth-facebook', '~> 4.0.0'
gem 'omniauth-github', '2.0.0'
gem 'omniauth-github', '~> 1.4'
gem 'omniauth-gitlab', '~> 4.0.0', path: 'vendor/gems/omniauth-gitlab' # See vendor/gems/omniauth-gitlab/README.md
gem 'omniauth-google-oauth2', '~> 1.0.1', path: 'vendor/gems/omniauth-google-oauth2' # See gem README.md
gem 'omniauth-google-oauth2', '~> 0.6.0', path: 'vendor/gems/omniauth-google-oauth2' # See gem README.md
gem 'omniauth-oauth2-generic', '~> 0.2.2'
gem 'omniauth-saml', '~> 2.1.0'
gem 'omniauth-saml', '~> 1.10'
gem 'omniauth-shibboleth', '~> 1.3.0'
gem 'omniauth-twitter', '~> 1.4'
gem 'omniauth_crowd', '~> 2.4.0', path: 'vendor/gems/omniauth_crowd' # See vendor/gems/omniauth_crowd/README.md
gem 'omniauth-authentiq', '~> 0.3.3'
gem 'gitlab-omniauth-openid-connect', '~> 0.10.0', require: 'omniauth_openid_connect'
gem 'gitlab-omniauth-openid-connect', '~> 0.9.0', require: 'omniauth_openid_connect'
gem 'omniauth-salesforce', '~> 1.0.5', path: 'vendor/gems/omniauth-salesforce' # See gem README.md
gem 'omniauth-atlassian-oauth2', '~> 0.2.0'
gem 'rack-oauth2', '~> 1.21.2'
Expand Down
56 changes: 24 additions & 32 deletions Gemfile.lock
Original file line number Diff line number Diff line change
Expand Up @@ -29,7 +29,7 @@ PATH
specs:
omniauth-azure-oauth2 (0.0.10)
jwt (>= 1.0, < 3.0)
omniauth (~> 2.0)
omniauth (~> 1.0, < 3)
omniauth-oauth2 (~> 1.4)

PATH
Expand All @@ -38,29 +38,28 @@ PATH
omniauth-cas3 (1.1.4)
addressable (~> 2.3)
nokogiri (~> 1.7, >= 1.7.1)
omniauth (~> 2.0)
omniauth (~> 1.2, < 3)

PATH
remote: vendor/gems/omniauth-gitlab
specs:
omniauth-gitlab (4.0.0)
omniauth (~> 2.0)
omniauth (~> 1.0)
omniauth-oauth2 (~> 1.7.1)

PATH
remote: vendor/gems/omniauth-google-oauth2
specs:
omniauth-google-oauth2 (1.0.1)
omniauth-google-oauth2 (0.6.0)
jwt (>= 2.0)
oauth2 (~> 2.0)
omniauth (~> 2.0)
omniauth-oauth2 (~> 1.7.1)
omniauth (>= 1.9, < 3)
omniauth-oauth2 (>= 1.5)

PATH
remote: vendor/gems/omniauth-salesforce
specs:
omniauth-salesforce (1.0.5)
omniauth (~> 2.0)
omniauth (~> 1.0, < 3)
omniauth-oauth2 (~> 1.0)

PATH
Expand All @@ -69,7 +68,7 @@ PATH
omniauth_crowd (2.4.0)
activesupport
nokogiri (>= 1.4.4)
omniauth (~> 2.0)
omniauth (~> 1.0, < 3)

GEM
remote: https://rubygems.org/
Expand Down Expand Up @@ -566,9 +565,9 @@ GEM
gitlab-mail_room (0.0.9)
gitlab-markup (1.8.0)
gitlab-net-dns (0.9.1)
gitlab-omniauth-openid-connect (0.10.0)
gitlab-omniauth-openid-connect (0.9.1)
addressable (~> 2.7)
omniauth (>= 1.9, < 3)
omniauth (~> 1.9)
openid_connect (~> 1.2)
gitlab-sidekiq-fetcher (0.8.0)
sidekiq (~> 6.1)
Expand Down Expand Up @@ -914,10 +913,9 @@ GEM
train-core
wmi-lite (~> 1.0)
oj (3.13.21)
omniauth (2.1.0)
omniauth (1.9.1)
hashie (>= 3.4.6)
rack (>= 2.2.3)
rack-protection
rack (>= 1.6.2, < 3)
omniauth-alicloud (1.0.1)
omniauth-oauth2 (~> 1.7.1)
omniauth-atlassian-oauth2 (0.2.0)
Expand All @@ -934,9 +932,9 @@ GEM
omniauth-oauth2 (~> 1.7)
omniauth-facebook (4.0.0)
omniauth-oauth2 (~> 1.2)
omniauth-github (2.0.0)
omniauth (~> 2.0)
omniauth-oauth2 (~> 1.7.1)
omniauth-github (1.4.0)
omniauth (~> 1.5)
omniauth-oauth2 (>= 1.4.0, < 2.0)
omniauth-oauth (1.2.0)
oauth
omniauth (>= 1.0, < 3)
Expand All @@ -945,12 +943,9 @@ GEM
omniauth (>= 1.9, < 3)
omniauth-oauth2-generic (0.2.2)
omniauth-oauth2 (~> 1.0)
omniauth-rails_csrf_protection (1.0.1)
actionpack (>= 4.2)
omniauth (~> 2.0)
omniauth-saml (2.1.0)
omniauth (~> 2.0)
ruby-saml (~> 1.12)
omniauth-saml (1.10.0)
omniauth (~> 1.3, >= 1.3.2)
ruby-saml (~> 1.7)
omniauth-shibboleth (1.3.0)
omniauth (>= 1.0.0)
omniauth-twitter (1.4.0)
Expand Down Expand Up @@ -1059,8 +1054,6 @@ GEM
httpclient
json-jwt (>= 1.11.0)
rack (>= 2.1.0)
rack-protection (2.2.2)
rack
rack-proxy (0.7.2)
rack
rack-test (1.1.0)
Expand Down Expand Up @@ -1453,7 +1446,7 @@ GEM
validate_email (0.1.6)
activemodel (>= 3.0)
mail (>= 2.2.5)
validate_url (1.0.15)
validate_url (1.0.13)
activemodel (>= 3.0.0)
public_suffix
validates_hostname (1.0.11)
Expand Down Expand Up @@ -1606,7 +1599,7 @@ DEPENDENCIES
gitlab-mail_room (~> 0.0.9)
gitlab-markup (~> 1.8.0)
gitlab-net-dns (~> 0.9.1)
gitlab-omniauth-openid-connect (~> 0.10.0)
gitlab-omniauth-openid-connect (~> 0.9.0)
gitlab-sidekiq-fetcher (= 0.8.0)
gitlab-styles (~> 8.0.0)
gitlab_chronic_duration (~> 0.10.6.2)
Expand Down Expand Up @@ -1673,7 +1666,7 @@ DEPENDENCIES
octokit (~> 4.15)
ohai (~> 16.10)
oj (~> 3.13.21)
omniauth (~> 2.1.0)
omniauth (~> 1.8)
omniauth-alicloud (~> 1.0.1)
omniauth-atlassian-oauth2 (~> 0.2.0)
omniauth-auth0 (~> 2.0.0)
Expand All @@ -1683,13 +1676,12 @@ DEPENDENCIES
omniauth-cas3 (~> 1.1.4)!
omniauth-dingtalk-oauth2 (~> 1.0)
omniauth-facebook (~> 4.0.0)
omniauth-github (= 2.0.0)
omniauth-github (~> 1.4)
omniauth-gitlab (~> 4.0.0)!
omniauth-google-oauth2 (~> 1.0.1)!
omniauth-google-oauth2 (~> 0.6.0)!
omniauth-oauth2-generic (~> 0.2.2)
omniauth-rails_csrf_protection
omniauth-salesforce (~> 1.0.5)!
omniauth-saml (~> 2.1.0)
omniauth-saml (~> 1.10)
omniauth-shibboleth (~> 1.3.0)
omniauth-twitter (~> 1.4)
omniauth_crowd (~> 2.4.0)!
Expand Down
50 changes: 20 additions & 30 deletions app/assets/javascripts/releases/stores/modules/edit_new/actions.js
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,8 @@ import {

import * as types from './mutation_types';

class GraphQLError extends Error {}

export const initializeRelease = ({ commit, dispatch, state }) => {
if (state.isExistingRelease) {
// When editing an existing release,
Expand Down Expand Up @@ -110,55 +112,51 @@ export const saveRelease = ({ commit, dispatch, state }) => {
*
* @param {Object} gqlResponse The response object returned by the GraphQL client
* @param {String} mutationName The name of the mutation that was executed
* @param {String} messageIfError An message to build into the error object if something went wrong
*/
const checkForErrorsAsData = (gqlResponse, mutationName, messageIfError) => {
const checkForErrorsAsData = (gqlResponse, mutationName) => {
const allErrors = gqlResponse.data[mutationName].errors;
if (allErrors.length > 0) {
const allErrorMessages = JSON.stringify(allErrors);
throw new Error(`${messageIfError}: ${allErrorMessages}`);
throw new GraphQLError(allErrors[0]);
}
};

export const createRelease = async ({ commit, dispatch, state, getters }) => {
export const createRelease = async ({ commit, dispatch, getters }) => {
try {
const response = await gqClient.mutate({
mutation: createReleaseMutation,
variables: getters.releaseCreateMutatationVariables,
});

checkForErrorsAsData(
response,
'releaseCreate',
`Something went wrong while creating a new release with projectPath "${state.projectPath}" and tagName "${state.release.tagName}"`,
);
checkForErrorsAsData(response, 'releaseCreate');

dispatch('receiveSaveReleaseSuccess', response.data.releaseCreate.release.links.selfUrl);
} catch (error) {
commit(types.RECEIVE_SAVE_RELEASE_ERROR, error);
createFlash({
message: s__('Release|Something went wrong while creating a new release.'),
});
if (error instanceof GraphQLError) {
createFlash({
message: error.message,
});
} else {
createFlash({
message: s__('Release|Something went wrong while creating a new release.'),
});
}
}
};

/**
* Deletes a single release link.
* Throws an error if any network or validation errors occur.
*/
const deleteReleaseLinks = async ({ state, id }) => {
const deleteReleaseLinks = async ({ id }) => {
const deleteResponse = await gqClient.mutate({
mutation: deleteReleaseAssetLinkMutation,
variables: {
input: { id },
},
});

checkForErrorsAsData(
deleteResponse,
'releaseAssetLinkDelete',
`Something went wrong while deleting release asset link for release with projectPath "${state.projectPath}", tagName "${state.tagName}", and link id "${id}"`,
);
checkForErrorsAsData(deleteResponse, 'releaseAssetLinkDelete');
};

/**
Expand All @@ -180,11 +178,7 @@ const createReleaseLink = async ({ state, link }) => {
},
});

checkForErrorsAsData(
createResponse,
'releaseAssetLinkCreate',
`Something went wrong while creating a release asset link for release with projectPath "${state.projectPath}" and tagName "${state.tagName}"`,
);
checkForErrorsAsData(createResponse, 'releaseAssetLinkCreate');
};

export const updateRelease = async ({ commit, dispatch, state, getters }) => {
Expand All @@ -210,11 +204,7 @@ export const updateRelease = async ({ commit, dispatch, state, getters }) => {
variables: getters.releaseUpdateMutatationVariables,
});

checkForErrorsAsData(
updateReleaseResponse,
'releaseUpdate',
`Something went wrong while updating release with projectPath "${state.projectPath}" and tagName "${state.tagName}"`,
);
checkForErrorsAsData(updateReleaseResponse, 'releaseUpdate');

// Delete all links currently associated with this Release
await Promise.all(
Expand Down Expand Up @@ -266,7 +256,7 @@ export const deleteRelease = ({ commit, getters, dispatch, state }) => {
mutation: deleteReleaseMutation,
variables: getters.releaseDeleteMutationVariables,
})
.then((response) => checkForErrorsAsData(response, 'releaseDelete', ''))
.then((response) => checkForErrorsAsData(response, 'releaseDelete'))
.then(() => {
window.sessionStorage.setItem(
deleteReleaseSessionKey(state.projectPath),
Expand Down
1 change: 0 additions & 1 deletion app/assets/stylesheets/_page_specific_files.scss
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@
@import './pages/commits';
@import './pages/deploy_keys';
@import './pages/detail_page';
@import './pages/editor';
@import './pages/environment_logs';
@import './pages/events';
@import './pages/groups';
Expand Down
4 changes: 2 additions & 2 deletions app/assets/stylesheets/framework/files.scss
Original file line number Diff line number Diff line change
Expand Up @@ -39,8 +39,8 @@

.file-title {
position: relative;
background-color: $gray-light;
border-bottom: 1px solid $border-color;
background-color: var(--gray-10, $gray-10);
border-bottom: 1px solid var(--border-color, $border-color);
margin: 0;
text-align: left;
padding: 10px $gl-padding;
Expand Down
Loading

0 comments on commit c014b6b

Please sign in to comment.