diff --git a/.flayignore b/.flayignore index 3e5063674ff..4b6f7ba693a 100644 --- a/.flayignore +++ b/.flayignore @@ -1,11 +1,18 @@ *.erb lib/gitlab/sanitizers/svg/whitelist.rb lib/gitlab/diff/position_tracer.rb +app/controllers/projects/approver_groups_controller.rb +app/controllers/projects/approvers_controller.rb +app/controllers/projects/protected_branches/merge_access_levels_controller.rb +app/controllers/projects/protected_branches/push_access_levels_controller.rb +app/controllers/projects/protected_tags/create_access_levels_controller.rb app/policies/project_policy.rb app/models/concerns/relative_positioning.rb app/workers/stuck_merge_jobs_worker.rb lib/gitlab/redis/*.rb lib/gitlab/gitaly_client/operation_service.rb +app/models/project_services/packagist_service.rb +lib/gitlab/background_migration/normalize_ldap_extern_uids_range.rb lib/gitlab/background_migration/* app/models/project_services/kubernetes_service.rb lib/gitlab/workhorse.rb @@ -19,6 +26,8 @@ ee/db/**/* ee/app/serializers/ee/merge_request_widget_entity.rb ee/lib/api/epics.rb ee/lib/api/geo_nodes.rb +ee/lib/ee/api/group_boards.rb +ee/lib/ee/api/boards.rb ee/lib/ee/gitlab/ldap/sync/admin_users.rb ee/app/workers/geo/file_download_dispatch_worker/job_artifact_job_finder.rb ee/app/workers/geo/file_download_dispatch_worker/lfs_object_job_finder.rb diff --git a/.gitattributes b/.gitattributes new file mode 100644 index 00000000000..f1c41c9bb76 --- /dev/null +++ b/.gitattributes @@ -0,0 +1 @@ +Dangerfile gitlab-language=ruby diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 8703ef6823a..137c26d7dae 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -269,10 +269,10 @@ package-and-qa: <<: *single-script-job-variables SCRIPT_NAME: trigger-build-docs environment: - name: review-docs/$CI_COMMIT_REF_NAME + name: review-docs/$CI_COMMIT_REF_SLUG # DOCS_REVIEW_APPS_DOMAIN and DOCS_GITLAB_REPO_SUFFIX are secret variables # Discussion: https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/14236/diffs#note_40140693 - url: http://$DOCS_GITLAB_REPO_SUFFIX-$CI_ENVIRONMENT_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX + url: http://$CI_ENVIRONMENT_SLUG.$DOCS_REVIEW_APPS_DOMAIN/$DOCS_GITLAB_REPO_SUFFIX on_stop: review-docs-cleanup # Trigger a manual docs build in gitlab-docs only on non docs-only branches. @@ -285,7 +285,8 @@ review-docs-deploy-manual: - ./$SCRIPT_NAME deploy when: manual only: - - branches + - branches@gitlab-org/gitlab-ce + - branches@gitlab-org/gitlab-ee <<: *except-docs-and-qa # Always trigger a docs build in gitlab-docs only on docs-only branches. @@ -297,7 +298,8 @@ review-docs-deploy: - gem install gitlab --no-ri --no-rdoc - ./$SCRIPT_NAME deploy only: - - /(^docs[\/-].*|.*-docs$)/ + - /(^docs[\/-].*|.*-docs$)/@gitlab-org/gitlab-ce + - /(^docs[\/-].*|.*-docs$)/@gitlab-org/gitlab-ee <<: *except-qa # Cleanup remote environment of gitlab-docs @@ -305,7 +307,7 @@ review-docs-cleanup: <<: *review-docs stage: post-cleanup environment: - name: review-docs/$CI_COMMIT_REF_NAME + name: review-docs/$CI_COMMIT_REF_SLUG action: stop when: manual script: @@ -323,11 +325,9 @@ cloud-native-image: variables: GIT_DEPTH: "1" cache: {} - before_script: - - gem install gitlab --no-rdoc --no-ri - - chmod 755 ./scripts/trigger-build-cloud-native script: - - ./scripts/trigger-build-cloud-native + - gem install gitlab --no-ri --no-rdoc + - ./scripts/trigger-build cng only: - tags@gitlab-org/gitlab-ce - tags@gitlab-org/gitlab-ee @@ -348,6 +348,24 @@ retrieve-tests-metadata: - wget -O $FLAKY_RSPEC_SUITE_REPORT_PATH http://${TESTS_METADATA_S3_BUCKET}.s3.amazonaws.com/$FLAKY_RSPEC_SUITE_REPORT_PATH || rm $FLAKY_RSPEC_SUITE_REPORT_PATH - '[[ -f $FLAKY_RSPEC_SUITE_REPORT_PATH ]] || echo "{}" > ${FLAKY_RSPEC_SUITE_REPORT_PATH}' +danger-review: + image: registry.gitlab.com/gitlab-org/gitaly/dangercontainer:latest + stage: prepare + before_script: + - source scripts/utils.sh + - retry gem install danger --no-ri --no-rdoc + cache: {} + only: + refs: + - branches@gitlab-org/gitlab-ce + - branches@gitlab-org/gitlab-ee + except: + variables: + - $CI_COMMIT_REF_NAME =~ /^ce-to-ee-.*/ + script: + - git version + - danger --fail-on-errors=true + update-tests-metadata: <<: *tests-metadata-state <<: *only-canonical-masters diff --git a/.gitlab/issue_templates/Feature Proposal.md b/.gitlab/issue_templates/Feature proposal.md similarity index 100% rename from .gitlab/issue_templates/Feature Proposal.md rename to .gitlab/issue_templates/Feature proposal.md diff --git a/.gitlab/issue_templates/Research Proposal.md b/.gitlab/issue_templates/Research proposal.md similarity index 100% rename from .gitlab/issue_templates/Research Proposal.md rename to .gitlab/issue_templates/Research proposal.md diff --git a/.gitlab/issue_templates/Security Developer Workflow.md b/.gitlab/issue_templates/Security developer workflow.md similarity index 99% rename from .gitlab/issue_templates/Security Developer Workflow.md rename to .gitlab/issue_templates/Security developer workflow.md index 0c878dbf64c..c1f702e9385 100644 --- a/.gitlab/issue_templates/Security Developer Workflow.md +++ b/.gitlab/issue_templates/Security developer workflow.md @@ -39,6 +39,7 @@ Set the title to: `[Security] Description of the original issue` - [ ] Add the nickname of the external user who found the issue (and/or HackerOne profile) to the Thanks row in the [details section](#details) ### Summary + #### Links | Description | Link | diff --git a/.gitlab/merge_request_templates/Database Changes.md b/.gitlab/merge_request_templates/Database changes.md similarity index 98% rename from .gitlab/merge_request_templates/Database Changes.md rename to .gitlab/merge_request_templates/Database changes.md index 1c4f30d9320..d14d52e1b6b 100644 --- a/.gitlab/merge_request_templates/Database Changes.md +++ b/.gitlab/merge_request_templates/Database changes.md @@ -1,7 +1,7 @@ Add a description of your merge request here. Merge requests without an adequate description will not be reviewed until one is added. -## Database Checklist +## Database checklist When adding migrations: @@ -31,7 +31,7 @@ When removing columns, tables, indexes or other structures: - [ ] Removed these in a post-deployment migration - [ ] Made sure the application no longer uses (or ignores) these structures -## General Checklist +## General checklist - [ ] [Changelog entry](https://docs.gitlab.com/ee/development/changelog.html) added, if necessary - [ ] [Documentation created/updated](https://docs.gitlab.com/ee/development/doc_styleguide.html) diff --git a/.rubocop_todo.yml b/.rubocop_todo.yml index ccf301e6c78..8a1ca6747a8 100644 --- a/.rubocop_todo.yml +++ b/.rubocop_todo.yml @@ -10,10 +10,6 @@ Capybara/CurrentPathExpectation: Enabled: false -# Offense count: 956 -Capybara/FeatureMethods: - Enabled: false - # Offense count: 23 FactoryBot/DynamicAttributeDefinedStatically: Exclude: @@ -203,12 +199,6 @@ Naming/HeredocDelimiterCase: Naming/HeredocDelimiterNaming: Enabled: false -# Offense count: 27 -# Cop supports --auto-correct. -# Configuration parameters: AutoCorrect. -Performance/HashEachMethods: - Enabled: false - # Offense count: 1 Performance/UnfreezeString: Exclude: diff --git a/CHANGELOG.md b/CHANGELOG.md index f9f38766392..e90f599ced1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,26 @@ documentation](doc/development/changelog.md) for instructions on adding your own entry. +## 11.0.3 (2018-07-05) + +### Fixed (14 changes, 1 of them is from the community) + +- Revert merge request widget button max height. !20175 (George Tsiolis) +- Implement upload copy when moving an issue with upload on object storage. !20191 +- Fix broken '!' support to autocomplete MRs in GFM fields. !20204 +- Restore showing Elasticsearch and Geo status on dashboard. !20276 +- Fix merge request page rendering error when its target/source branch is missing. !20280 +- Fix sidebar collapse breapoints for job and wiki pages. +- fix size of code blocks in headings. +- Fix loading screen for search autocomplete dropdown. +- Fix ambiguous due_date column for Issue scopes. +- Always serve favicon from main GitLab domain so that CI badge can be drawn over it. +- Fix tooltip flickering bug. +- Fix refreshing cache keys for open issues count. +- Replace deprecated bs.affix in merge request tabs with sticky polyfill. +- Prevent pipeline job tooltip from scrolling off dropdown container. + + ## 11.0.2 (2018-06-26) ### Fixed (8 changes, 1 of them is from the community) diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md index fd4e769ecee..4a1fa39b41d 100644 --- a/CONTRIBUTING.md +++ b/CONTRIBUTING.md @@ -50,6 +50,7 @@ _This notice should stay as the first item in the CONTRIBUTING.md file._ - [Definition of done](#definition-of-done) - [Style guides](#style-guides) - [Code of conduct](#code-of-conduct) +- [Contribution Flow](#contribution-flow) @@ -225,24 +226,24 @@ Each issue scheduled for the current milestone should be labeled ~Deliverable or ~"Stretch". Any open issue for a previous milestone should be labeled ~"Next Patch Release", or otherwise rescheduled to a different milestone. -### Bug Priority labels +### Priority labels -Bug Priority labels help us define the time a ~bug fix should be completed. Priority determines how quickly the defect turnaround time must be. +Priority labels help us define the time a ~bug fix should be completed. Priority determines how quickly the defect turnaround time must be. If there are multiple defects, the priority decides which defect has to be fixed immediately versus later. This label documents the planned timeline & urgency which is used to measure against our actual SLA on delivering ~bug fixes. -| Label | Meaning | Estimate time to fix | Guidance | -|-------|-----------------|------------------------------------------------------------------|----------| -| ~P1 | Urgent Priority | The current release + potentially immediate hotfix to GitLab.com | | -| ~P2 | High Priority | The next release | | -| ~P3 | Medium Priority | Within the next 3 releases (approx one quarter) | | -| ~P4 | Low Priority | Anything outside the next 3 releases (approx beyond one quarter) | The issue is prominent but does not impact user workflow and a workaround is documented | +| Label | Meaning | Estimate time to fix | +|-------|-----------------|------------------------------------------------------------------| +| ~P1 | Urgent Priority | The current release + potentially immediate hotfix to GitLab.com | +| ~P2 | High Priority | The next release | +| ~P3 | Medium Priority | Within the next 3 releases (approx one quarter) | +| ~P4 | Low Priority | Anything outside the next 3 releases (approx beyond one quarter) | -### Bug Severity labels +### Severity labels Severity labels help us clearly communicate the impact of a ~bug on users. -| Label | Meaning | Impact of the defect | Example | +| Label | Meaning | Impact on Functionality | Example | |-------|-------------------|-------------------------------------------------------|---------| | ~S1 | Blocker | Outage, broken feature with no workaround | Unable to create an issue. Data corruption/loss. Security breach. | | ~S2 | Critical Severity | Broken Feature, workaround too complex & unacceptable | Can push commits, but only via the command line. | @@ -251,12 +252,14 @@ Severity labels help us clearly communicate the impact of a ~bug on users. #### Severity impact guidance -| Label | Security Impact | Availability / Performance Impact | -|-------|---------------------------------------------------------------------|--------------------------------------------------------------| -| ~S1 | >50% users impacted (possible company extinction level event) | | -| ~S2 | Many users or multiple paid customers impacted (but not apocalyptic)| The issue is (almost) guaranteed to occur in the near future | -| ~S3 | A few users or a single paid customer impacted | The issue is likely to occur in the near future | -| ~S4 | No paid users/customer impacted, or expected impact within 30 days | The issue _may_ occur but it's not likely | +Severity levels can be applied further depending on the facet of the impact; e.g. Affected customers, GitLab.com availability, performance and etc. The below is a guideline. + +| Severity | Affected Customers/Users | GitLab.com Availability | Performance Degradation | +|----------|---------------------------------------------------------------------|----------------------------------------------------|------------------------------| +| ~S1 | >50% users affected (possible company extinction level event) | Significant impact on all of GitLab.com | | +| ~S2 | Many users or multiple paid customers affected (but not apocalyptic)| Significant impact on large portions of GitLab.com | Degradation is guaranteed to occur in the near future | +| ~S3 | A few users or a single paid customer affected | Limited impact on important portions of GitLab.com | Degradation is likely to occur in the near future | +| ~S4 | No paid users/customer affected, or expected to in the near future | Minor impact on on GitLab.com | Degradation _may_ occur but it's not likely | ### Label for community contributors @@ -729,6 +732,24 @@ reported by emailing `contact@gitlab.com`. This Code of Conduct is adapted from the [Contributor Covenant][contributor-covenant], version 1.1.0, available at [http://contributor-covenant.org/version/1/1/0/](http://contributor-covenant.org/version/1/1/0/). +## Contribution Flow + +When contributing to GitLab, your merge request is subject to review by merge request maintainers of a particular specialty. + +When you submit code to GitLab, we really want it to get merged, but there will be times when it will not be merged. + +When maintainers are reading through a merge request they may request guidance from other maintainers. If merge request maintainers conclude that the code should not be merged, our reasons will be fully disclosed. If it has been decided that the code quality is not up to GitLab’s standards, the merge request maintainer will refer the author to our docs and code style guides, and provide some guidance. + +Sometimes style guides will be followed but the code will lack structural integrity, or the maintainer will have reservations about the code’s overall quality. When there is a reservation the maintainer will inform the author and provide some guidance. The author may then choose to update the merge request. Once the merge request has been updated and reassigned to the maintainer, they will review the code again. Once the code has been resubmitted any number of times, the maintainer may choose to close the merge request with a summary of why it will not be merged, as well as some guidance. If the merge request is closed the maintainer will be open to discussion as to how to improve the code so it can be approved in the future. + +GitLab will do its best to review community contributions as quickly as possible. Specially appointed developers review community contributions daily. You may take a look at the [team page](https://about.gitlab.com/team/) for the merge request coach who specializes in the type of code you have written and mention them in the merge request. For example, if you have written some JavaScript in your code then you should mention the frontend merge request coach. If your code has multiple disciplines you may mention multiple merge request coaches. + +GitLab receives a lot of community contributions, so if your code has not been reviewed within 4 days of its initial submission feel free to re-mention the appropriate merge request coach. + +When submitting code to GitLab, you may feel that your contribution requires the aid of an external library. If your code includes an external library please provide a link to the library, as well as reasons for including it. + +When your code contains more than 500 changes, any major breaking changes, or an external library, `@mention` a maintainer in the merge request. If you are not sure who to mention, the reviewer will add one early in the merge request process. + [core team]: https://about.gitlab.com/core-team/ [team]: https://about.gitlab.com/team/ [getting-help]: https://about.gitlab.com/getting-help/ diff --git a/Dangerfile b/Dangerfile new file mode 100644 index 00000000000..84b72673c50 --- /dev/null +++ b/Dangerfile @@ -0,0 +1,6 @@ +danger.import_dangerfile(path: 'danger/metadata') +danger.import_dangerfile(path: 'danger/changes_size') +danger.import_dangerfile(path: 'danger/changelog') +danger.import_dangerfile(path: 'danger/specs') +danger.import_dangerfile(path: 'danger/gemfile') +danger.import_dangerfile(path: 'danger/database') diff --git a/GITALY_SERVER_VERSION b/GITALY_SERVER_VERSION index 8b27ad70f93..e23e3fd2982 100644 --- a/GITALY_SERVER_VERSION +++ b/GITALY_SERVER_VERSION @@ -1 +1 @@ -0.109.0 +0.112.0 diff --git a/GITLAB_PAGES_VERSION b/GITLAB_PAGES_VERSION index f374f6662e9..3eefcb9dd5b 100644 --- a/GITLAB_PAGES_VERSION +++ b/GITLAB_PAGES_VERSION @@ -1 +1 @@ -0.9.1 +1.0.0 diff --git a/GITLAB_SHELL_VERSION b/GITLAB_SHELL_VERSION index b7f8ee41e69..69adf3456f8 100644 --- a/GITLAB_SHELL_VERSION +++ b/GITLAB_SHELL_VERSION @@ -1 +1 @@ -7.1.4 +7.1.5 diff --git a/GITLAB_WORKHORSE_VERSION b/GITLAB_WORKHORSE_VERSION index f77856a6f1a..0062ac97180 100644 --- a/GITLAB_WORKHORSE_VERSION +++ b/GITLAB_WORKHORSE_VERSION @@ -1 +1 @@ -4.3.1 +5.0.0 diff --git a/Gemfile b/Gemfile index 82559fa731c..d575568adaa 100644 --- a/Gemfile +++ b/Gemfile @@ -47,7 +47,7 @@ gem 'omniauth-google-oauth2', '~> 0.5.3' gem 'omniauth-kerberos', '~> 0.3.0', group: :kerberos gem 'omniauth-oauth2-generic', '~> 0.2.2' gem 'omniauth-saml', '~> 1.10' -gem 'omniauth-shibboleth', '~> 1.2.0' +gem 'omniauth-shibboleth', '~> 1.3.0' gem 'omniauth-twitter', '~> 1.4' gem 'omniauth_crowd', '~> 2.2.0' gem 'omniauth-authentiq', '~> 0.3.3' @@ -104,7 +104,7 @@ gem 'hashie-forbidden_attributes' gem 'kaminari', '~> 1.0' # HAML -gem 'hamlit', '~> 2.6.1' +gem 'hamlit', '~> 2.8.8' # Files attachments gem 'carrierwave', '~> 1.2' @@ -132,7 +132,7 @@ gem 'unf', '~> 0.1.4' gem 'seed-fu', '~> 2.3.7' # Markdown and HTML processing -gem 'html-pipeline', '~> 2.7.1' +gem 'html-pipeline', '~> 2.8' gem 'deckar01-task_list', '2.0.0' gem 'gitlab-markup', '~> 1.6.4' gem 'redcarpet', '~> 3.4' @@ -351,9 +351,9 @@ group :development, :test do gem 'spring', '~> 2.0.0' gem 'spring-commands-rspec', '~> 1.0.4' - gem 'gitlab-styles', '~> 2.3', require: false + gem 'gitlab-styles', '~> 2.4', require: false # Pin these dependencies, otherwise a new rule could break the CI pipelines - gem 'rubocop', '~> 0.52.1' + gem 'rubocop', '~> 0.54.0' gem 'rubocop-rspec', '~> 1.22.1' gem 'scss_lint', '~> 0.56.0', require: false @@ -418,7 +418,7 @@ group :ed25519 do end # Gitaly GRPC client -gem 'gitaly-proto', '~> 0.103.0', require: 'gitaly' +gem 'gitaly-proto', '~> 0.105.0', require: 'gitaly' gem 'grpc', '~> 1.11.0' # Locked until https://github.com/google/protobuf/issues/4210 is closed diff --git a/Gemfile.lock b/Gemfile.lock index 1cd336c95d0..7f9207d9dfe 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -108,7 +108,7 @@ GEM capybara-screenshot (1.0.14) capybara (>= 1.0, < 3) launchy - carrierwave (1.2.1) + carrierwave (1.2.3) activemodel (>= 4.0.0) activesupport (>= 4.0.0) mime-types (>= 1.16) @@ -282,7 +282,7 @@ GEM gettext_i18n_rails (>= 0.7.1) po_to_json (>= 1.0.0) rails (>= 3.2.0) - gitaly-proto (0.103.0) + gitaly-proto (0.105.0) google-protobuf (~> 3.1) grpc (~> 1.10) github-linguist (5.3.3) @@ -312,8 +312,8 @@ GEM mime-types (>= 1.16) posix-spawn (~> 0.3) gitlab-markup (1.6.4) - gitlab-styles (2.3.2) - rubocop (~> 0.51) + gitlab-styles (2.4.1) + rubocop (~> 0.54.0) rubocop-gitlab-security (~> 0.1.0) rubocop-rspec (~> 1.19) gitlab_omniauth-ldap (2.0.4) @@ -359,7 +359,7 @@ GEM grape-entity (0.7.1) activesupport (>= 4.0) multi_json (>= 1.3.2) - grape-path-helpers (1.0.5) + grape-path-helpers (1.0.6) activesupport (>= 4, < 5.1) grape (~> 1.0) rake (~> 12) @@ -381,8 +381,8 @@ GEM rake (>= 10, < 13) rubocop (>= 0.49.0) sysexits (~> 1.1) - hamlit (2.6.1) - temple (~> 0.7.6) + hamlit (2.8.8) + temple (>= 0.8.0) thor tilt hashdiff (0.3.4) @@ -394,7 +394,7 @@ GEM hipchat (1.5.2) httparty mimemagic - html-pipeline (2.7.1) + html-pipeline (2.8.3) activesupport (>= 2) nokogiri (>= 1.4) html2text (0.2.0) @@ -568,7 +568,7 @@ GEM omniauth-saml (1.10.0) omniauth (~> 1.3, >= 1.3.2) ruby-saml (~> 1.7) - omniauth-shibboleth (1.2.1) + omniauth-shibboleth (1.3.0) omniauth (>= 1.0.0) omniauth-twitter (1.4.0) omniauth-oauth (~> 1.1) @@ -776,16 +776,16 @@ GEM pg rails sqlite3 - rubocop (0.52.1) + rubocop (0.54.0) parallel (~> 1.10) - parser (>= 2.4.0.2, < 3.0) + parser (>= 2.5) powerpack (~> 0.1) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) rubocop-gitlab-security (0.1.1) rubocop (>= 0.51) - rubocop-rspec (1.22.1) + rubocop-rspec (1.22.2) rubocop (>= 0.52.1) ruby-enum (0.7.2) i18n @@ -889,7 +889,7 @@ GEM sys-filesystem (1.1.6) ffi sysexits (1.2.0) - temple (0.7.7) + temple (0.8.0) test-prof (0.2.5) test_after_commit (1.1.0) activerecord (>= 3.2) @@ -900,7 +900,7 @@ GEM rack (>= 1, < 3) thor (0.19.4) thread_safe (0.3.6) - tilt (2.0.6) + tilt (2.0.8) timecop (0.8.1) timfel-krb5-auth (0.8.3) toml (0.1.2) @@ -1037,13 +1037,13 @@ DEPENDENCIES gettext (~> 3.2.2) gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails_js (~> 1.3) - gitaly-proto (~> 0.103.0) + gitaly-proto (~> 0.105.0) github-linguist (~> 5.3.3) gitlab-flowdock-git-hook (~> 1.0.1) gitlab-gollum-lib (~> 4.2) gitlab-gollum-rugged_adapter (~> 0.4.4) gitlab-markup (~> 1.6.4) - gitlab-styles (~> 2.3) + gitlab-styles (~> 2.4) gitlab_omniauth-ldap (~> 2.0.4) gon (~> 6.2) google-api-client (~> 0.19.8) @@ -1057,11 +1057,11 @@ DEPENDENCIES graphql (~> 1.8.0) grpc (~> 1.11.0) haml_lint (~> 0.26.0) - hamlit (~> 2.6.1) + hamlit (~> 2.8.8) hashie-forbidden_attributes health_check (~> 2.6.0) hipchat (~> 1.5.0) - html-pipeline (~> 2.7.1) + html-pipeline (~> 2.8) html2text httparty (~> 0.13.3) icalendar @@ -1101,7 +1101,7 @@ DEPENDENCIES omniauth-kerberos (~> 0.3.0) omniauth-oauth2-generic (~> 0.2.2) omniauth-saml (~> 1.10) - omniauth-shibboleth (~> 1.2.0) + omniauth-shibboleth (~> 1.3.0) omniauth-twitter (~> 1.4) omniauth_crowd (~> 2.2.0) org-ruby (~> 0.9.12) @@ -1143,7 +1143,7 @@ DEPENDENCIES rspec-retry (~> 0.4.5) rspec-set (~> 0.1.3) rspec_profiling (~> 0.0.5) - rubocop (~> 0.52.1) + rubocop (~> 0.54.0) rubocop-rspec (~> 1.22.1) ruby-fogbugz (~> 0.2.1) ruby-prof (~> 0.17.0) diff --git a/Gemfile.rails5.lock b/Gemfile.rails5.lock index 3159942b4c5..766f2479ea5 100644 --- a/Gemfile.rails5.lock +++ b/Gemfile.rails5.lock @@ -79,7 +79,7 @@ GEM babosa (1.0.2) base32 (0.3.2) batch-loader (1.2.1) - bcrypt (3.1.11) + bcrypt (3.1.12) bcrypt_pbkdf (1.0.0) benchmark-ips (2.3.0) better_errors (2.1.1) @@ -111,7 +111,7 @@ GEM capybara-screenshot (1.0.14) capybara (>= 1.0, < 3) launchy - carrierwave (1.2.1) + carrierwave (1.2.3) activemodel (>= 4.0.0) activesupport (>= 4.0.0) mime-types (>= 1.16) @@ -285,7 +285,7 @@ GEM gettext_i18n_rails (>= 0.7.1) po_to_json (>= 1.0.0) rails (>= 3.2.0) - gitaly-proto (0.103.0) + gitaly-proto (0.105.0) google-protobuf (~> 3.1) grpc (~> 1.10) github-linguist (5.3.3) @@ -315,8 +315,8 @@ GEM mime-types (>= 1.16) posix-spawn (~> 0.3) gitlab-markup (1.6.4) - gitlab-styles (2.3.2) - rubocop (~> 0.51) + gitlab-styles (2.4.1) + rubocop (~> 0.54.0) rubocop-gitlab-security (~> 0.1.0) rubocop-rspec (~> 1.19) gitlab_omniauth-ldap (2.0.4) @@ -384,8 +384,8 @@ GEM rake (>= 10, < 13) rubocop (>= 0.49.0) sysexits (~> 1.1) - hamlit (2.6.1) - temple (~> 0.7.6) + hamlit (2.8.8) + temple (>= 0.8.0) thor tilt hashdiff (0.3.4) @@ -397,7 +397,7 @@ GEM hipchat (1.5.2) httparty mimemagic - html-pipeline (2.7.1) + html-pipeline (2.8.3) activesupport (>= 2) nokogiri (>= 1.4) html2text (0.2.0) @@ -514,7 +514,7 @@ GEM net-ssh (5.0.1) netrc (0.11.0) nio4r (2.3.1) - nokogiri (1.8.2) + nokogiri (1.8.3) mini_portile2 (~> 2.3.0) nokogumbo (1.5.0) nokogiri @@ -572,7 +572,7 @@ GEM omniauth-saml (1.10.0) omniauth (~> 1.3, >= 1.3.2) ruby-saml (~> 1.7) - omniauth-shibboleth (1.2.1) + omniauth-shibboleth (1.3.0) omniauth (>= 1.0.0) omniauth-twitter (1.4.0) omniauth-oauth (~> 1.1) @@ -785,16 +785,16 @@ GEM pg rails sqlite3 - rubocop (0.52.1) + rubocop (0.54.0) parallel (~> 1.10) - parser (>= 2.4.0.2, < 3.0) + parser (>= 2.5) powerpack (~> 0.1) rainbow (>= 2.2.2, < 4.0) ruby-progressbar (~> 1.7) unicode-display_width (~> 1.0, >= 1.0.1) rubocop-gitlab-security (0.1.1) rubocop (>= 0.51) - rubocop-rspec (1.22.1) + rubocop-rspec (1.22.2) rubocop (>= 0.52.1) ruby-enum (0.7.2) i18n @@ -811,7 +811,7 @@ GEM rubyzip (1.2.1) rufus-scheduler (3.4.0) et-orbi (~> 1.0) - rugged (0.27.1) + rugged (0.27.2) safe_yaml (1.0.4) sanitize (4.6.5) crass (~> 1.0.2) @@ -877,7 +877,7 @@ GEM activesupport (>= 4.2) spring-commands-rspec (1.0.4) spring (>= 0.9.1) - sprockets (3.7.1) + sprockets (3.7.2) concurrent-ruby (~> 1.0) rack (> 1, < 3) sprockets-rails (3.2.1) @@ -898,7 +898,7 @@ GEM sys-filesystem (1.1.6) ffi sysexits (1.2.0) - temple (0.7.7) + temple (0.8.0) test-prof (0.2.5) text (1.3.1) thin (1.7.0) @@ -1047,13 +1047,13 @@ DEPENDENCIES gettext (~> 3.2.2) gettext_i18n_rails (~> 1.8.0) gettext_i18n_rails_js (~> 1.3) - gitaly-proto (~> 0.103.0) + gitaly-proto (~> 0.105.0) github-linguist (~> 5.3.3) gitlab-flowdock-git-hook (~> 1.0.1) gitlab-gollum-lib (~> 4.2) gitlab-gollum-rugged_adapter (~> 0.4.4) gitlab-markup (~> 1.6.4) - gitlab-styles (~> 2.3) + gitlab-styles (~> 2.4) gitlab_omniauth-ldap (~> 2.0.4) gon (~> 6.2) google-api-client (~> 0.19.8) @@ -1067,11 +1067,11 @@ DEPENDENCIES graphql (~> 1.8.0) grpc (~> 1.11.0) haml_lint (~> 0.26.0) - hamlit (~> 2.6.1) + hamlit (~> 2.8.8) hashie-forbidden_attributes health_check (~> 2.6.0) hipchat (~> 1.5.0) - html-pipeline (~> 2.7.1) + html-pipeline (~> 2.8) html2text httparty (~> 0.13.3) icalendar @@ -1111,7 +1111,7 @@ DEPENDENCIES omniauth-kerberos (~> 0.3.0) omniauth-oauth2-generic (~> 0.2.2) omniauth-saml (~> 1.10) - omniauth-shibboleth (~> 1.2.0) + omniauth-shibboleth (~> 1.3.0) omniauth-twitter (~> 1.4) omniauth_crowd (~> 2.2.0) org-ruby (~> 0.9.12) @@ -1154,7 +1154,7 @@ DEPENDENCIES rspec-retry (~> 0.4.5) rspec-set (~> 0.1.3) rspec_profiling (~> 0.0.5) - rubocop (~> 0.52.1) + rubocop (~> 0.54.0) rubocop-rspec (~> 1.22.1) ruby-fogbugz (~> 0.2.1) ruby-prof (~> 0.17.0) diff --git a/README.md b/README.md index 8bd667b3dac..b6e1cc9a432 100644 --- a/README.md +++ b/README.md @@ -1,11 +1,5 @@ # GitLab -[![Build status](https://gitlab.com/gitlab-org/gitlab-ce/badges/master/build.svg)](https://gitlab.com/gitlab-org/gitlab-ce/commits/master) -[![Overall test coverage](https://gitlab.com/gitlab-org/gitlab-ce/badges/master/coverage.svg)](https://gitlab.com/gitlab-org/gitlab-ce/pipelines) -[![Code Climate](https://codeclimate.com/github/gitlabhq/gitlabhq.svg)](https://codeclimate.com/github/gitlabhq/gitlabhq) -[![Core Infrastructure Initiative Best Practices](https://bestpractices.coreinfrastructure.org/projects/42/badge)](https://bestpractices.coreinfrastructure.org/projects/42) -[![Gitter](https://badges.gitter.im/gitlabhq/gitlabhq.svg)](https://gitter.im/gitlabhq/gitlabhq?utm_source=badge&utm_medium=badge&utm_campaign=pr-badge) - ## Test coverage - [![Ruby coverage](https://gitlab.com/gitlab-org/gitlab-ce/badges/master/coverage.svg?job=coverage)](https://gitlab-org.gitlab.io/gitlab-ce/coverage-ruby) Ruby @@ -35,7 +29,7 @@ We're hiring developers, support people, and production engineers all the time, There are two editions of GitLab: - GitLab Community Edition (CE) is available freely under the MIT Expat license. -- GitLab Enterprise Edition (EE) includes [extra features](https://about.gitlab.com/products/#compare-options) that are more useful for organizations with more than 100 users. To use EE and get official support please [become a subscriber](https://about.gitlab.com/products/). +- GitLab Enterprise Edition (EE) includes [extra features](https://about.gitlab.com/pricing/#compare-options) that are more useful for organizations with more than 100 users. To use EE and get official support please [become a subscriber](https://about.gitlab.com/pricing/). ## Website @@ -120,6 +114,10 @@ All documentation can be found on [docs.gitlab.com/ce/](https://docs.gitlab.com/ Please see [Getting help for GitLab](https://about.gitlab.com/getting-help/) on our website for the many options to get help. +## Why? + +[Read here](https://about.gitlab.com/why/) + ## Is it any good? [Yes](https://news.ycombinator.com/item?id=3067434) diff --git a/Rakefile b/Rakefile index 85fff2d51eb..de0d6695c7b 100755 --- a/Rakefile +++ b/Rakefile @@ -2,9 +2,9 @@ # Add your own tasks in files placed in lib/tasks ending in .rake, # for example lib/tasks/capistrano.rake, and they will automatically be available to Rake. -require File.expand_path('../config/application', __FILE__) +require File.expand_path('config/application', __dir__) -relative_url_conf = File.expand_path('../config/initializers/relative_url', __FILE__) +relative_url_conf = File.expand_path('config/initializers/relative_url', __dir__) require relative_url_conf if File.exist?("#{relative_url_conf}.rb") Gitlab::Application.load_tasks diff --git a/app/assets/javascripts/api.js b/app/assets/javascripts/api.js index 0ca0e8f35dd..422becb7db8 100644 --- a/app/assets/javascripts/api.js +++ b/app/assets/javascripts/api.js @@ -100,12 +100,12 @@ const Api = { }, // Return Merge Request for project - mergeRequest(projectPath, mergeRequestId) { + mergeRequest(projectPath, mergeRequestId, params = {}) { const url = Api.buildUrl(Api.mergeRequestPath) .replace(':id', encodeURIComponent(projectPath)) .replace(':mrid', mergeRequestId); - return axios.get(url); + return axios.get(url, { params }); }, mergeRequests(params = {}) { diff --git a/app/assets/javascripts/boards/components/modal/footer.vue b/app/assets/javascripts/boards/components/modal/footer.vue index e0dac6003f1..d4affc8c3de 100644 --- a/app/assets/javascripts/boards/components/modal/footer.vue +++ b/app/assets/javascripts/boards/components/modal/footer.vue @@ -28,23 +28,29 @@ export default { }, }, methods: { + buildUpdateRequest(list) { + return { + add_label_ids: [list.label.id], + }; + }, addIssues() { const firstListIndex = 1; const list = this.modal.selectedList || this.state.lists[firstListIndex]; const selectedIssues = ModalStore.getSelectedIssues(); const issueIds = selectedIssues.map(issue => issue.id); + const req = this.buildUpdateRequest(list); // Post the data to the backend - gl.boardService.bulkUpdate(issueIds, { - add_label_ids: [list.label.id], - }).catch(() => { - Flash(__('Failed to update issues, please try again.')); + gl.boardService + .bulkUpdate(issueIds, req) + .catch(() => { + Flash(__('Failed to update issues, please try again.')); - selectedIssues.forEach((issue) => { - list.removeIssue(issue); - list.issuesSize -= 1; + selectedIssues.forEach((issue) => { + list.removeIssue(issue); + list.issuesSize -= 1; + }); }); - }); // Add the issues on the frontend selectedIssues.forEach((issue) => { diff --git a/app/assets/javascripts/boards/components/modal/list.vue b/app/assets/javascripts/boards/components/modal/list.vue index 02ac36d7367..a58b5afe970 100644 --- a/app/assets/javascripts/boards/components/modal/list.vue +++ b/app/assets/javascripts/boards/components/modal/list.vue @@ -121,8 +121,7 @@
-
+
diff --git a/app/assets/javascripts/boards/components/sidebar/remove_issue.vue b/app/assets/javascripts/boards/components/sidebar/remove_issue.vue index 55278626ffc..90d4c710daf 100644 --- a/app/assets/javascripts/boards/components/sidebar/remove_issue.vue +++ b/app/assets/javascripts/boards/components/sidebar/remove_issue.vue @@ -5,7 +5,7 @@ const Store = gl.issueBoards.BoardsStore; - export default { + export default Vue.extend({ props: { issue: { type: Object, @@ -25,19 +25,16 @@ removeIssue() { const { issue } = this; const lists = issue.getLists(); - const listLabelIds = lists.map(list => list.label.id); - - let labelIds = issue.labels.map(label => label.id).filter(id => !listLabelIds.includes(id)); - if (labelIds.length === 0) { - labelIds = ['']; - } + const req = this.buildPatchRequest(issue, lists); const data = { - issue: { - label_ids: labelIds, - }, + issue: this.seedPatchRequest(issue, req), }; + if (data.issue.label_ids.length === 0) { + data.issue.label_ids = ['']; + } + // Post the remove data Vue.http.patch(this.updateUrl, data).catch(() => { Flash(__('Failed to remove issue from board, please try again.')); @@ -54,8 +51,30 @@ Store.detail.issue = {}; }, + /** + * Build the default patch request. + */ + buildPatchRequest(issue, lists) { + const listLabelIds = lists.map(list => list.label.id); + + const labelIds = issue.labels + .map(label => label.id) + .filter(id => !listLabelIds.includes(id)); + + return { + label_ids: labelIds, + }; + }, + /** + * Seed the given patch request. + * + * (This is overridden in EE) + */ + seedPatchRequest(issue, req) { + return req; + }, }, - }; + });