diff --git a/.gitlab/ci/frontend.gitlab-ci.yml b/.gitlab/ci/frontend.gitlab-ci.yml index 8df530c546d..076de55014e 100644 --- a/.gitlab/ci/frontend.gitlab-ci.yml +++ b/.gitlab/ci/frontend.gitlab-ci.yml @@ -1,3 +1,38 @@ +# Make sure to update all the similar conditions in other CI config files if you modify these conditions +.if-default: &if-default + if: '$CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\// || $CI_MERGE_REQUEST_IID || $CI_COMMIT_TAG' + +# Make sure to update all the similar conditions in other CI config files if you modify these conditions +.if-default-ee: &if-default-ee + if: '($CI_COMMIT_REF_NAME == "master" || $CI_COMMIT_REF_NAME =~ /^[\d-]+-stable(-ee)?$/ || $CI_COMMIT_REF_NAME =~ /^\d+-\d+-auto-deploy-\d+$/ || $CI_COMMIT_REF_NAME =~ /^security\// || $CI_MERGE_REQUEST_IID || $CI_COMMIT_TAG) && $CI_PROJECT_NAME =~ /^gitlab(-ee)?$/' + +# Make sure to update all the similar conditions in other CI config files if you modify these conditions +.if-master: &if-master + if: '$CI_COMMIT_REF_NAME == "master"' + +# Make sure to update all the similar patterns in other CI config files if you modify these patterns +.code-backstage-patterns: &code-backstage-patterns + - ".gitlab/ci/**/*" + - ".{eslintignore,gitattributes,nvmrc,prettierrc,stylelintrc,yamllint}" + - ".{codeclimate,eslintrc,gitlab-ci,haml-lint,haml-lint_todo,rubocop,rubocop_todo,scss-lint}.yml" + - ".csscomb.json" + - "Dockerfile.assets" + - "*_VERSION" + - "Gemfile{,.lock}" + - "Rakefile" + - "{babel.config,jest.config}.js" + - "config.ru" + - "{package.json,yarn.lock}" + - "{,ee/}{app,bin,config,db,haml_lint,lib,locale,public,scripts,symbol,vendor}/**/*" + - "doc/api/graphql/reference/*" # Files in this folder are auto-generated + # Backstage changes + - "Dangerfile" + - "danger/**/*" + - "{,ee/}fixtures/**/*" + - "{,ee/}rubocop/**/*" + - "{,ee/}spec/**/*" + - "doc/README.md" # Some RSpec test rely on this file + .assets-compile-cache: cache: paths: @@ -132,7 +167,6 @@ compile-assets pull-cache foss: - .use-pg9 stage: test needs: ["setup-test-env", "compile-assets pull-cache"] - dependencies: ["setup-test-env", "compile-assets pull-cache"] .karma-base: extends: .only-code-frontend-job-base @@ -204,9 +238,10 @@ jest-foss: - .default-tags - .default-retry - .default-cache - - .default-only - - .only:changes-code-backstage stage: test + rules: + - <<: *if-master + when: on_success dependencies: [] cache: key: "$CI_JOB_NAME" @@ -237,11 +272,12 @@ webpack-dev-server: - .default-tags - .default-retry - .default-cache - - .default-only - - .only:changes-code-backstage stage: test + rules: + - <<: *if-default + changes: *code-backstage-patterns + when: on_success needs: ["setup-test-env", "compile-assets pull-cache"] - dependencies: ["setup-test-env", "compile-assets pull-cache"] variables: WEBPACK_MEMORY_TEST: "true" WEBPACK_VENDOR_DLL: "true" diff --git a/.gitlab/issue_templates/Coding style proposal.md b/.gitlab/issue_templates/Coding style proposal.md index a969c9b72ee..95f0fb5f366 100644 --- a/.gitlab/issue_templates/Coding style proposal.md +++ b/.gitlab/issue_templates/Coding style proposal.md @@ -5,7 +5,7 @@ Please describe the proposal and add a link to the source (for example, http://w --> - [ ] Mention the proposal in the next backend weekly call and the #backend channel to encourage contribution -- [ ] Proceed with the proposal once 50% of the maintainers have weighed in, and 80% of the votes are :+1: +- [ ] Proceed with the proposal once 50% of the maintainers have weighed in, and 80% of their votes are :+1: - [ ] Once approved, mention it again in the next backend weekly call and the #backend channel diff --git a/Gemfile b/Gemfile index 8c493896f08..83cfb7bbf14 100644 --- a/Gemfile +++ b/Gemfile @@ -283,7 +283,7 @@ gem 'rack-proxy', '~> 0.6.0' gem 'sassc-rails', '~> 2.1.0' gem 'uglifier', '~> 2.7.2' -gem 'addressable', '~> 2.5.2' +gem 'addressable', '~> 2.7' gem 'font-awesome-rails', '~> 4.7' gem 'gemojione', '~> 3.3' gem 'gon', '~> 6.2' @@ -419,7 +419,7 @@ group :test do gem 'guard-rspec' end -gem 'octokit', '~> 4.9' +gem 'octokit', '~> 4.15' gem 'mail_room', '~> 0.10.0' diff --git a/Gemfile.lock b/Gemfile.lock index 13e1e4ac828..f55fb554c4a 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -55,8 +55,8 @@ GEM adamantium (0.2.0) ice_nine (~> 0.11.0) memoizable (~> 0.4.0) - addressable (2.5.2) - public_suffix (>= 2.0.2, < 4.0) + addressable (2.7.0) + public_suffix (>= 2.0.2, < 5.0) aes_key_wrap (1.0.1) akismet (3.0.0) apollo_upload_server (2.0.0.beta.3) @@ -650,7 +650,8 @@ GEM multi_json (~> 1.3) multi_xml (~> 0.5) rack (>= 1.2, < 3) - octokit (4.9.0) + octokit (4.15.0) + faraday (>= 0.9) sawyer (~> 0.8.0, >= 0.5.3) omniauth (1.9.0) hashie (>= 3.4.6, < 3.7.0) @@ -762,7 +763,7 @@ GEM pry (~> 0.10) pry-rails (0.3.6) pry (>= 0.10.4) - public_suffix (3.1.1) + public_suffix (4.0.3) pyu-ruby-sasl (0.0.3.3) raabro (1.1.6) rack (2.0.7) @@ -961,9 +962,9 @@ GEM sprockets (> 3.0) sprockets-rails tilt - sawyer (0.8.1) - addressable (>= 2.3.5, < 2.6) - faraday (~> 0.8, < 1.0) + sawyer (0.8.2) + addressable (>= 2.3.5) + faraday (> 0.8, < 2.0) scss_lint (0.56.0) rake (>= 0.9, < 13) sass (~> 3.5.3) @@ -1130,7 +1131,7 @@ DEPENDENCIES acme-client (~> 2.0.2) activerecord-explain-analyze (~> 0.1) acts-as-taggable-on (~> 6.0) - addressable (~> 2.5.2) + addressable (~> 2.7) akismet (~> 3.0) apollo_upload_server (~> 2.0.0.beta3) asana (~> 0.9) @@ -1272,7 +1273,7 @@ DEPENDENCIES net-ssh (~> 5.2) nokogiri (~> 1.10.5) oauth2 (~> 1.4) - octokit (~> 4.9) + octokit (~> 4.15) omniauth (~> 1.8) omniauth-auth0 (~> 2.0.0) omniauth-authentiq (~> 0.3.3) diff --git a/app/assets/javascripts/repository/components/last_commit.vue b/app/assets/javascripts/repository/components/last_commit.vue index 70678b0db37..8e7529899c0 100644 --- a/app/assets/javascripts/repository/components/last_commit.vue +++ b/app/assets/javascripts/repository/components/last_commit.vue @@ -90,7 +90,7 @@ export default {