diff options
1056 files changed, 5446 insertions, 8154 deletions
diff --git a/.eslintrc.yml b/.eslintrc.yml index fe0d5f5dce3..ecd9f57b075 100644 --- a/.eslintrc.yml +++ b/.eslintrc.yml @@ -29,8 +29,6 @@ rules: import/no-useless-path-segments: off lines-between-class-members: off # Disabled for now, to make the plugin-vue 4.5 -> 5.0 update smoother - vue/html-closing-bracket-newline: off - vue/html-closing-bracket-spacing: off vue/no-confusing-v-for-v-if: error vue/no-unused-components: off vue/no-use-v-if-with-v-for: off diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index b2d75a829fc..bb37b60b8f3 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -463,19 +463,19 @@ danger-review: rspec-pg: <<: *rspec-metadata-pg - parallel: 30 + parallel: 50 rspec-mysql: <<: *rspec-metadata-mysql - parallel: 30 + parallel: 50 rspec-pg-rails4: <<: *rspec-metadata-pg-rails4 - parallel: 30 + parallel: 50 rspec-mysql-rails4: <<: *rspec-metadata-mysql-rails4 - parallel: 30 + parallel: 50 static-analysis: <<: *dedicated-no-docs-no-db-pull-cache-job @@ -620,7 +620,8 @@ gitlab:assets:compile: - webpack-report/ - public/assets/ tags: - - docker + - gitlab-org-delivery + - high-cpu karma: <<: *dedicated-no-docs-pull-cache-job diff --git a/.rubocop.yml b/.rubocop.yml index a95ded8af1c..741403af009 100644 --- a/.rubocop.yml +++ b/.rubocop.yml @@ -50,7 +50,6 @@ Style/FrozenStringLiteralComment: - 'danger/**/*' - 'db/**/*' - 'ee/**/*' - - 'lib/gitlab/**/*' - 'lib/tasks/**/*' - 'qa/**/*' - 'rubocop/**/*' diff --git a/CHANGELOG.md b/CHANGELOG.md index 6e5296e231e..c65b584e3c1 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -2,6 +2,279 @@ documentation](doc/development/changelog.md) for instructions on adding your own entry. +## 11.5.0 (2018-11-22) + +### Security (10 changes, 1 of them is from the community) + +- Escape entity title while autocomplete template rendering to prevent XSS. !2556 +- Update moment to 2.22.2. !22648 (Takuya Noguchi) +- Redact personal tokens in unsubscribe links. +- Escape user fullname while rendering autocomplete template to prevent XSS. +- Persist only SHA digest of PersonalAccessToken#token. +- Monkey kubeclient to not follow any redirects. +- Prevent SSRF attacks in HipChat integration. +- Prevent templated services from being imported. +- Validate Wiki attachments are valid temporary files. +- Fix XSS in merge request source branch name. + +### Removed (2 changes) + +- Remove Git circuit breaker. !22212 +- Remove Koding integration and documentation. !22334 + +### Fixed (74 changes, 15 of them are from the community) + +- Hide all tables on Pipeline when no Jobs for the Pipeline. !18540 (Takuya Noguchi) +- Fixing count on Milestones. !21446 +- Use case insensitve username lookups. !21728 (William George) +- Correctly process Bamboo API result array. !21970 (Alex Lossent) +- Fix 'merged with' UI being displayed when merge request has no merge commit. !22022 +- Fix broken file name navigation on MRs. !22109 +- Fix incorrect spacing between buttons when commenting on a MR. !22135 +- Vertical align Pipeline Graph in Commit Page. !22173 (Johann Hubert Sonntagbauer) +- Reject invalid branch names in repository compare controller. !22186 +- Fix size of emojis of user status in user menu. !22194 +- Use the standard PIP_CACHE_DIR for Python dependency caching template. !22211 (Takuya Noguchi) +- Fix bug with wiki attachments content disposition. !22220 +- Does not allow a SSH URI when importing new projects. !22309 +- fix duplicated key in license management job auto devops gitlab ci template. !22311 (Adam Lemanski) +- Fix commit signature error when project is disabled. !22344 +- Show available clusters when installed or updated. !22356 +- Fix auto-corrected upload URLs in webhooks. !22361 +- Fix a bug displaying certain wiki pages. !22377 +- Fix prometheus graphs in firefox. !22400 +- Resolve assign-me quick action doesn't work if there is extra white space. !22402 +- Remove base64 encoding from files that contain plain text. !22425 +- Strip whitespace around GitHub personal access tokens. !22432 +- Fix 500 error when testing webhooks with redirect loops. !22447 (Heinrich Lee Yu) +- Fix rendering of 'Protected' value on Runner details page. !22459 +- Fix bug stopping non-admin users from changing visibility level on group creation. !22468 +- Make Issue Board sidebar show project-specific labels based on selected Issue. !22475 +- Fix EOF detection with CI artifacts metadata. !22479 +- Fix transient spec error in the bar_chart component. !22495 +- Resolve LFS not correctly showing enabled. !22501 +- If user was not found, service hooks won't run on post receive background job. !22519 +- Fix broken "Show whitespace changes" button on MRs. !22539 +- Always show new issue button in boards' Open list. !22557 (Heinrich Lee Yu) +- Add transparent background to markdown header tabs. !22565 (George Tsiolis) +- Use gitlab_environment for ldap rake task. !22582 +- Add commit message to commit tree anchor title. !22585 +- Cache pipeline status per SHA. !22589 +- Change HELM_HOST in Auto-DevOps template to work behind proxy. !22596 (Sergej Nikolaev <kinolaev@gmail.com>) +- Show user status for label events in system notes. !22609 +- Fix extra merge request versions created from forked merge requests. !22611 +- Remove PersonalAccessTokensFinder#find_by method. !22617 +- Fix search "all in GitLab" not working with relative URLs. !22644 +- Fix quick links button styles. !22657 (George Tsiolis) +- Fix #53298: JupyterHub restarts should work without errors. !22671 (Amit Rathi) +- Fix incompatibility with IE11 due to non-transpiled gitlab-ui components. !22695 +- Fix bug when links in tabs of the labels index pages ends with .html. !22716 +- Fixed label removal from issue. !22762 +- Align toggle sidebar button across all browsers and OSs. !22771 +- Disable replication lag check for Aurora PostgreSQL databases. !22786 +- Render unescaped link for failed pipeline status. !22807 +- Fix misaligned approvers dropdown. !22832 +- Fix bug with wiki page create message. !22849 +- Fix rendering of filter bar tokens for special values. !22865 (Heinrich Lee Yu) +- Align sign in button. !22888 (George Tsiolis) +- Fix error handling bugs in kubernetes integration. !22922 +- Fix deployment jobs using nil KUBE_TOKEN due to migration issue. !23009 +- Avoid returning deployment metrics url to MR widget when the deployment is not successful. !23010 +- Fix a race condition intermittently breaking GitLab startup. !23028 +- Adds margin after a deleted branch name in the activity feed. !23038 +- Ignore environment validation failure. !23100 +- Fixes broken borders for reports section in MR widget. +- Adds CI favicon back to jobs page. +- Redirect to the pipeline builds page when a build is canceled. (Eva Kadlecova) +- Fixed diff stats not showing when performance bar is enabled. +- Show expand all diffs button when a single diff file is collapsed. +- Clear fetched file templates when changing template type in Web IDE. +- Fix bug causing not all emails to show up in commit email selectbox. +- Remove duplicate escape in job sidebar. +- Fixing styling issues on the scheduled pipelines page. +- Renders stuck block when runners are stuck. +- Removes extra border from test reports in the merge request widget. +- Only render link to branch when branch still exists in pipeline page. +- Fixed source project not filtering in merge request creation compare form. +- Do not reload self on hooks when creating deployment. +- Fixes broken test in master. + +### Changed (38 changes, 12 of them are from the community) + +- Link button in markdown editor recognize URLs. !1983 (Johann Hubert Sonntagbauer) +- Replace i to icons in vue components. !20748 (George Tsiolis) +- Remove Linguist gem, reducing Rails memory usage by 128MB per process. !21008 +- Issue board card design. !21229 +- On deletion of a file in sub directory in web IDE redirect to the sub directory instead of project root. !21465 (George Thomas @thegeorgeous) +- Change single-item breadcrumbs to page titles. !22155 +- Improving branch filter sorting by listing exact matches first and added support for begins_with (^) and ends_with ($) matching. !22166 (Jason Rutherford) +- Remove legacy unencrypted webhook columns from the database. !22199 +- Show canary status in the performance bar. !22222 +- Add failure reason for execution timeout. !22224 +- Rename "scheduled" label/badge of delayed jobs to "delayed". !22245 +- Update the empty state on wiki-only projects to display an empty state that is more consistent with the rest of the system. !22262 +- Add IID headers to E-Mail notifications. !22263 +- Allow finding the common ancestor for multiple revisions through the API. !22295 +- Add status to Deployment. !22380 +- Add dynamic timer to delayed jobs. !22382 +- No longer require a deploy to start Prometheus monitoring. !22401 +- Secret Variables renamed to CI Variables in the codebase, to match UX. !22414 (Marcel Amirault @ravlen) +- Automatically navigate to last board visited. !22430 +- Use merge request prefix symbol in event feed title. !22449 (George Tsiolis) +- Update Ruby version in README. !22466 (J.D. Bean) +- Reword error message for internal CI unknown pipeline status. !22474 +- Bump mermaid to 8.0.0-rc.8. !22509 (@blackst0ne) +- Update Todo icons in collapsed sidebar for Issues and MRs. !22534 +- Support backward compatibility when introduce new failure reason. !22566 +- Add dynamic timer for delayed jobs in pipelines list. !22621 +- Truncate milestone title on collapsed sidebar. !22624 (George Tsiolis) +- Standardize milestones filter in APIs to None / Any. !22637 (Heinrich Lee Yu) +- Add dynamic timer for delayed jobs in job list. !22656 +- Allowing issues with single letter identifiers to be linked to external issue tracker (f.ex T-123). !22717 (Dídac Rodríguez Arbonès) +- Update project and group labels empty state. !22745 (George Tsiolis) +- Fix environment status in merge request widget. !22799 +- Paginate Bitbucket Server importer projects. !22825 +- Drop `allow_overflow` option in `TimeHelper.duration_in_numbers`. !52284 +- Add 'only history' option to notes filter. +- Adds filtered dropdown with changed files in review. +- Expose {closed,merged}_{at,by} in merge requests API index. +- Make all legacy security reports to use raw format. + +### Performance (27 changes, 6 of them are from the community) + +- Add preload for routes and namespaces for issues controller. !21651 +- Enhance performance of counting local LFS objects. !22143 +- Use cached readme contents when available. !22325 +- Experimental support for running Puma multithreaded web-server. !22372 +- Enhance performance of counting local Uploads. !22522 +- Reduce SQL queries needed to load open merge requests. !22709 +- Significantly cut memory usage and SQL queries when reloading diffs. !22725 +- Optimize merge request refresh by using the database to check commit SHAs. !22731 +- Remove dind from license_management auto-devops job definition. !22732 +- Add index to find stuck merge requests. !22749 +- Allow Rails concurrency when running in Puma. !22751 +- Improve performance of rendering large reports. !22835 +- Improves performance of stuck import jobs detection. !22879 +- Rewrite SnippetsFinder to improve performance by a factor of 1500. +- Enable more frozen string in lib/**/*.rb. (gfyoung) +- Enable some frozen string in lib/gitlab. (gfyoung) +- Enable even more frozen string in lib/**/*.rb. (gfyoung) +- Improve performance of tree rendering in repositories with lots of items. +- Remove gitlab-ui's tooltip from global. +- Remove gitlab-ui's progress bar from global. +- Remove gitlab-ui's pagination from global. +- Remove gitlab-ui's modal from global. +- Remove gitlab-ui's loading icon from global. +- Enable frozen string for lib/gitlab/*.rb. (gfyoung) +- Enable frozen string for lib/gitlab/ci. (gfyoung) +- Enable frozen string for remaining lib/gitlab/ci/**/*.rb. (gfyoung) +- Adds pagination to pipelines table in merge request page. + +### Added (33 changes, 11 of them are from the community) + +- Add endpoint to update a git submodule reference. !20949 +- Add license data to projects endpoint. !21606 (J.D. Bean (@jdbean)) +- Allow to configure when to retry failed CI jobs. !21758 (Markus Doits) +- Add API endpoint to list issue related merge requests. !21806 (Helmut Januschka) +- Add the Play button for delayed jobs in environment page. !22106 +- Switch between tree list & file list in diffs file browser. !22191 +- Re-arrange help-related user menu items into new Help menu. !22195 +- Adds trace of each access check when git push times out. !22265 +- Add email for milestone change. !22279 +- Show post-merge pipeline in merge request page. !22292 +- Add Applications API endpoints for listing and deleting entries. !22296 (Jean-Baptiste Vasseur) +- Added `Any` option to milestones filter. !22351 (Heinrich Lee Yu) +- Improve validation errors for external CI/CD configuration. !22394 +- Introduce new model to persist specific cluster information. !22404 +- Add background migration to populate Kubernetes namespaces. !22433 +- Add support for JSON logging for audit events. !22471 +- Adds option to override commit email with a noreply private email. !22560 +- Add None/Any option for assignee_id in Issues and Merge Requests API. !22598 (Heinrich Lee Yu) +- Add None/Any option for assignee_id in search bar. !22599 (Heinrich Lee Yu) +- Implement parallel job keyword. !22631 +- Add None / Any options to reactions filter. !22638 (Heinrich Lee Yu) +- Make index.* render like README.* when it's present in a repository. !22639 (Jakub Jirutka) +- Allow adding patches when creating a merge request via email. !22723 (Serdar Dogruyol) +- Bump Gitaly to 0.129.0. !22868 +- Allow commenting on any diff line in Merge Requests. !22914 +- Add revert to commits API. !22919 +- Introduce Knative support. !43959 (Chris Baumbauer) +- Reimplemented image commenting in merge request diffs. +- Soft-archive old jobs. +- Renders warning info when job is archieved. +- Support licenses and performance. +- Filter notes by comments or activity for issues and merge requests. +- Bump Gitaly to 0.128.0. + +### Other (54 changes, 18 of them are from the community) + +- Remove .card-title from .card-header for BS4 migration. !19335 (Takuya Noguchi) +- Update group settings/edit page to new design. !21115 +- Change markdown header tab anchor links to buttons. !21988 (George Tsiolis) +- Replace tooltip in markdown component with gl-tooltip. !21989 (George Tsiolis) +- Extend RBAC by having a service account restricted to project's namespace. !22011 +- Update images in group docs. !22031 (Marc Schwede) +- Add gitlab:gitaly:check task for Gitaly health check. !22063 +- Add new sort option "most_stars" to "Group > Children" pages. !22121 (Rene Hennig) +- Fix inaccessible dropdown for code-less projects. !22137 +- Rails5: fix user edit profile clear status spec. !22169 (Jasper Maes) +- Rails 5: fix mysql milliseconds problems in scheduled build specs. !22170 (Jasper Maes) +- Focus project slug on tab navigation. !22198 +- Redesign activity feed. !22217 +- Update used version of Runner Helm Chart to 0.1.34. !22274 +- Update environments empty state. !22297 (George Tsiolis) +- Adds model and migrations to enable group level clusters. !22307 +- Use literal instead of constructor for creating regex. !22367 +- Remove prometheus configuration help text. !22413 (George Tsiolis) +- Rails5: fix deployment model spec. !22428 (Jasper Maes) +- Change to top level controller for clusters so that we can use it for project clusters (now) and group clusters (later). !22438 +- Remove empty spec describe blocks. !22451 (George Tsiolis) +- Change branch font type in tag creation. !22454 (George Tsiolis) +- Rails5: fix delete blob. !22456 (Jasper Maes) +- Start tracking shards and pool repositories in the database. !22482 +- Allow kubeclient to call RoleBinding methods. !22524 +- Introduce new kubernetes helpers. !22525 +- Adds container to pager to enable scoping. !22529 +- Update used version of Runner Helm Chart to 0.1.35. !22541 +- Removes experimental labels from cluster views. !22550 +- Combine all datetime library functions into 'datetime_utility.js'. !22570 +- Upgrade Prometheus to 2.4.3 and Alertmanager to 0.15.2. !22600 +- Fix stage dropdown not rendering in different languages. !22604 +- Remove asset_sync gem from Gemfile and related code from codebase. !22610 +- Use key-value pair arrays for API query parameter logging instead of hashes. !22623 +- Replace deprecated uniq on a Relation with distinct. !22625 (Jasper Maes) +- Remove mousetrap-rails gem. !22647 (Takuya Noguchi) +- Fix IDE typos in props. !22685 (George Tsiolis) +- Add scheduled flag to job entity. !22710 +- Remove `ci_enable_scheduled_build` feature flag. !22742 +- Add endpoints for simulating certain failure modes in the application. !22746 +- Bump KUBERNETES_VERSION for Auto DevOps to latest 1.10 series. !22757 +- Fix statement timeouts in RemoveRestrictedTodos migration. !22795 +- Rails5: fix mysql milliseconds issue in deployment model specs. !22850 (Jasper Maes) +- Update GitLab-Workhorse to v7.1.0. !22883 +- Update JIRA service UI to accept email and API token. +- Update wiki empty state. (George Tsiolis) +- Only renders dropdown for review app changes when we have a list of files to show. Otherwise will render the regular review app button. +- Associate Rakefile with Ruby icon in diffs. +- Uses gitlab-ui components in jobs components. +- Create new group: Rename form fields and update UI. +- Transform job page into a single Vue+Vuex application. +- Updates svg dependency. +- Adds missing i18n to pipelines table. +- Disables stop environment button while the deploy is in progress. + + +## 11.4.7 (2018-11-20) + +- No changes. + +## 11.4.6 (2018-11-18) + +### Security (1 change) + +- Escape user fullname while rendering autocomplete template to prevent XSS. + + ## 11.4.5 (2018-11-04) ### Fixed (4 changes, 1 of them is from the community) @@ -271,6 +544,13 @@ entry. - Check frozen string in style builds. (gfyoung) +## 11.3.10 (2018-11-18) + +### Security (1 change) + +- Escape user fullname while rendering autocomplete template to prevent XSS. + + ## 11.3.9 (2018-10-31) ### Security (1 change) @@ -389,7 +389,7 @@ group :test do gem 'rails-controller-testing' if rails5? # Rails5 only gem. gem 'test_after_commit', '~> 1.1' unless rails5? # Remove this gem when migrated to rails 5.0. It's been integrated to rails 5.0. gem 'sham_rack', '~> 1.3.6' - gem 'concurrent-ruby', '~> 1.0.5' + gem 'concurrent-ruby', '~> 1.1' gem 'test-prof', '~> 0.2.5' gem 'rspec_junit_formatter' end diff --git a/Gemfile.lock b/Gemfile.lock index 975243f31d5..5ceb5d29252 100644 --- a/Gemfile.lock +++ b/Gemfile.lock @@ -128,9 +128,9 @@ GEM concord (0.1.5) adamantium (~> 0.2.0) equalizer (~> 0.0.9) - concurrent-ruby (1.0.5) - concurrent-ruby-ext (1.0.5) - concurrent-ruby (= 1.0.5) + concurrent-ruby (1.1.3) + concurrent-ruby-ext (1.1.3) + concurrent-ruby (= 1.1.3) connection_pool (2.2.2) crack (0.4.3) safe_yaml (~> 1.0.0) @@ -182,7 +182,7 @@ GEM encryptor (3.0.0) equalizer (0.0.11) erubis (2.7.0) - escape_utils (1.1.1) + escape_utils (1.2.1) et-orbi (1.0.3) tzinfo eventmachine (1.2.7) @@ -379,7 +379,7 @@ GEM json (~> 1.8) multi_xml (>= 0.5.2) httpclient (2.8.3) - i18n (1.1.0) + i18n (1.1.1) concurrent-ruby (~> 1.0) icalendar (2.4.1) ice_nine (0.11.2) @@ -444,7 +444,7 @@ GEM activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.2.2) + loofah (2.2.3) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.0) @@ -453,7 +453,7 @@ GEM memoist (0.16.0) memoizable (0.4.2) thread_safe (~> 0.3, >= 0.3.1) - method_source (0.9.0) + method_source (0.9.2) mime-types (3.2.2) mime-types-data (~> 3.2015) mime-types-data (3.2018.0812) @@ -475,7 +475,7 @@ GEM net-ssh (5.0.1) netrc (0.11.0) nio4r (2.3.1) - nokogiri (1.8.4) + nokogiri (1.8.5) mini_portile2 (~> 2.3.0) nokogumbo (1.5.0) nokogiri @@ -603,7 +603,7 @@ GEM get_process_mem (~> 0.2) puma (>= 2.7, < 4) pyu-ruby-sasl (0.0.3.3) - rack (2.0.5) + rack (2.0.6) rack-accept (0.4.5) rack (>= 0.4) rack-attack (4.4.1) @@ -767,8 +767,8 @@ GEM ruby-progressbar (1.9.0) ruby-saml (1.7.2) nokogiri (>= 1.5.10) - ruby_parser (3.9.0) - sexp_processor (~> 4.1) + ruby_parser (3.11.0) + sexp_processor (~> 4.9) rubyntlm (0.6.2) rubypants (0.2.0) rubyzip (1.2.2) @@ -808,7 +808,7 @@ GEM sentry-raven (2.7.2) faraday (>= 0.7.6, < 1.0) settingslogic (2.0.9) - sexp_processor (4.9.0) + sexp_processor (4.11.0) sham_rack (1.3.6) rack shoulda-matchers (3.1.2) @@ -967,7 +967,7 @@ DEPENDENCIES chronic (~> 0.10.2) chronic_duration (~> 0.10.6) commonmarker (~> 0.17) - concurrent-ruby (~> 1.0.5) + concurrent-ruby (~> 1.1) connection_pool (~> 2.0) creole (~> 0.5.0) database_cleaner (~> 1.5.0) diff --git a/Gemfile.rails4.lock b/Gemfile.rails4.lock index 657975da2a4..dd2cd59daae 100644 --- a/Gemfile.rails4.lock +++ b/Gemfile.rails4.lock @@ -125,9 +125,9 @@ GEM concord (0.1.5) adamantium (~> 0.2.0) equalizer (~> 0.0.9) - concurrent-ruby (1.0.5) - concurrent-ruby-ext (1.0.5) - concurrent-ruby (= 1.0.5) + concurrent-ruby (1.1.3) + concurrent-ruby-ext (1.1.3) + concurrent-ruby (= 1.1.3) connection_pool (2.2.2) crack (0.4.3) safe_yaml (~> 1.0.0) @@ -181,7 +181,7 @@ GEM encryptor (3.0.0) equalizer (0.0.11) erubis (2.7.0) - escape_utils (1.1.1) + escape_utils (1.2.1) et-orbi (1.0.3) tzinfo eventmachine (1.2.7) @@ -441,7 +441,7 @@ GEM activesupport (>= 4) railties (>= 4) request_store (~> 1.0) - loofah (2.2.2) + loofah (2.2.3) crass (~> 1.0.2) nokogiri (>= 1.5.9) mail (2.7.0) @@ -471,7 +471,7 @@ GEM net-ldap (0.16.0) net-ssh (5.0.1) netrc (0.11.0) - nokogiri (1.8.4) + nokogiri (1.8.5) mini_portile2 (~> 2.3.0) nokogumbo (1.5.0) nokogiri @@ -759,8 +759,8 @@ GEM ruby-progressbar (1.9.0) ruby-saml (1.7.2) nokogiri (>= 1.5.10) - ruby_parser (3.9.0) - sexp_processor (~> 4.1) + ruby_parser (3.11.0) + sexp_processor (~> 4.9) rubyntlm (0.6.2) rubypants (0.2.0) rubyzip (1.2.2) @@ -800,7 +800,7 @@ GEM sentry-raven (2.7.2) faraday (>= 0.7.6, < 1.0) settingslogic (2.0.9) - sexp_processor (4.9.0) + sexp_processor (4.11.0) sham_rack (1.3.6) rack shoulda-matchers (3.1.2) @@ -958,7 +958,7 @@ DEPENDENCIES chronic (~> 0.10.2) chronic_duration (~> 0.10.6) commonmarker (~> 0.17) - concurrent-ruby (~> 1.0.5) + concurrent-ruby (~> 1.1) connection_pool (~> 2.0) creole (~> 0.5.0) database_cleaner (~> 1.5.0) diff --git a/PHILOSOPHY.md b/PHILOSOPHY.md new file mode 100644 index 00000000000..e966d88ef78 --- /dev/null +++ b/PHILOSOPHY.md @@ -0,0 +1 @@ +This document is intended to communicate the product philosophy GitLab uses in creating GitLab Community Edition. The principles can be found in the [Product Section of the GitLab Handbook](https://about.gitlab.com/handbook/product/#product-at-gitlab).
\ No newline at end of file diff --git a/PROCESS.md b/PROCESS.md index 5fc2c4cf1df..aadd6a321f0 100644 --- a/PROCESS.md +++ b/PROCESS.md @@ -95,6 +95,12 @@ picked into the stable branches) up to the 19th of the month. Such merge requests should have the ~"feature flag" label assigned, and don't require a corresponding exception request to be created. +In order to build the final package and present the feature for self-hosted +customers, the feature flag should be removed. This should happen before the +22nd, ideally _at least_ 2 days before. That means MRs with feature +flags being picked at the 19th would have a quite tight schedule, so picking +these _earlier_ is preferable. + While rare, release managers may decide to reject picking a change into a stable branch, even when feature flags are used. This might be necessary if the changes are deemed problematic, too invasive, or there simply isn't enough time to @@ -1 +1 @@ -11.5.0-pre +11.6.0-pre diff --git a/app/assets/javascripts/badges/components/badge.vue b/app/assets/javascripts/badges/components/badge.vue index ca1662313c2..ae6029142fe 100644 --- a/app/assets/javascripts/badges/components/badge.vue +++ b/app/assets/javascripts/badges/components/badge.vue @@ -65,12 +65,7 @@ export default { <template> <div> - <a - v-show="!isLoading && !hasError" - :href="linkUrl" - target="_blank" - rel="noopener noreferrer" - > + <a v-show="!isLoading && !hasError" :href="linkUrl" target="_blank" rel="noopener noreferrer"> <img :src="imageUrlWithRetries" class="project-badge" @@ -80,15 +75,9 @@ export default { /> </a> - <gl-loading-icon - v-show="isLoading" - :inline="true" - /> + <gl-loading-icon v-show="isLoading" :inline="true" /> - <div - v-show="hasError" - class="btn-group" - > + <div v-show="hasError" class="btn-group"> <div class="btn btn-default btn-sm disabled"> <icon :size="16" @@ -97,9 +86,7 @@ export default { aria-hidden="true" /> </div> - <div - class="btn btn-default btn-sm disabled" - > + <div class="btn btn-default btn-sm disabled"> <span class="prepend-left-8 append-right-8">{{ s__('Badges|No badge image') }}</span> </div> </div> @@ -112,10 +99,7 @@ export default { type="button" @click="reloadImage" > - <icon - :size="16" - name="retry" - /> + <icon :size="16" name="retry" /> </button> </div> </template> diff --git a/app/assets/javascripts/badges/components/badge_form.vue b/app/assets/javascripts/badges/components/badge_form.vue index 0eff922d93c..85a15b38de1 100644 --- a/app/assets/javascripts/badges/components/badge_form.vue +++ b/app/assets/javascripts/badges/components/badge_form.vue @@ -155,10 +155,7 @@ export default { @submit.prevent.stop="onSubmit" > <div class="form-group"> - <label - for="badge-link-url" - class="label-bold" - >{{ s__('Badges|Link') }}</label> + <label for="badge-link-url" class="label-bold">{{ s__('Badges|Link') }}</label> <p v-html="helpText"></p> <input id="badge-link-url" @@ -168,19 +165,12 @@ export default { required @input="debouncedPreview" /> - <div class="invalid-feedback"> - {{ s__('Badges|Please fill in a valid URL') }} - </div> - <span class="form-text text-muted"> - {{ badgeLinkUrlExample }} - </span> + <div class="invalid-feedback">{{ s__('Badges|Please fill in a valid URL') }}</div> + <span class="form-text text-muted"> {{ badgeLinkUrlExample }} </span> </div> <div class="form-group"> - <label - for="badge-image-url" - class="label-bold" - >{{ s__('Badges|Badge image URL') }}</label> + <label for="badge-image-url" class="label-bold">{{ s__('Badges|Badge image URL') }}</label> <p v-html="helpText"></p> <input id="badge-image-url" @@ -190,12 +180,8 @@ export default { required @input="debouncedPreview" /> - <div class="invalid-feedback"> - {{ s__('Badges|Please fill in a valid URL') }} - </div> - <span class="form-text text-muted"> - {{ badgeImageUrlExample }} - </span> + <div class="invalid-feedback">{{ s__('Badges|Please fill in a valid URL') }}</div> + <span class="form-text text-muted"> {{ badgeImageUrlExample }} </span> </div> <div class="form-group"> @@ -206,37 +192,22 @@ export default { :image-url="renderedImageUrl" :link-url="renderedLinkUrl" /> - <p v-show="isRendering"> - <gl-loading-icon - :inline="true" - /> + <p v-show="isRendering"><gl-loading-icon :inline="true" /></p> + <p v-show="!renderedBadge && !isRendering" class="disabled-content"> + {{ s__('Badges|No image to preview') }} </p> - <p - v-show="!renderedBadge && !isRendering" - class="disabled-content" - >{{ s__('Badges|No image to preview') }}</p> </div> - <div - v-if="isEditing" - class="row-content-block" - > + <div v-if="isEditing" class="row-content-block"> <loading-button :loading="isSaving" :label="s__('Badges|Save changes')" type="submit" container-class="btn btn-success" /> - <button - class="btn btn-cancel" - type="button" - @click="onCancel" - >{{ __('Cancel') }}</button> + <button class="btn btn-cancel" type="button" @click="onCancel">{{ __('Cancel') }}</button> </div> - <div - v-else - class="form-group" - > + <div v-else class="form-group"> <loading-button :loading="isSaving" :label="s__('Badges|Add badge')" diff --git a/app/assets/javascripts/badges/components/badge_list.vue b/app/assets/javascripts/badges/components/badge_list.vue index 5b64ea1080c..d2767dd6c64 100644 --- a/app/assets/javascripts/badges/components/badge_list.vue +++ b/app/assets/javascripts/badges/components/badge_list.vue @@ -26,32 +26,15 @@ export default { <div class="card"> <div class="card-header"> {{ s__('Badges|Your badges') }} - <span - v-show="!isLoading" - class="badge badge-pill" - >{{ badges.length }}</span> + <span v-show="!isLoading" class="badge badge-pill">{{ badges.length }}</span> </div> - <gl-loading-icon - v-show="isLoading" - :size="2" - class="card-body" - /> - <div - v-if="hasNoBadges" - class="card-body" - > + <gl-loading-icon v-show="isLoading" :size="2" class="card-body" /> + <div v-if="hasNoBadges" class="card-body"> <span v-if="isGroupBadge">{{ s__('Badges|This group has no badges') }}</span> <span v-else>{{ s__('Badges|This project has no badges') }}</span> </div> - <div - v-else - class="card-body" - > - <badge-list-row - v-for="badge in badges" - :key="badge.id" - :badge="badge" - /> + <div v-else class="card-body"> + <badge-list-row v-for="badge in badges" :key="badge.id" :badge="badge" /> </div> </div> </template> diff --git a/app/assets/javascripts/badges/components/badge_list_row.vue b/app/assets/javascripts/badges/components/badge_list_row.vue index d01465232a7..9051be1e102 100644 --- a/app/assets/javascripts/badges/components/badge_list_row.vue +++ b/app/assets/javascripts/badges/components/badge_list_row.vue @@ -50,20 +50,14 @@ export default { <span class="badge badge-pill">{{ badgeKindText }}</span> </div> <div class="table-section section-15 table-button-footer"> - <div - v-if="canEditBadge" - class="table-action-buttons"> + <div v-if="canEditBadge" class="table-action-buttons"> <button :disabled="badge.isDeleting" class="btn btn-default append-right-8" type="button" - @click="editBadge(badge)" + @click="editBadge(badge);" > - <icon - :size="16" - :aria-label="__('Edit')" - name="pencil" - /> + <icon :size="16" :aria-label="__('Edit')" name="pencil" /> </button> <button :disabled="badge.isDeleting" @@ -71,18 +65,11 @@ export default { type="button" data-toggle="modal" data-target="#delete-badge-modal" - @click="updateBadgeInModal(badge)" + @click="updateBadgeInModal(badge);" > - <icon - :size="16" - :aria-label="__('Delete')" - name="remove" - /> + <icon :size="16" :aria-label="__('Delete')" name="remove" /> </button> - <gl-loading-icon - v-show="badge.isDeleting" - :inline="true" - /> + <gl-loading-icon v-show="badge.isDeleting" :inline="true" /> </div> </div> </div> diff --git a/app/assets/javascripts/badges/components/badge_settings.vue b/app/assets/javascripts/badges/components/badge_settings.vue index cc47e56dd1e..75a522efe7e 100644 --- a/app/assets/javascripts/badges/components/badge_settings.vue +++ b/app/assets/javascripts/badges/components/badge_settings.vue @@ -46,7 +46,8 @@ export default { :header-title-text="s__('Badges|Delete badge?')" :footer-primary-button-text="s__('Badges|Delete badge')" footer-primary-button-variant="danger" - @submit="onSubmitModal"> + @submit="onSubmitModal" + > <div class="well"> <badge :image-url="badgeInModal ? badgeInModal.renderedImageUrl : ''" @@ -56,15 +57,9 @@ export default { <p v-html="deleteModalText"></p> </gl-modal> - <badge-form - v-show="isEditing" - :is-editing="true" - /> + <badge-form v-show="isEditing" :is-editing="true" /> - <badge-form - v-show="!isEditing" - :is-editing="false" - /> + <badge-form v-show="!isEditing" :is-editing="false" /> <badge-list v-show="!isEditing" /> </div> </template> diff --git a/app/assets/javascripts/behaviors/shortcuts/shortcuts_issuable.js b/app/assets/javascripts/behaviors/shortcuts/shortcuts_issuable.js index 5e48bf5a35c..2918e1486a7 100644 --- a/app/assets/javascripts/behaviors/shortcuts/shortcuts_issuable.js +++ b/app/assets/javascripts/behaviors/shortcuts/shortcuts_issuable.js @@ -4,6 +4,7 @@ import _ from 'underscore'; import Sidebar from '../../right_sidebar'; import Shortcuts from './shortcuts'; import { CopyAsGFM } from '../markdown/copy_as_gfm'; +import { getSelectedFragment } from '~/lib/utils/common_utils'; export default class ShortcutsIssuable extends Shortcuts { constructor(isMergeRequest) { @@ -24,17 +25,43 @@ export default class ShortcutsIssuable extends Shortcuts { static replyWithSelectedText() { const $replyField = $('.js-main-target-form .js-vue-comment-form'); - const documentFragment = window.gl.utils.getSelectedFragment(); - if (!$replyField.length) { + if (!$replyField.length || $replyField.is(':hidden') /* Other tab selected in MR */) { return false; } + const documentFragment = getSelectedFragment(document.querySelector('#content-body')); + if (!documentFragment) { $replyField.focus(); return false; } + // Sanity check: Make sure the selected text comes from a discussion : it can either contain a message... + let foundMessage = !!documentFragment.querySelector('.md, .wiki'); + + // ... Or come from a message + if (!foundMessage) { + if (documentFragment.originalNodes) { + documentFragment.originalNodes.forEach(e => { + let node = e; + do { + // Text nodes don't define the `matches` method + if (node.matches && node.matches('.md, .wiki')) { + foundMessage = true; + } + node = node.parentNode; + } while (node && !foundMessage); + }); + } + + // If there is no message, just select the reply field + if (!foundMessage) { + $replyField.focus(); + return false; + } + } + const el = CopyAsGFM.transformGFMSelection(documentFragment.cloneNode(true)); const selected = CopyAsGFM.nodeToGFM(el); diff --git a/app/assets/javascripts/blob/viewer/index.js b/app/assets/javascripts/blob/viewer/index.js index befa1dc455f..d0359fc5fe9 100644 --- a/app/assets/javascripts/blob/viewer/index.js +++ b/app/assets/javascripts/blob/viewer/index.js @@ -23,10 +23,12 @@ export default class BlobViewer { if (!viewer || !viewer.dataset.richType) return; const initViewer = promise => - promise.then(module => module.default(viewer)).catch(error => { - Flash('Error loading file viewer.'); - throw error; - }); + promise + .then(module => module.default(viewer)) + .catch(error => { + Flash('Error loading file viewer.'); + throw error; + }); switch (viewer.dataset.richType) { case 'balsamiq': diff --git a/app/assets/javascripts/boards/components/board_blank_state.vue b/app/assets/javascripts/boards/components/board_blank_state.vue index 561a4636ef5..667eea17d44 100644 --- a/app/assets/javascripts/boards/components/board_blank_state.vue +++ b/app/assets/javascripts/boards/components/board_blank_state.vue @@ -61,35 +61,25 @@ export default { <template> <div class="board-blank-state"> - <p> - Add the following default lists to your Issue Board with one click: - </p> + <p>Add the following default lists to your Issue Board with one click:</p> <ul class="board-blank-state-list"> - <li - v-for="(label, index) in predefinedLabels" - :key="index" - > - <span - :style="{ backgroundColor: label.color }" - class="label-color"> - </span> + <li v-for="(label, index) in predefinedLabels" :key="index"> + <span :style="{ backgroundColor: label.color }" class="label-color"> </span> {{ label.title }} </li> </ul> <p> - Starting out with the default set of lists will get you - right on the way to making the most of your board. + Starting out with the default set of lists will get you right on the way to making the most of + your board. </p> <button class="btn btn-success btn-inverted btn-block" type="button" - @click.stop="addDefaultLists"> + @click.stop="addDefaultLists" + > Add default lists </button> - <button - class="btn btn-default btn-block" - type="button" - @click.stop="clearBlankState"> + <button class="btn btn-default btn-block" type="button" @click.stop="clearBlankState"> Nevermind, I'll use my own </button> </div> diff --git a/app/assets/javascripts/boards/components/board_card.vue b/app/assets/javascripts/boards/components/board_card.vue index 2f31316aa76..30fbdb9e97f 100644 --- a/app/assets/javascripts/boards/components/board_card.vue +++ b/app/assets/javascripts/boards/components/board_card.vue @@ -79,14 +79,15 @@ export default { :class="{ 'user-can-drag': !disabled && issue.id, 'is-disabled': disabled || !issue.id, - 'is-active': issueDetailVisible + 'is-active': issueDetailVisible, }" :index="index" :data-issue-id="issue.id" class="board-card" @mousedown="mouseDown" @mousemove="mouseMove" - @mouseup="showIssue($event)"> + @mouseup="showIssue($event);" + > <issue-card-inner :list="list" :issue="issue" diff --git a/app/assets/javascripts/boards/components/board_list.vue b/app/assets/javascripts/boards/components/board_list.vue index a04b828e277..f3f341ece5c 100644 --- a/app/assets/javascripts/boards/components/board_list.vue +++ b/app/assets/javascripts/boards/components/board_list.vue @@ -222,23 +222,22 @@ export default { <template> <div class="board-list-component"> - <div - v-if="loading" - class="board-list-loading text-center" - aria-label="Loading issues"> + <div v-if="loading" class="board-list-loading text-center" aria-label="Loading issues"> <gl-loading-icon /> </div> <board-new-issue v-if="list.type !== 'closed' && showIssueForm" :group-id="groupId" - :list="list"/> + :list="list" + /> <ul v-show="!loading" ref="list" :data-board="list.id" :data-board-type="list.type" :class="{ 'is-smaller': showIssueForm }" - class="board-list js-board-list"> + class="board-list js-board-list" + > <board-card v-for="(issue, index) in issues" ref="issue" @@ -249,25 +248,12 @@ export default { :issue-link-base="issueLinkBase" :group-id="groupId" :root-path="rootPath" - :disabled="disabled" /> - <li - v-if="showCount" - class="board-list-count text-center" - data-issue-id="-1"> - <gl-loading-icon - v-show="list.loadingMore" - label="Loading more issues" - /> - <span - v-if="list.issues.length === list.issuesSize" - > - Showing all issues - </span> - <span - v-else - > - Showing {{ list.issues.length }} of {{ list.issuesSize }} issues - </span> + :disabled="disabled" + /> + <li v-if="showCount" class="board-list-count text-center" data-issue-id="-1"> + <gl-loading-icon v-show="list.loadingMore" label="Loading more issues" /> + <span v-if="list.issues.length === list.issuesSize"> Showing all issues </span> + <span v-else> Showing {{ list.issues.length }} of {{ list.issuesSize }} issues </span> </li> </ul> </div> diff --git a/app/assets/javascripts/boards/components/board_new_issue.vue b/app/assets/javascripts/boards/components/board_new_issue.vue index 2a96d1443e1..93bcb4e129e 100644 --- a/app/assets/javascripts/boards/components/board_new_issue.vue +++ b/app/assets/javascripts/boards/components/board_new_issue.vue @@ -96,21 +96,11 @@ export default { <template> <div class="board-new-issue-form"> <div class="board-card"> - <form @submit="submit($event)"> - <div - v-if="error" - class="flash-container" - > - <div class="flash-alert"> - An error occurred. Please try again. - </div> + <form @submit="submit($event);"> + <div v-if="error" class="flash-container"> + <div class="flash-alert">An error occurred. Please try again.</div> </div> - <label - :for="list.id + '-title'" - class="label-bold" - > - Title - </label> + <label :for="list.id + '-title'" class="label-bold"> Title </label> <input :id="list.id + '-title'" ref="input" @@ -120,10 +110,7 @@ export default { name="issue_title" autocomplete="off" /> - <project-select - v-if="groupId" - :group-id="groupId" - /> + <project-select v-if="groupId" :group-id="groupId" /> <div class="clearfix prepend-top-10"> <gl-button ref="submit-button" @@ -134,12 +121,7 @@ export default { > Submit issue </gl-button> - <gl-button - class="float-right" - type="button" - variant="default" - @click="cancel" - > + <gl-button class="float-right" type="button" variant="default" @click="cancel"> Cancel </gl-button> </div> diff --git a/app/assets/javascripts/boards/components/issue_card_inner.vue b/app/assets/javascripts/boards/components/issue_card_inner.vue index 48c46ae32f1..0f581c3d37d 100644 --- a/app/assets/javascripts/boards/components/issue_card_inner.vue +++ b/app/assets/javascripts/boards/components/issue_card_inner.vue @@ -169,17 +169,12 @@ export default { :title="__('Confidential')" class="confidential-icon append-right-4" :aria-label="__('Confidential')" - /><a - :href="issue.path" - :title="issue.title" - class="js-no-trigger" - @mousemove.stop>{{ issue.title }}</a> + /><a :href="issue.path" :title="issue.title" class="js-no-trigger" @mousemove.stop>{{ + issue.title + }}</a> </h4> </div> - <div - v-if="showLabelFooter" - class="board-card-labels prepend-top-4 d-flex flex-wrap" - > + <div v-if="showLabelFooter" class="board-card-labels prepend-top-4 d-flex flex-wrap"> <button v-for="label in issue.labels" v-if="showLabel(label)" @@ -189,13 +184,15 @@ export default { :title="label.description" class="badge color-label append-right-4 prepend-top-4" type="button" - @click="filterByLabel(label)" + @click="filterByLabel(label);" > {{ label.title }} </button> </div> <div class="board-card-footer d-flex justify-content-between align-items-end"> - <div class="d-flex align-items-start flex-wrap-reverse board-card-number-container js-board-card-number-container"> + <div + class="d-flex align-items-start flex-wrap-reverse board-card-number-container js-board-card-number-container" + > <span v-if="issue.referencePath" class="board-card-number d-flex append-right-8 prepend-top-8" @@ -205,13 +202,11 @@ export default { :title="issueReferencePath" placement="bottom" class="board-issue-path block-truncated bold" - >{{ issueReferencePath }}</tooltip-on-truncate>#{{ issue.iid }} + >{{ issueReferencePath }}</tooltip-on-truncate + >#{{ issue.iid }} </span> <span class="board-info-items prepend-top-8 d-inline-block"> - <issue-due-date - v-if="issue.dueDate" - :date="issue.dueDate" - /><issue-time-estimate + <issue-due-date v-if="issue.dueDate" :date="issue.dueDate" /><issue-time-estimate v-if="issue.timeEstimate" :estimate="issue.timeEstimate" /> @@ -230,8 +225,7 @@ export default { tooltip-placement="bottom" > <span class="js-assignee-tooltip"> - <span class="bold d-block">Assignee</span> - {{ assignee.name }} + <span class="bold d-block">Assignee</span> {{ assignee.name }} <span class="text-white-50">@{{ assignee.username }}</span> </span> </user-avatar-link> diff --git a/app/assets/javascripts/boards/components/issue_due_date.vue b/app/assets/javascripts/boards/components/issue_due_date.vue index d6c87132843..15937b1091a 100644 --- a/app/assets/javascripts/boards/components/issue_due_date.vue +++ b/app/assets/javascripts/boards/components/issue_due_date.vue @@ -66,25 +66,17 @@ export default { <template> <span> - <span - ref="issueDueDate" - class="board-card-info card-number" - > + <span ref="issueDueDate" class="board-card-info card-number"> <icon - :class="{'text-danger': isPastDue, 'board-card-info-icon': true}" + :class="{ 'text-danger': isPastDue, 'board-card-info-icon': true }" name="calendar" - /><time - :class="{'text-danger': isPastDue}" - datetime="date" - class="board-card-info-text">{{ body }}</time> + /><time :class="{ 'text-danger': isPastDue }" datetime="date" class="board-card-info-text">{{ + body + }}</time> </span> - <gl-tooltip - :target="() => $refs.issueDueDate" - placement="bottom" - > - <span class="bold">{{ __('Due date') }}</span> - <br /> - <span :class="{'text-danger-muted': isPastDue}">{{ title }}</span> + <gl-tooltip :target="() => $refs.issueDueDate" placement="bottom"> + <span class="bold">{{ __('Due date') }}</span> <br /> + <span :class="{ 'text-danger-muted': isPastDue }">{{ title }}</span> </gl-tooltip> </span> </template> diff --git a/app/assets/javascripts/boards/components/issue_time_estimate.vue b/app/assets/javascripts/boards/components/issue_time_estimate.vue index a9803c8ab5d..5acc3025b2c 100644 --- a/app/assets/javascripts/boards/components/issue_time_estimate.vue +++ b/app/assets/javascripts/boards/components/issue_time_estimate.vue @@ -27,22 +27,18 @@ export default { <template> <span> - <span - ref="issueTimeEstimate" - class="board-card-info card-number" - > - <icon - name="hourglass" - css-classes="board-card-info-icon" - /><time class="board-card-info-text">{{ timeEstimate }}</time> + <span ref="issueTimeEstimate" class="board-card-info card-number"> + <icon name="hourglass" css-classes="board-card-info-icon" /><time + class="board-card-info-text" + >{{ timeEstimate }}</time + > </span> <gl-tooltip :target="() => $refs.issueTimeEstimate" placement="bottom" class="js-issue-time-estimate" > - <span class="bold d-block">{{ __('Time estimate') }}</span> - {{ title }} + <span class="bold d-block">{{ __('Time estimate') }}</span> {{ title }} </gl-tooltip> </span> </template> diff --git a/app/assets/javascripts/boards/components/modal/empty_state.vue b/app/assets/javascripts/boards/components/modal/empty_state.vue index 795ba864545..08408eb0b52 100644 --- a/app/assets/javascripts/boards/components/modal/empty_state.vue +++ b/app/assets/javascripts/boards/components/modal/empty_state.vue @@ -45,24 +45,20 @@ export default { <section class="empty-state"> <div class="row"> <div class="col-12 col-md-6 order-md-last"> - <aside class="svg-content"><img :src="emptyStateSvg"/></aside> + <aside class="svg-content"><img :src="emptyStateSvg" /></aside> </div> <div class="col-12 col-md-6 order-md-first"> <div class="text-content"> <h4>{{ contents.title }}</h4> <p v-html="contents.content"></p> - <a - v-if="activeTab === 'all'" - :href="newIssuePath" - class="btn btn-success btn-inverted" - > + <a v-if="activeTab === 'all'" :href="newIssuePath" class="btn btn-success btn-inverted"> New issue </a> <button v-if="activeTab === 'selected'" class="btn btn-default" type="button" - @click="changeTab('all')" + @click="changeTab('all');" > Open issues </button> diff --git a/app/assets/javascripts/boards/components/modal/footer.vue b/app/assets/javascripts/boards/components/modal/footer.vue index d51597ed22d..b1bc7d87086 100644 --- a/app/assets/javascripts/boards/components/modal/footer.vue +++ b/app/assets/javascripts/boards/components/modal/footer.vue @@ -63,28 +63,15 @@ export default { }; </script> <template> - <footer - class="form-actions add-issues-footer" - > + <footer class="form-actions add-issues-footer"> <div class="float-left"> - <button - :disabled="submitDisabled" - class="btn btn-success" - type="button" - @click="addIssues" - > + <button :disabled="submitDisabled" class="btn btn-success" type="button" @click="addIssues"> {{ submitText }} </button> - <span class="inline add-issues-footer-to-list"> - to list - </span> - <lists-dropdown/> + <span class="inline add-issues-footer-to-list"> to list </span> + <lists-dropdown /> </div> - <button - class="btn btn-default float-right" - type="button" - @click="toggleModal(false)" - > + <button class="btn btn-default float-right" type="button" @click="toggleModal(false);"> Cancel </button> </footer> diff --git a/app/assets/javascripts/boards/components/modal/header.vue b/app/assets/javascripts/boards/components/modal/header.vue index fc6cefa89a9..d0e285a149e 100644 --- a/app/assets/javascripts/boards/components/modal/header.vue +++ b/app/assets/javascripts/boards/components/modal/header.vue @@ -58,16 +58,14 @@ export default { class="close" data-dismiss="modal" aria-label="Close" - @click="toggleModal(false)" + @click="toggleModal(false);" > <span aria-hidden="true">×</span> </button> </h2> </header> - <modal-tabs v-if="!loading && issuesCount > 0"/> - <div - v-if="showSearch" - class="add-issues-search append-bottom-10"> + <modal-tabs v-if="!loading && issuesCount > 0" /> + <div v-if="showSearch" class="add-issues-search append-bottom-10"> <modal-filters :store="filter" /> <button ref="selectAllBtn" diff --git a/app/assets/javascripts/boards/components/modal/index.vue b/app/assets/javascripts/boards/components/modal/index.vue index fc0e3e46b88..1e5761cf268 100644 --- a/app/assets/javascripts/boards/components/modal/index.vue +++ b/app/assets/javascripts/boards/components/modal/index.vue @@ -143,9 +143,7 @@ export default { }; </script> <template> - <div - v-if="showAddIssuesModal" - class="add-issues-modal"> + <div v-if="showAddIssuesModal" class="add-issues-modal"> <div class="add-issues-container"> <modal-header :project-id="projectId" @@ -163,15 +161,10 @@ export default { :new-issue-path="newIssuePath" :empty-state-svg="emptyStateSvg" /> - <section - v-if="loading || filterLoading" - class="add-issues-list text-center" - > - <div class="add-issues-list-loading"> - <gl-loading-icon /> - </div> + <section v-if="loading || filterLoading" class="add-issues-list text-center"> + <div class="add-issues-list-loading"><gl-loading-icon /></div> </section> - <modal-footer/> + <modal-footer /> </div> </div> </template> diff --git a/app/assets/javascripts/boards/components/modal/list.vue b/app/assets/javascripts/boards/components/modal/list.vue index e11f398e70d..878bb002c6c 100644 --- a/app/assets/javascripts/boards/components/modal/list.vue +++ b/app/assets/javascripts/boards/components/modal/list.vue @@ -117,38 +117,22 @@ export default { }; </script> <template> - <section - ref="list" - class="add-issues-list add-issues-list-columns"> + <section ref="list" class="add-issues-list add-issues-list-columns"> <div v-if="issuesCount > 0 && issues.length === 0" - class="empty-state add-issues-empty-state-filter text-center"> - <div class="svg-content"> - <img :src="emptyStateSvg" /> - </div> - <div class="text-content"> - <h4> - There are no issues to show. - </h4> - </div> + class="empty-state add-issues-empty-state-filter text-center" + > + <div class="svg-content"><img :src="emptyStateSvg" /></div> + <div class="text-content"><h4>There are no issues to show.</h4></div> </div> - <div - v-for="(group, index) in groupedIssues" - :key="index" - class="add-issues-list-column"> - <div - v-for="issue in group" - v-if="showIssue(issue)" - :key="issue.id" - class="board-card-parent"> + <div v-for="(group, index) in groupedIssues" :key="index" class="add-issues-list-column"> + <div v-for="issue in group" v-if="showIssue(issue)" :key="issue.id" class="board-card-parent"> <div :class="{ 'is-active': issue.selected }" class="board-card" - @click="toggleIssue($event, issue)"> - <issue-card-inner - :issue="issue" - :issue-link-base="issueLinkBase" - :root-path="rootPath"/> + @click="toggleIssue($event, issue);" + > + <issue-card-inner :issue="issue" :issue-link-base="issueLinkBase" :root-path="rootPath" /> <icon v-if="issue.selected" :aria-label="'Issue #' + issue.id + ' selected'" diff --git a/app/assets/javascripts/boards/components/modal/lists_dropdown.vue b/app/assets/javascripts/boards/components/modal/lists_dropdown.vue index c502e32d169..820d0679df5 100644 --- a/app/assets/javascripts/boards/components/modal/lists_dropdown.vue +++ b/app/assets/javascripts/boards/components/modal/lists_dropdown.vue @@ -27,35 +27,20 @@ export default { </script> <template> <div class="dropdown inline"> - <button - class="dropdown-menu-toggle" - type="button" - data-toggle="dropdown" - aria-expanded="false"> - <span - :style="{ backgroundColor: selected.label.color }" - class="dropdown-label-box"> - </span> - {{ selected.title }} - <icon - name="chevron-down" - /> + <button class="dropdown-menu-toggle" type="button" data-toggle="dropdown" aria-expanded="false"> + <span :style="{ backgroundColor: selected.label.color }" class="dropdown-label-box"> </span> + {{ selected.title }} <icon name="chevron-down" /> </button> <div class="dropdown-menu dropdown-menu-selectable dropdown-menu-drop-up"> <ul> - <li - v-for="(list, i) in state.lists" - v-if="list.type == 'label'" - :key="i"> + <li v-for="(list, i) in state.lists" v-if="list.type == 'label'" :key="i"> <gl-link :class="{ 'is-active': list.id == selected.id }" href="#" role="button" - @click.prevent="modal.selectedList = list"> - <span - :style="{ backgroundColor: list.label.color }" - class="dropdown-label-box"> - </span> + @click.prevent="modal.selectedList = list;" + > + <span :style="{ backgroundColor: list.label.color }" class="dropdown-label-box"> </span> {{ list.title }} </gl-link> </li> diff --git a/app/assets/javascripts/boards/components/modal/tabs.vue b/app/assets/javascripts/boards/components/modal/tabs.vue index 5d661590e8e..7b800a6ab97 100644 --- a/app/assets/javascripts/boards/components/modal/tabs.vue +++ b/app/assets/javascripts/boards/components/modal/tabs.vue @@ -20,28 +20,14 @@ export default { <template> <div class="top-area prepend-top-10 append-bottom-10"> <ul class="nav-links issues-state-filters"> - <li :class="{ 'active': activeTab == 'all' }"> - <a - href="#" - role="button" - @click.prevent="changeTab('all')" - > - Open issues - <span class="badge badge-pill"> - {{ issuesCount }} - </span> + <li :class="{ active: activeTab == 'all' }"> + <a href="#" role="button" @click.prevent="changeTab('all');"> + Open issues <span class="badge badge-pill"> {{ issuesCount }} </span> </a> </li> - <li :class="{ 'active': activeTab == 'selected' }"> - <a - href="#" - role="button" - @click.prevent="changeTab('selected')" - > - Selected issues - <span class="badge badge-pill"> - {{ selectedCount }} - </span> + <li :class="{ active: activeTab == 'selected' }"> + <a href="#" role="button" @click.prevent="changeTab('selected');"> + Selected issues <span class="badge badge-pill"> {{ selectedCount }} </span> </a> </li> </ul> diff --git a/app/assets/javascripts/boards/components/project_select.vue b/app/assets/javascripts/boards/components/project_select.vue index 645eda4ae11..31651658fe6 100644 --- a/app/assets/javascripts/boards/components/project_select.vue +++ b/app/assets/javascripts/boards/components/project_select.vue @@ -81,23 +81,15 @@ export default { <template> <div> - <label class="label-bold prepend-top-10"> - Project - </label> - <div - ref="projectsDropdown" - class="dropdown" - > + <label class="label-bold prepend-top-10"> Project </label> + <div ref="projectsDropdown" class="dropdown"> <button class="dropdown-menu-toggle wide" type="button" data-toggle="dropdown" aria-expanded="false" > - {{ selectedProjectName }} - <icon - name="chevron-down" - /> + {{ selectedProjectName }} <icon name="chevron-down" /> </button> <div class="dropdown-menu dropdown-menu-selectable dropdown-menu-full-width"> <div class="dropdown-title"> @@ -115,21 +107,11 @@ export default { </button> </div> <div class="dropdown-input"> - <input - class="dropdown-input-field" - type="search" - placeholder="Search projects" - /> - <icon - name="search" - class="dropdown-input-search" - data-hidden="true" - /> + <input class="dropdown-input-field" type="search" placeholder="Search projects" /> + <icon name="search" class="dropdown-input-search" data-hidden="true" /> </div> <div class="dropdown-content"></div> - <div class="dropdown-loading"> - <gl-loading-icon /> - </div> + <div class="dropdown-loading"><gl-loading-icon /></div> </div> </div> </div> diff --git a/app/assets/javascripts/boards/components/sidebar/remove_issue.vue b/app/assets/javascripts/boards/components/sidebar/remove_issue.vue index d681e6a431c..a2b8a0af236 100644 --- a/app/assets/javascripts/boards/components/sidebar/remove_issue.vue +++ b/app/assets/javascripts/boards/components/sidebar/remove_issue.vue @@ -74,14 +74,8 @@ export default Vue.extend({ }); </script> <template> - <div - class="block list" - > - <button - class="btn btn-default btn-block" - type="button" - @click="removeIssue" - > + <div class="block list"> + <button class="btn btn-default btn-block" type="button" @click="removeIssue"> Remove from board </button> </div> diff --git a/app/assets/javascripts/clusters/components/application_row.vue b/app/assets/javascripts/clusters/components/application_row.vue index 236bb1394c8..d4354dcfebd 100644 --- a/app/assets/javascripts/clusters/components/application_row.vue +++ b/app/assets/javascripts/clusters/components/application_row.vue @@ -164,35 +164,21 @@ export default { :class="[ rowJsClass, isInstalled && 'cluster-application-installed', - disabled && 'cluster-application-disabled' + disabled && 'cluster-application-disabled', ]" class="cluster-application-row gl-responsive-table-row gl-responsive-table-row-col-span" > - <div - class="gl-responsive-table-row-layout" - role="row" - > - <div - class="table-section append-right-8 section-align-top" - role="gridcell" - > + <div class="gl-responsive-table-row-layout" role="row"> + <div class="table-section append-right-8 section-align-top" role="gridcell"> <img v-if="hasLogo" :src="logoUrl" :alt="`${title} logo`" class="cluster-application-logo avatar s40" /> - <identicon - v-else - :entity-id="identiconId" - :entity-name="title" - size-class="s40" - /> + <identicon v-else :entity-id="identiconId" :entity-name="title" size-class="s40" /> </div> - <div - class="table-section cluster-application-description section-wrap" - role="gridcell" - > + <div class="table-section cluster-application-description section-wrap" role="gridcell"> <strong> <a v-if="titleLink" @@ -203,12 +189,7 @@ export default { > {{ title }} </a> - <span - v-else - class="js-cluster-application-title" - > - {{ title }} - </span> + <span v-else class="js-cluster-application-title"> {{ title }} </span> </strong> <slot name="description"></slot> <div @@ -219,16 +200,10 @@ export default { {{ generalErrorDescription }} </p> <ul v-if="statusReason || requestReason"> - <li - v-if="statusReason" - class="js-cluster-application-status-error-message" - > + <li v-if="statusReason" class="js-cluster-application-status-error-message"> {{ statusReason }} </li> - <li - v-if="requestReason" - class="js-cluster-application-request-error-message" - > + <li v-if="requestReason" class="js-cluster-application-request-error-message"> {{ requestReason }} </li> </ul> @@ -239,15 +214,8 @@ export default { class="table-section table-button-footer section-align-top" role="gridcell" > - <div - v-if="showManageButton" - class="btn-group table-action-buttons" - > - <a - :href="manageLink" - :class="{ disabled: disabled }" - class="btn" - > + <div v-if="showManageButton" class="btn-group table-action-buttons"> + <a :href="manageLink" :class="{ disabled: disabled }" class="btn"> {{ manageButtonLabel }} </a> </div> diff --git a/app/assets/javascripts/clusters/components/applications.vue b/app/assets/javascripts/clusters/components/applications.vue index c1026d1273a..0d2e7c3e356 100644 --- a/app/assets/javascripts/clusters/components/applications.vue +++ b/app/assets/javascripts/clusters/components/applications.vue @@ -158,15 +158,13 @@ export default { <template> <section id="cluster-applications"> - <h4> - {{ s__('ClusterIntegration|Applications') }} - </h4> + <h4>{{ s__('ClusterIntegration|Applications') }}</h4> <p class="append-bottom-0"> - {{ s__(`ClusterIntegration|Choose which applications to install on your Kubernetes cluster. - Helm Tiller is required to install any of the following applications.`) }} - <a :href="helpPath"> - {{ __('More information') }} - </a> + {{ + s__(`ClusterIntegration|Choose which applications to install on your Kubernetes cluster. + Helm Tiller is required to install any of the following applications.`) + }} + <a :href="helpPath"> {{ __('More information') }} </a> </p> <div class="cluster-application-list prepend-top-10"> @@ -182,23 +180,20 @@ export default { title-link="https://docs.helm.sh/" > <div slot="description"> - {{ s__(`ClusterIntegration|Helm streamlines installing + {{ + s__(`ClusterIntegration|Helm streamlines installing and managing Kubernetes applications. Tiller runs inside of your Kubernetes Cluster, - and manages releases of your charts.`) }} + and manages releases of your charts.`) + }} </div> </application-row> - <div - v-show="!helmInstalled" - class="cluster-application-warning" - > - <div - class="svg-container" - v-html="helmInstallIllustration" - > - </div> - {{ s__(`ClusterIntegration|You must first install Helm Tiller before - installing the applications below`) }} + <div v-show="!helmInstalled" class="cluster-application-warning"> + <div class="svg-container" v-html="helmInstallIllustration"></div> + {{ + s__(`ClusterIntegration|You must first install Helm Tiller before + installing the applications below`) + }} </div> <application-row :id="ingressId" @@ -213,9 +208,11 @@ export default { > <div slot="description"> <p> - {{ s__(`ClusterIntegration|Ingress gives you a way to route + {{ + s__(`ClusterIntegration|Ingress gives you a way to route requests to services based on the request host or path, - centralizing a number of services into a single entrypoint.`) }} + centralizing a number of services into a single entrypoint.`) + }} </p> <template v-if="ingressInstalled"> @@ -223,10 +220,7 @@ export default { <label for="ingress-ip-address"> {{ s__('ClusterIntegration|Ingress IP Address') }} </label> - <div - v-if="ingressExternalIp" - class="input-group" - > + <div v-if="ingressExternalIp" class="input-group"> <input id="ingress-ip-address" :value="ingressExternalIp" @@ -242,50 +236,33 @@ export default { /> </span> </div> - <input - v-else - type="text" - class="form-control js-ip-address" - readonly - value="?" - /> + <input v-else type="text" class="form-control js-ip-address" readonly value="?" /> </div> - <p - v-if="!ingressExternalIp" - class="settings-message js-no-ip-message" - > - {{ s__(`ClusterIntegration|The IP address is in + <p v-if="!ingressExternalIp" class="settings-message js-no-ip-message"> + {{ + s__(`ClusterIntegration|The IP address is in the process of being assigned. Please check your Kubernetes - cluster or Quotas on Google Kubernetes Engine if it takes a long time.`) }} + cluster or Quotas on Google Kubernetes Engine if it takes a long time.`) + }} - <a - :href="ingressHelpPath" - target="_blank" - rel="noopener noreferrer" - > + <a :href="ingressHelpPath" target="_blank" rel="noopener noreferrer"> {{ __('More information') }} </a> </p> <p> - {{ s__(`ClusterIntegration|Point a wildcard DNS to this + {{ + s__(`ClusterIntegration|Point a wildcard DNS to this generated IP address in order to access - your application after it has been deployed.`) }} - <a - :href="ingressDnsHelpPath" - target="_blank" - rel="noopener noreferrer" - > + your application after it has been deployed.`) + }} + <a :href="ingressDnsHelpPath" target="_blank" rel="noopener noreferrer"> {{ __('More information') }} </a> </p> - </template> - <div - v-html="ingressDescription" - > - </div> + <div v-html="ingressDescription"></div> </div> </application-row> <application-row @@ -301,11 +278,7 @@ export default { :disabled="!helmInstalled" title-link="https://prometheus.io/docs/introduction/overview/" > - <div - slot="description" - v-html="prometheusDescription" - > - </div> + <div slot="description" v-html="prometheusDescription"></div> </application-row> <application-row v-if="isProjectCluster" @@ -320,10 +293,12 @@ export default { title-link="https://docs.gitlab.com/runner/" > <div slot="description"> - {{ s__(`ClusterIntegration|GitLab Runner connects to this + {{ + s__(`ClusterIntegration|GitLab Runner connects to this project's repository and executes CI/CD jobs, pushing results back and deploying, - applications to production.`) }} + applications to production.`) + }} </div> </application-row> <application-row @@ -341,11 +316,13 @@ export default { > <div slot="description"> <p> - {{ s__(`ClusterIntegration|JupyterHub, a multi-user Hub, spawns, + {{ + s__(`ClusterIntegration|JupyterHub, a multi-user Hub, spawns, manages, and proxies multiple instances of the single-user Jupyter notebook server. JupyterHub can be used to serve notebooks to a class of students, a corporate data science group, - or a scientific research group.`) }} + or a scientific research group.`) + }} </p> <template v-if="ingressExternalIp"> @@ -361,9 +338,7 @@ export default { type="text" class="form-control js-hostname" /> - <span - class="input-group-btn" - > + <span class="input-group-btn"> <clipboard-button :text="jupyterHostname" :title="s__('ClusterIntegration|Copy Jupyter Hostname to clipboard')" @@ -373,13 +348,11 @@ export default { </div> </div> <p v-if="ingressInstalled"> - {{ s__(`ClusterIntegration|Replace this with your own hostname if you want. - If you do so, point hostname to Ingress IP Address from above.`) }} - <a - :href="ingressDnsHelpPath" - target="_blank" - rel="noopener noreferrer" - > + {{ + s__(`ClusterIntegration|Replace this with your own hostname if you want. + If you do so, point hostname to Ingress IP Address from above.`) + }} + <a :href="ingressDnsHelpPath" target="_blank" rel="noopener noreferrer"> {{ __('More information') }} </a> </p> @@ -394,19 +367,21 @@ export default { :status-reason="applications.knative.statusReason" :request-status="applications.knative.requestStatus" :request-reason="applications.knative.requestReason" - :install-application-request-params="{ hostname: applications.knative.hostname}" + :install-application-request-params="{ hostname: applications.knative.hostname }" :disabled="!helmInstalled" class="hide-bottom-border rounded-bottom" title-link="https://github.com/knative/docs" > <div slot="description"> <p> - {{ s__(`ClusterIntegration|A Knative build extends Kubernetes + {{ + s__(`ClusterIntegration|A Knative build extends Kubernetes and utilizes existing Kubernetes primitives to provide you with the ability to run on-cluster container builds from source. For example, you can write a build that uses Kubernetes-native resources to obtain your source code from a repository, - build it into container a image, and then run that image.`) }} + build it into container a image, and then run that image.`) + }} </p> <template v-if="knativeInstalled"> diff --git a/app/assets/javascripts/commit/pipelines/pipelines_table.vue b/app/assets/javascripts/commit/pipelines/pipelines_table.vue index 82532539c9c..3e01841d563 100644 --- a/app/assets/javascripts/commit/pipelines/pipelines_table.vue +++ b/app/assets/javascripts/commit/pipelines/pipelines_table.vue @@ -82,7 +82,6 @@ export default { </script> <template> <div class="content-list pipelines"> - <gl-loading-icon v-if="isLoading" :label="s__('Pipelines|Loading Pipelines')" @@ -93,14 +92,13 @@ export default { <svg-blank-state v-else-if="shouldRenderErrorState" :svg-path="errorStateSvgPath" - :message="s__(`Pipelines|There was an error fetching the pipelines. - Try again in a few moments or contact your support team.`)" + :message=" + s__(`Pipelines|There was an error fetching the pipelines. + Try again in a few moments or contact your support team.`) + " /> - <div - v-else-if="shouldRenderTable" - class="table-holder" - > + <div v-else-if="shouldRenderTable" class="table-holder"> <pipelines-table-component :pipelines="state.pipelines" :update-graph-dropdown="updateGraphDropdown" diff --git a/app/assets/javascripts/cycle_analytics/components/banner.vue b/app/assets/javascripts/cycle_analytics/components/banner.vue index 82b0f523d2e..e44588efbfc 100644 --- a/app/assets/javascripts/cycle_analytics/components/banner.vue +++ b/app/assets/javascripts/cycle_analytics/components/banner.vue @@ -32,30 +32,19 @@ export default { type="button" @click="dismissOverviewDialog" > - <icon - name="close" - /> + <icon name="close" /> </button> - <div - class="svg-container" - v-html="iconCycleAnalyticsSplash" - > - </div> + <div class="svg-container" v-html="iconCycleAnalyticsSplash"></div> <div class="inner-content"> - <h4> - {{ __('Introducing Cycle Analytics') }} - </h4> + <h4>{{ __('Introducing Cycle Analytics') }}</h4> <p> - {{ __(`Cycle Analytics gives an overview -of how much time it takes to go from idea to production in your project.`) }} + {{ + __(`Cycle Analytics gives an overview +of how much time it takes to go from idea to production in your project.`) + }} </p> <p> - <a - :href="documentationLink" - target="_blank" - rel="nofollow" - class="btn" - > + <a :href="documentationLink" target="_blank" rel="nofollow" class="btn"> {{ __('Read more') }} </a> </p> diff --git a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue index f6a7d9962eb..16bc900867a 100644 --- a/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/limit_warning_component.vue @@ -14,17 +14,12 @@ export default { }; </script> <template> - <span - v-if="count === 50" - class="events-info float-right" - > + <span v-if="count === 50" class="events-info float-right"> <i v-tooltip - :title="n__( - 'Limited to showing %d event at most', - 'Limited to showing %d events at most', - 50 - )" + :title=" + n__('Limited to showing %d event at most', 'Limited to showing %d events at most', 50) + " class="fa fa-warning" aria-hidden="true" data-placement="top" diff --git a/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue index 429fef176c3..333ea111cd6 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/stage_code_component.vue @@ -28,45 +28,26 @@ export default { <limit-warning :count="items.length" /> </div> <ul class="stage-event-list"> - <li - v-for="(mergeRequest, i) in items" - :key="i" - class="stage-event-item" - > + <li v-for="(mergeRequest, i) in items" :key="i" class="stage-event-item"> <div class="item-details"> <!-- FIXME: Pass an alt attribute here for accessibility --> <user-avatar-image :img-src="mergeRequest.author.avatarUrl" /> <h5 class="item-title merge-merquest-title"> - <a :href="mergeRequest.url"> - {{ mergeRequest.title }} - </a> + <a :href="mergeRequest.url"> {{ mergeRequest.title }} </a> </h5> - <a - :href="mergeRequest.url" - class="issue-link"> - !{{ mergeRequest.iid }} - </a> - · + <a :href="mergeRequest.url" class="issue-link"> !{{ mergeRequest.iid }} </a> · <span> {{ s__('OpenedNDaysAgo|Opened') }} - <a - :href="mergeRequest.url" - class="issue-date"> - {{ mergeRequest.createdAt }} - </a> + <a :href="mergeRequest.url" class="issue-date"> {{ mergeRequest.createdAt }} </a> </span> <span> {{ s__('ByAuthor|by') }} - <a - :href="mergeRequest.author.webUrl" - class="issue-author-link"> + <a :href="mergeRequest.author.webUrl" class="issue-author-link"> {{ mergeRequest.author.name }} </a> </span> </div> - <div class="item-time"> - <total-time :time="mergeRequest.totalTime" /> - </div> + <div class="item-time"><total-time :time="mergeRequest.totalTime" /></div> </li> </ul> </div> diff --git a/app/assets/javascripts/cycle_analytics/components/stage_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_component.vue index 56e851fa528..c4f5172df3b 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/stage_component.vue @@ -28,47 +28,24 @@ export default { <limit-warning :count="items.length" /> </div> <ul class="stage-event-list"> - <li - v-for="(issue, i) in items" - :key="i" - class="stage-event-item" - > + <li v-for="(issue, i) in items" :key="i" class="stage-event-item"> <div class="item-details"> <!-- FIXME: Pass an alt attribute here for accessibility --> - <user-avatar-image :img-src="issue.author.avatarUrl"/> + <user-avatar-image :img-src="issue.author.avatarUrl" /> <h5 class="item-title issue-title"> - <a - :href="issue.url" - class="issue-title" - > - {{ issue.title }} - </a> + <a :href="issue.url" class="issue-title"> {{ issue.title }} </a> </h5> - <a - :href="issue.url" - class="issue-link" - >#{{ issue.iid }}</a> - · + <a :href="issue.url" class="issue-link">#{{ issue.iid }}</a> · <span> {{ s__('OpenedNDaysAgo|Opened') }} - <a - :href="issue.url" - class="issue-date" - >{{ issue.createdAt }}</a> + <a :href="issue.url" class="issue-date">{{ issue.createdAt }}</a> </span> <span> {{ s__('ByAuthor|by') }} - <a - :href="issue.author.webUrl" - class="issue-author-link" - > - {{ issue.author.name }} - </a> + <a :href="issue.author.webUrl" class="issue-author-link"> {{ issue.author.name }} </a> </span> </div> - <div class="item-time"> - <total-time :time="issue.totalTime" /> - </div> + <div class="item-time"><total-time :time="issue.totalTime" /></div> </li> </ul> </div> diff --git a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue index 54b9da4983a..6c256fa6736 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/stage_plan_component.vue @@ -34,42 +34,25 @@ export default { <limit-warning :count="items.length" /> </div> <ul class="stage-event-list"> - <li - v-for="(commit, i) in items" - :key="i" - class="stage-event-item" - > + <li v-for="(commit, i) in items" :key="i" class="stage-event-item"> <div class="item-details item-conmmit-component"> <!-- FIXME: Pass an alt attribute here for accessibility --> <user-avatar-image :img-src="commit.author.avatarUrl" /> <h5 class="item-title commit-title"> - <a :href="commit.commitUrl"> - {{ commit.title }} - </a> + <a :href="commit.commitUrl"> {{ commit.title }} </a> </h5> <span> - {{ s__('FirstPushedBy|First') }} - <span - class="commit-icon" - v-html="iconCommit" - > - </span> - <a - :href="commit.commitUrl" - class="commit-hash-link commit-sha" - >{{ commit.shortSha }}</a> + {{ s__('FirstPushedBy|First') }} <span class="commit-icon" v-html="iconCommit"> </span> + <a :href="commit.commitUrl" class="commit-hash-link commit-sha">{{ + commit.shortSha + }}</a> {{ s__('FirstPushedBy|pushed by') }} - <a - :href="commit.author.webUrl" - class="commit-author-link" - > + <a :href="commit.author.webUrl" class="commit-author-link"> {{ commit.author.name }} </a> </span> </div> - <div class="item-time"> - <total-time :time="commit.totalTime" /> - </div> + <div class="item-time"><total-time :time="commit.totalTime" /></div> </li> </ul> </div> diff --git a/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue index f9c80d237d7..f874f11aff0 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/stage_review_component.vue @@ -30,66 +30,37 @@ export default { <limit-warning :count="items.length" /> </div> <ul class="stage-event-list"> - <li - v-for="(mergeRequest, i) in items" - :key="i" - class="stage-event-item" - > + <li v-for="(mergeRequest, i) in items" :key="i" class="stage-event-item"> <div class="item-details"> <!-- FIXME: Pass an alt attribute here for accessibility --> <user-avatar-image :img-src="mergeRequest.author.avatarUrl" /> <h5 class="item-title merge-merquest-title"> - <a :href="mergeRequest.url"> - {{ mergeRequest.title }} - </a> + <a :href="mergeRequest.url"> {{ mergeRequest.title }} </a> </h5> - <a - :href="mergeRequest.url" - class="issue-link" - >!{{ mergeRequest.iid }}</a> - · + <a :href="mergeRequest.url" class="issue-link">!{{ mergeRequest.iid }}</a> · <span> {{ s__('OpenedNDaysAgo|Opened') }} - <a - :href="mergeRequest.url" - class="issue-date" - >{{ mergeRequest.createdAt }}</a> + <a :href="mergeRequest.url" class="issue-date">{{ mergeRequest.createdAt }}</a> </span> <span> {{ s__('ByAuthor|by') }} - <a - :href="mergeRequest.author.webUrl" - class="issue-author-link" - >{{ mergeRequest.author.name }}</a> + <a :href="mergeRequest.author.webUrl" class="issue-author-link">{{ + mergeRequest.author.name + }}</a> </span> <template v-if="mergeRequest.state === 'closed'"> <span class="merge-request-state"> - <i - class="fa fa-ban" - aria-hidden="true" - > - </i> - {{ mergeRequest.state.toUpperCase() }} + <i class="fa fa-ban" aria-hidden="true"> </i> {{ mergeRequest.state.toUpperCase() }} </span> </template> <template v-else> - <span - v-if="mergeRequest.branch" - class="merge-request-branch" - > - <icon - :size="16" - name="fork" - /> - <a :href="mergeRequest.branch.url"> - {{ mergeRequest.branch.name }} - </a> + <span v-if="mergeRequest.branch" class="merge-request-branch"> + <icon :size="16" name="fork" /> + <a :href="mergeRequest.branch.url"> {{ mergeRequest.branch.name }} </a> </span> </template> </div> - <div class="item-time"> - <total-time :time="mergeRequest.totalTime" /> - </div> + <div class="item-time"><total-time :time="mergeRequest.totalTime" /></div> </li> </ul> </div> diff --git a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue index e83b66eef86..c5146c3bf88 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/stage_staging_component.vue @@ -36,62 +36,23 @@ export default { <limit-warning :count="items.length" /> </div> <ul class="stage-event-list"> - <li - v-for="(build, i) in items" - :key="i" - class="stage-event-item item-build-component" - > + <li v-for="(build, i) in items" :key="i" class="stage-event-item item-build-component"> <div class="item-details"> <!-- FIXME: Pass an alt attribute here for accessibility --> - <user-avatar-image :img-src="build.author.avatarUrl"/> + <user-avatar-image :img-src="build.author.avatarUrl" /> <h5 class="item-title"> - <a - :href="build.url" - class="pipeline-id" - > - #{{ build.id }} - </a> - <icon - :size="16" - name="fork" - /> - <a - :href="build.branch.url" - class="ref-name" - > - {{ build.branch.name }} - </a> - <span - class="icon-branch" - v-html="iconBranch" - > - </span> - <a - :href="build.commitUrl" - class="commit-sha" - > - {{ build.shortSha }} - </a> + <a :href="build.url" class="pipeline-id"> #{{ build.id }} </a> + <icon :size="16" name="fork" /> + <a :href="build.branch.url" class="ref-name"> {{ build.branch.name }} </a> + <span class="icon-branch" v-html="iconBranch"> </span> + <a :href="build.commitUrl" class="commit-sha"> {{ build.shortSha }} </a> </h5> <span> - <a - :href="build.url" - class="build-date" - > - {{ build.date }} - </a> - {{ s__('ByAuthor|by') }} - <a - :href="build.author.webUrl" - class="issue-author-link" - > - {{ build.author.name }} - </a> + <a :href="build.url" class="build-date"> {{ build.date }} </a> {{ s__('ByAuthor|by') }} + <a :href="build.author.webUrl" class="issue-author-link"> {{ build.author.name }} </a> </span> </div> - <div class="item-time"> - <total-time :time="build.totalTime" /> - </div> + <div class="item-time"><total-time :time="build.totalTime" /></div> </li> </ul> </div> diff --git a/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue b/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue index a8196dc879a..35721384210 100644 --- a/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/stage_test_component.vue @@ -38,63 +38,22 @@ export default { <limit-warning :count="items.length" /> </div> <ul class="stage-event-list"> - <li - v-for="(build, i) in items" - :key="i" - class="stage-event-item item-build-component" - > + <li v-for="(build, i) in items" :key="i" class="stage-event-item item-build-component"> <div class="item-details"> <h5 class="item-title"> - <span - class="icon-build-status" - v-html="iconBuildStatus" - > - </span> - <a - :href="build.url" - class="item-build-name" - > - {{ build.name }} - </a> - · - <a - :href="build.url" - class="pipeline-id" - > - #{{ build.id }} - </a> - <icon - :size="16" - name="fork" - /> - <a - :href="build.branch.url" - class="ref-name" - > - {{ build.branch.name }} - </a> - <span - class="icon-branch" - v-html="iconBranch" - > - </span> - <a - :href="build.commitUrl" - class="commit-sha"> - {{ build.shortSha }} - </a> + <span class="icon-build-status" v-html="iconBuildStatus"> </span> + <a :href="build.url" class="item-build-name"> {{ build.name }} </a> · + <a :href="build.url" class="pipeline-id"> #{{ build.id }} </a> + <icon :size="16" name="fork" /> + <a :href="build.branch.url" class="ref-name"> {{ build.branch.name }} </a> + <span class="icon-branch" v-html="iconBranch"> </span> + <a :href="build.commitUrl" class="commit-sha"> {{ build.shortSha }} </a> </h5> <span> - <a - :href="build.url" - class="issue-date"> - {{ build.date }} - </a> + <a :href="build.url" class="issue-date"> {{ build.date }} </a> </span> </div> - <div class="item-time"> - <total-time :time="build.totalTime" /> - </div> + <div class="item-time"><total-time :time="build.totalTime" /></div> </li> </ul> </div> diff --git a/app/assets/javascripts/cycle_analytics/components/total_time_component.vue b/app/assets/javascripts/cycle_analytics/components/total_time_component.vue index 4db50134208..b93a7d3c4f9 100644 --- a/app/assets/javascripts/cycle_analytics/components/total_time_component.vue +++ b/app/assets/javascripts/cycle_analytics/components/total_time_component.vue @@ -18,28 +18,16 @@ export default { <span class="total-time"> <template v-if="hasData"> <template v-if="time.days"> - {{ time.days }} - <span> - {{ n__('day', 'days', time.days) }} - </span> + {{ time.days }} <span> {{ n__('day', 'days', time.days) }} </span> </template> <template v-if="time.hours"> - {{ time.hours }} - <span> - {{ n__('Time|hr', 'Time|hrs', time.hours) }} - </span> + {{ time.hours }} <span> {{ n__('Time|hr', 'Time|hrs', time.hours) }} </span> </template> <template v-if="time.mins && !time.days"> - {{ time.mins }} - <span> - {{ n__('Time|min', 'Time|mins', time.mins) }} - </span> + {{ time.mins }} <span> {{ n__('Time|min', 'Time|mins', time.mins) }} </span> </template> - <template v-if="time.seconds && hasData === 1 || time.seconds === 0"> - {{ time.seconds }} - <span> - {{ s__('Time|s') }} - </span> + <template v-if="(time.seconds && hasData === 1) || time.seconds === 0"> + {{ time.seconds }} <span> {{ s__('Time|s') }} </span> </template> </template> <template v-else> diff --git a/app/assets/javascripts/deploy_keys/components/action_btn.vue b/app/assets/javascripts/deploy_keys/components/action_btn.vue index 4acd21376bf..af7c391ab70 100644 --- a/app/assets/javascripts/deploy_keys/components/action_btn.vue +++ b/app/assets/javascripts/deploy_keys/components/action_btn.vue @@ -43,11 +43,9 @@ export default { :class="[{ disabled: isLoading }, btnCssClass]" :disabled="isLoading" class="btn" - @click="doAction"> + @click="doAction" + > <slot></slot> - <gl-loading-icon - v-if="isLoading" - :inline="true" - /> + <gl-loading-icon v-if="isLoading" :inline="true" /> </button> </template> diff --git a/app/assets/javascripts/deploy_keys/components/app.vue b/app/assets/javascripts/deploy_keys/components/app.vue index 1d2ac59e20a..922c907bb36 100644 --- a/app/assets/javascripts/deploy_keys/components/app.vue +++ b/app/assets/javascripts/deploy_keys/components/app.vue @@ -123,26 +123,10 @@ export default { /> <template v-else-if="hasKeys"> <div class="top-area scrolling-tabs-container inner-page-scroll-tabs"> - <div class="fade-left"> - <i - class="fa fa-angle-left" - aria-hidden="true" - > - </i> - </div> - <div class="fade-right"> - <i - class="fa fa-angle-right" - aria-hidden="true" - > - </i> - </div> + <div class="fade-left"><i class="fa fa-angle-left" aria-hidden="true"> </i></div> + <div class="fade-right"><i class="fa fa-angle-right" aria-hidden="true"> </i></div> - <navigation-tabs - :tabs="tabs" - scope="deployKeys" - @onChangeTab="onChangeTab" - /> + <navigation-tabs :tabs="tabs" scope="deployKeys" @onChangeTab="onChangeTab" /> </div> <keys-panel :project-id="projectId" diff --git a/app/assets/javascripts/deploy_keys/components/key.vue b/app/assets/javascripts/deploy_keys/components/key.vue index c05b9b1de79..f01e6f2a639 100644 --- a/app/assets/javascripts/deploy_keys/components/key.vue +++ b/app/assets/javascripts/deploy_keys/components/key.vue @@ -112,26 +112,14 @@ export default { <template> <div class="gl-responsive-table-row deploy-key"> <div class="table-section section-40"> - <div - role="rowheader" - class="table-mobile-header"> - {{ s__('DeployKeys|Deploy key') }} - </div> + <div role="rowheader" class="table-mobile-header">{{ s__('DeployKeys|Deploy key') }}</div> <div class="table-mobile-content"> - <strong class="title qa-key-title"> - {{ deployKey.title }} - </strong> - <div class="fingerprint qa-key-fingerprint"> - {{ deployKey.fingerprint }} - </div> + <strong class="title qa-key-title"> {{ deployKey.title }} </strong> + <div class="fingerprint qa-key-fingerprint">{{ deployKey.fingerprint }}</div> </div> </div> <div class="table-section section-30 section-wrap"> - <div - role="rowheader" - class="table-mobile-header"> - {{ s__('DeployKeys|Project usage') }} - </div> + <div role="rowheader" class="table-mobile-header">{{ s__('DeployKeys|Project usage') }}</div> <div class="table-mobile-content deploy-project-list"> <template v-if="projects.length > 0"> <a @@ -139,10 +127,8 @@ export default { :title="projectTooltipTitle(firstProject)" class="label deploy-project-label" > - <span> - {{ firstProject.project.full_name }} - </span> - <icon :name="firstProject.can_push ? 'lock-open' : 'lock'"/> + <span> {{ firstProject.project.full_name }} </span> + <icon :name="firstProject.can_push ? 'lock-open' : 'lock'" /> </a> <a v-if="isExpandable" @@ -162,39 +148,24 @@ export default { :title="projectTooltipTitle(deployKeysProject)" class="label deploy-project-label" > - <span> - {{ deployKeysProject.project.full_name }} - </span> - <icon :name="deployKeysProject.can_push ? 'lock-open' : 'lock'"/> + <span> {{ deployKeysProject.project.full_name }} </span> + <icon :name="deployKeysProject.can_push ? 'lock-open' : 'lock'" /> </a> </template> - <span - v-else - class="text-secondary">{{ __('None') }}</span> + <span v-else class="text-secondary">{{ __('None') }}</span> </div> </div> <div class="table-section section-15 text-right"> - <div - role="rowheader" - class="table-mobile-header"> - {{ __('Created') }} - </div> + <div role="rowheader" class="table-mobile-header">{{ __('Created') }}</div> <div class="table-mobile-content text-secondary key-created-at"> - <span - v-tooltip - :title="tooltipTitle(deployKey.created_at)"> - <icon name="calendar"/> - <span>{{ timeFormated(deployKey.created_at) }}</span> + <span v-tooltip :title="tooltipTitle(deployKey.created_at)"> + <icon name="calendar" /> <span>{{ timeFormated(deployKey.created_at) }}</span> </span> </div> </div> <div class="table-section section-15 table-button-footer deploy-key-actions"> <div class="btn-group table-action-buttons"> - <action-btn - v-if="!isEnabled" - :deploy-key="deployKey" - type="enable" - > + <action-btn v-if="!isEnabled" :deploy-key="deployKey" type="enable"> {{ __('Enable') }} </action-btn> <a @@ -205,7 +176,7 @@ export default { class="btn btn-default text-secondary" data-container="body" > - <icon name="pencil"/> + <icon name="pencil" /> </a> <action-btn v-if="isRemovable" @@ -216,7 +187,7 @@ export default { type="remove" data-container="body" > - <icon name="remove"/> + <icon name="remove" /> </action-btn> <action-btn v-else-if="isEnabled" @@ -227,7 +198,7 @@ export default { type="disable" data-container="body" > - <icon name="cancel"/> + <icon name="cancel" /> </action-btn> </div> </div> diff --git a/app/assets/javascripts/deploy_keys/components/keys_panel.vue b/app/assets/javascripts/deploy_keys/components/keys_panel.vue index 2f057ca29f6..2693cd08cc3 100644 --- a/app/assets/javascripts/deploy_keys/components/keys_panel.vue +++ b/app/assets/javascripts/deploy_keys/components/keys_panel.vue @@ -30,24 +30,14 @@ export default { <template> <div class="deploy-keys-panel table-holder"> <template v-if="keys.length > 0"> - <div - role="row" - class="gl-responsive-table-row table-row-header"> - <div - role="rowheader" - class="table-section section-40"> + <div role="row" class="gl-responsive-table-row table-row-header"> + <div role="rowheader" class="table-section section-40"> {{ s__('DeployKeys|Deploy key') }} </div> - <div - role="rowheader" - class="table-section section-30"> + <div role="rowheader" class="table-section section-30"> {{ s__('DeployKeys|Project usage') }} </div> - <div - role="rowheader" - class="table-section section-15 text-right"> - {{ __('Created') }} - </div> + <div role="rowheader" class="table-section section-15 text-right">{{ __('Created') }}</div> </div> <deploy-key v-for="deployKey in keys" @@ -58,10 +48,7 @@ export default { :project-id="projectId" /> </template> - <div - v-else - class="settings-message text-center" - > + <div v-else class="settings-message text-center"> {{ s__('DeployKeys|No deploy keys found. Create one with the form above.') }} </div> </div> diff --git a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js index c0c21416275..8542a6e718a 100644 --- a/app/assets/javascripts/diff_notes/components/jump_to_discussion.js +++ b/app/assets/javascripts/diff_notes/components/jump_to_discussion.js @@ -112,7 +112,7 @@ const JumpToDiscussion = Vue.extend({ if (!hasDiscussionsToJumpTo) { // If there are no discussions to jump to on the current page, - // switch to the notes tab and jump to the first disucssion there. + // switch to the notes tab and jump to the first discussion there. window.mrTabs.activateTab('show'); activeTab = 'show'; jumpToFirstDiscussion = true; diff --git a/app/assets/javascripts/diffs/components/app.vue b/app/assets/javascripts/diffs/components/app.vue index 881febedb7c..0b7838292b2 100644 --- a/app/assets/javascripts/diffs/components/app.vue +++ b/app/assets/javascripts/diffs/components/app.vue @@ -181,18 +181,8 @@ export default { <template> <div v-show="shouldShow"> - <div - v-if="isLoading" - class="loading" - > - <gl-loading-icon /> - </div> - <div - v-else - id="diffs" - :class="{ active: shouldShow }" - class="diffs tab-pane" - > + <div v-if="isLoading" class="loading"><gl-loading-icon /></div> + <div v-else id="diffs" :class="{ active: shouldShow }" class="diffs tab-pane"> <compare-versions v-if="showCompareVersions" :merge-request-diffs="mergeRequestDiffs" @@ -214,38 +204,21 @@ export default { class="mr-version-controls" > <div class="content-block comments-disabled-notif clearfix"> - <i class="fa fa-info-circle"></i> - {{ notAllCommentsDisplayed }} + <i class="fa fa-info-circle"></i> {{ notAllCommentsDisplayed }} <div class="pull-right"> - <a - :href="latestVersionPath" - class="btn btn-sm" - > - {{ showLatestVersion }} - </a> + <a :href="latestVersionPath" class="btn btn-sm"> {{ showLatestVersion }} </a> </div> </div> </div> - <commit-widget - v-if="commit" - :commit="commit" - /> + <commit-widget v-if="commit" :commit="commit" /> <div :data-can-create-note="getNoteableData.current_user.can_create_note" class="files d-flex prepend-top-default" > - <div - v-show="showTreeList" - class="diff-tree-list" - > - <tree-list /> - </div> - <div - v-if="diffFiles.length > 0" - class="diff-files-holder" - > + <div v-show="showTreeList" class="diff-tree-list"><tree-list /></div> + <div v-if="diffFiles.length > 0" class="diff-files-holder"> <diff-file v-for="file in diffFiles" :key="file.newPath" diff --git a/app/assets/javascripts/diffs/components/commit_item.vue b/app/assets/javascripts/diffs/components/commit_item.vue index aa72aca1478..560b8695144 100644 --- a/app/assets/javascripts/diffs/components/commit_item.vue +++ b/app/assets/javascripts/diffs/components/commit_item.vue @@ -73,10 +73,7 @@ export default { v-html="commit.title_html" ></a> - <span class="commit-row-message d-block d-sm-none"> - · - {{ commit.short_id }} - </span> + <span class="commit-row-message d-block d-sm-none"> · {{ commit.short_id }} </span> <button v-if="commit.description_html" @@ -84,21 +81,12 @@ export default { type="button" :aria-label="__('Toggle commit description')" > - <icon - :size="12" - name="ellipsis_h" - /> + <icon :size="12" name="ellipsis_h" /> </button> <div class="commiter"> - <a - :href="authorUrl" - v-text="authorName" - ></a> - {{ s__('CommitWidget|authored') }} - <time-ago-tooltip - :time="commit.authored_date" - /> + <a :href="authorUrl" v-text="authorName"></a> {{ s__('CommitWidget|authored') }} + <time-ago-tooltip :time="commit.authored_date" /> </div> <pre @@ -108,19 +96,13 @@ export default { ></pre> </div> <div class="commit-actions flex-row d-none d-sm-flex"> - <div - v-if="commit.signature_html" - v-html="commit.signature_html" - ></div> + <div v-if="commit.signature_html" v-html="commit.signature_html"></div> <commit-pipeline-status v-if="commit.pipeline_status_path" :endpoint="commit.pipeline_status_path" /> <div class="commit-sha-group"> - <div - class="label label-monospace" - v-text="commit.short_id" - ></div> + <div class="label label-monospace" v-text="commit.short_id"></div> <clipboard-button :text="commit.id" :title="__('Copy commit SHA to clipboard')" diff --git a/app/assets/javascripts/diffs/components/commit_widget.vue b/app/assets/javascripts/diffs/components/commit_widget.vue index cc8e72eb1c8..3fb11813d68 100644 --- a/app/assets/javascripts/diffs/components/commit_widget.vue +++ b/app/assets/javascripts/diffs/components/commit_widget.vue @@ -31,9 +31,7 @@ export default { <div class="info-well prepend-top-default"> <div class="well-segment"> <ul class="blob-commit-info"> - <commit-item - :commit="commit" - /> + <commit-item :commit="commit" /> </ul> </div> </div> diff --git a/app/assets/javascripts/diffs/components/compare_versions.vue b/app/assets/javascripts/diffs/components/compare_versions.vue index f50cb94a18f..99061c3bc92 100644 --- a/app/assets/javascripts/diffs/components/compare_versions.vue +++ b/app/assets/javascripts/diffs/components/compare_versions.vue @@ -73,27 +73,20 @@ export default { <template> <div class="mr-version-controls"> - <div - class="mr-version-menus-container content-block" - > + <div class="mr-version-menus-container content-block"> <button v-tooltip.hover type="button" class="btn btn-default append-right-8 js-toggle-tree-list" :class="{ - active: showTreeList + active: showTreeList, }" :title="__('Toggle file browser')" @click="toggleShowTreeList" > - <icon - name="hamburger" - /> + <icon name="hamburger" /> </button> - <div - v-if="showDropdowns" - class="d-flex align-items-center compare-versions-container" - > + <div v-if="showDropdowns" class="d-flex align-items-center compare-versions-container"> Changes between <compare-versions-dropdown :other-versions="mergeRequestDiffs" @@ -109,20 +102,11 @@ export default { class="mr-version-compare-dropdown" /> </div> - <div - class="inline-parallel-buttons d-none d-md-flex ml-auto" - > - <a - v-show="hasCollapsedFile" - class="btn btn-default append-right-8" - @click="expandAllFiles" - > + <div class="inline-parallel-buttons d-none d-md-flex ml-auto"> + <a v-show="hasCollapsedFile" class="btn btn-default append-right-8" @click="expandAllFiles"> {{ __('Expand all') }} </a> - <a - :href="toggleWhitespacePath" - class="btn btn-default qa-toggle-whitespace" - > + <a :href="toggleWhitespacePath" class="btn btn-default qa-toggle-whitespace"> {{ toggleWhitespaceText }} </a> <div class="btn-group prepend-left-8"> diff --git a/app/assets/javascripts/diffs/components/compare_versions_dropdown.vue b/app/assets/javascripts/diffs/components/compare_versions_dropdown.vue index 112206e4ad6..8da02ed0b7c 100644 --- a/app/assets/javascripts/diffs/components/compare_versions_dropdown.vue +++ b/app/assets/javascripts/diffs/components/compare_versions_dropdown.vue @@ -112,26 +112,14 @@ export default { data-toggle="dropdown" aria-expanded="false" > - <span> - {{ selectedVersionName }} - </span> - <icon - :size="12" - name="angle-down" - class="position-absolute" - /> + <span> {{ selectedVersionName }} </span> + <icon :size="12" name="angle-down" class="position-absolute" /> </a> <div class="dropdown-menu dropdown-select dropdown-menu-selectable"> <div class="dropdown-content"> <ul> - <li - v-for="version in targetVersions" - :key="version.id" - > - <a - :class="{ 'is-active': isActive(version) }" - :href="href(version)" - > + <li v-for="version in targetVersions" :key="version.id"> + <a :class="{ 'is-active': isActive(version) }" :href="href(version)"> <div> <strong> {{ versionName(version) }} @@ -141,9 +129,7 @@ export default { </strong> </div> <div> - <small class="commit-sha"> - {{ version.truncated_commit_sha }} - </small> + <small class="commit-sha"> {{ version.truncated_commit_sha }} </small> </div> <div> <small> diff --git a/app/assets/javascripts/diffs/components/diff_content.vue b/app/assets/javascripts/diffs/components/diff_content.vue index 5e5fda5fba6..e405d8b20ae 100644 --- a/app/assets/javascripts/diffs/components/diff_content.vue +++ b/app/assets/javascripts/diffs/components/diff_content.vue @@ -97,10 +97,7 @@ export default { :file-hash="diffFile.file_hash" :can-comment="getNoteableData.current_user.can_create_note" /> - <div - v-if="showNotesContainer" - class="note-container" - > + <div v-if="showNotesContainer" class="note-container"> <diff-discussions v-if="diffFile.discussions.length" class="diff-file-discussions" @@ -115,8 +112,8 @@ export default { :save-button-title="__('Comment')" class="diff-comment-form new-note discussion-form discussion-form-container" @handleFormUpdate="handleSaveNote" - @cancelForm="closeDiffFileCommentForm(diffFile.file_hash)" - /> + @cancelForm="closeDiffFileCommentForm(diffFile.file_hash);" + /> </div> </diff-viewer> </div> diff --git a/app/assets/javascripts/diffs/components/diff_discussions.vue b/app/assets/javascripts/diffs/components/diff_discussions.vue index b9de487a737..bee29b04e92 100644 --- a/app/assets/javascripts/diffs/components/diff_discussions.vue +++ b/app/assets/javascripts/diffs/components/diff_discussions.vue @@ -45,29 +45,22 @@ export default { v-for="(discussion, index) in discussions" :key="discussion.id" :class="{ - collapsed: !isExpanded(discussion) + collapsed: !isExpanded(discussion), }" class="discussion-notes diff-discussions position-relative" > - <ul - :data-discussion-id="discussion.id" - class="notes" - > + <ul :data-discussion-id="discussion.id" class="notes"> <template v-if="shouldCollapseDiscussions"> <button :class="{ 'diff-notes-collapse': discussion.expanded, - 'btn-transparent badge badge-pill': !discussion.expanded + 'btn-transparent badge badge-pill': !discussion.expanded, }" type="button" class="js-diff-notes-toggle" - @click="toggleDiscussion({ discussionId: discussion.id })" + @click="toggleDiscussion({ discussionId: discussion.id });" > - <icon - v-if="discussion.expanded" - name="collapse" - class="collapse-icon" - /> + <icon v-if="discussion.expanded" name="collapse" class="collapse-icon" /> <template v-else> {{ index + 1 }} </template> @@ -81,11 +74,7 @@ export default { :discussions-by-diff-order="true" @noteDeleted="deleteNoteHandler" > - <span - v-if="renderAvatarBadge" - slot="avatar-badge" - class="badge badge-pill" - > + <span v-if="renderAvatarBadge" slot="avatar-badge" class="badge badge-pill"> {{ index + 1 }} </span> </noteable-discussion> diff --git a/app/assets/javascripts/diffs/components/diff_file.vue b/app/assets/javascripts/diffs/components/diff_file.vue index 5da0bfb5bfe..f7e3655ea40 100644 --- a/app/assets/javascripts/diffs/components/diff_file.vue +++ b/app/assets/javascripts/diffs/components/diff_file.vue @@ -119,7 +119,7 @@ export default { <div :id="file.file_hash" :class="{ - 'is-active': currentDiffFileId === file.file_hash + 'is-active': currentDiffFileId === file.file_hash, }" class="diff-file file-holder" > @@ -134,13 +134,11 @@ export default { @showForkMessage="showForkMessage" /> - <div - v-if="forkMessageVisible" - class="js-file-fork-suggestion-section file-fork-suggestion"> + <div v-if="forkMessageVisible" class="js-file-fork-suggestion-section file-fork-suggestion"> <span class="file-fork-suggestion-note"> - You're not allowed to <span class="js-file-fork-suggestion-section-action">edit</span> - files in this project directly. Please fork this project, - make your changes there, and submit a merge request. + You're not allowed to <span class="js-file-fork-suggestion-section-action">edit</span> files + in this project directly. Please fork this project, make your changes there, and submit a + merge request. </span> <a :href="file.fork_path" @@ -162,27 +160,14 @@ export default { :class="{ hidden: isCollapsed || file.too_large }" :diff-file="file" /> - <gl-loading-icon - v-if="showLoadingIcon" - class="diff-content loading" - /> - <div - v-else-if="showExpandMessage" - class="nothing-here-block diff-collapsed" - > + <gl-loading-icon v-if="showLoadingIcon" class="diff-content loading" /> + <div v-else-if="showExpandMessage" class="nothing-here-block diff-collapsed"> {{ __('This diff is collapsed.') }} - <a - class="click-to-expand js-click-to-expand" - href="#" - @click.prevent="handleToggle" - > + <a class="click-to-expand js-click-to-expand" href="#" @click.prevent="handleToggle"> {{ __('Click to expand it.') }} </a> </div> - <div - v-if="file.too_large" - class="nothing-here-block diff-collapsed js-too-large-diff" - > + <div v-if="file.too_large" class="nothing-here-block diff-collapsed js-too-large-diff"> {{ __('This source diff could not be displayed because it is too large.') }} <span v-html="viewBlobLink"></span> </div> diff --git a/app/assets/javascripts/diffs/components/diff_file_header.vue b/app/assets/javascripts/diffs/components/diff_file_header.vue index af03cec6582..07e37582963 100644 --- a/app/assets/javascripts/diffs/components/diff_file_header.vue +++ b/app/assets/javascripts/diffs/components/diff_file_header.vue @@ -141,7 +141,7 @@ export default { <div ref="header" class="js-file-title file-title file-title-flex-parent" - @click="handleToggleFile($event, true)" + @click="handleToggleFile($event, true);" > <div class="file-header-content"> <icon @@ -152,12 +152,7 @@ export default { class="diff-toggle-caret append-right-5" @click.stop="handleToggle" /> - <a - v-once - ref="titleWrapper" - :href="titleLink" - class="append-right-4 js-title-wrapper" - > + <a v-once ref="titleWrapper" :href="titleLink" class="append-right-4 js-title-wrapper"> <file-icon :file-name="filePath" :size="18" @@ -182,13 +177,7 @@ export default { ></strong> </span> - <strong - v-else - v-tooltip - :title="filePath" - class="file-title-name" - data-container="body" - > + <strong v-else v-tooltip :title="filePath" class="file-title-name" data-container="body"> {{ filePath }} </strong> </a> @@ -200,28 +189,18 @@ export default { css-class="btn-default btn-transparent btn-clipboard" /> - <small - v-if="diffFile.mode_changed" - ref="fileMode" - > + <small v-if="diffFile.mode_changed" ref="fileMode"> {{ diffFile.a_mode }} → {{ diffFile.b_mode }} </small> - <span - v-if="isUsingLfs" - class="label label-lfs append-right-5" - > - {{ __('LFS') }} - </span> + <span v-if="isUsingLfs" class="label label-lfs append-right-5"> {{ __('LFS') }} </span> </div> <div v-if="!diffFile.submodule && addMergeRequestButtons" class="file-actions d-none d-sm-block" > - <template - v-if="diffFile.blob && diffFile.blob.readable_text" - > + <template v-if="diffFile.blob && diffFile.blob.readable_text"> <button :disabled="!diffHasDiscussions(diffFile)" :class="{ active: hasExpandedDiscussions }" @@ -249,11 +228,7 @@ export default { v-html="viewReplacedFileButtonText" > </a> - <a - :href="diffFile.view_path" - class="btn view-file js-view-file" - v-html="viewFileButtonText" - > + <a :href="diffFile.view_path" class="btn view-file js-view-file" v-html="viewFileButtonText"> </a> <a diff --git a/app/assets/javascripts/diffs/components/diff_gutter_avatars.vue b/app/assets/javascripts/diffs/components/diff_gutter_avatars.vue index 8f8c2a31c71..b969017a2bb 100644 --- a/app/assets/javascripts/diffs/components/diff_gutter_avatars.vue +++ b/app/assets/javascripts/diffs/components/diff_gutter_avatars.vue @@ -75,10 +75,7 @@ export default { class="diff-notes-collapse js-diff-comment-avatar js-diff-comment-button" @click="toggleDiscussions" > - <icon - :size="12" - name="collapse" - /> + <icon :size="12" name="collapse" /> </button> <template v-else> <user-avatar-image @@ -99,7 +96,8 @@ export default { data-placement="top" role="button" @click="toggleDiscussions" - >+{{ moreCount }}</span> + >+{{ moreCount }}</span + > </template> </div> </template> diff --git a/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue b/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue index 8f037eeefc4..c02561b7599 100644 --- a/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue +++ b/app/assets/javascripts/diffs/components/diff_line_gutter_content.vue @@ -155,15 +155,10 @@ export default { <template> <div> - <span - v-if="isMatchLine" - class="context-cell" - role="button" - @click="handleLoadMoreLines" - >...</span> - <template - v-else + <span v-if="isMatchLine" class="context-cell" role="button" @click="handleLoadMoreLines" + >...</span > + <template v-else> <button v-if="shouldShowCommentButton" type="button" @@ -171,21 +166,10 @@ export default { title="Add a comment to this line" @click="handleCommentButton" > - <icon - :size="12" - name="comment" - /> + <icon :size="12" name="comment" /> </button> - <a - v-if="lineNumber" - :data-linenumber="lineNumber" - :href="lineHref" - > - </a> - <diff-gutter-avatars - v-if="shouldShowAvatarsOnGutter" - :discussions="line.discussions" - /> + <a v-if="lineNumber" :data-linenumber="lineNumber" :href="lineHref"> </a> + <diff-gutter-avatars v-if="shouldShowAvatarsOnGutter" :discussions="line.discussions" /> </template> </div> </template> diff --git a/app/assets/javascripts/diffs/components/diff_line_note_form.vue b/app/assets/javascripts/diffs/components/diff_line_note_form.vue index 07f38172575..c7cef74fe40 100644 --- a/app/assets/javascripts/diffs/components/diff_line_note_form.vue +++ b/app/assets/javascripts/diffs/components/diff_line_note_form.vue @@ -88,9 +88,7 @@ export default { </script> <template> - <div - class="content discussion-form discussion-form-container discussion-notes" - > + <div class="content discussion-form discussion-form-container discussion-notes"> <note-form ref="noteForm" :is-editing="true" diff --git a/app/assets/javascripts/diffs/components/diff_table_cell.vue b/app/assets/javascripts/diffs/components/diff_table_cell.vue index 0a893a57f07..f4eb956adcb 100644 --- a/app/assets/javascripts/diffs/components/diff_table_cell.vue +++ b/app/assets/javascripts/diffs/components/diff_table_cell.vue @@ -103,9 +103,7 @@ export default { </script> <template> - <td - :class="classNameMap" - > + <td :class="classNameMap"> <diff-line-gutter-content :line="line" :file-hash="fileHash" diff --git a/app/assets/javascripts/diffs/components/edit_button.vue b/app/assets/javascripts/diffs/components/edit_button.vue index 2fb85ca2f07..5d38d545ce8 100644 --- a/app/assets/javascripts/diffs/components/edit_button.vue +++ b/app/assets/javascripts/diffs/components/edit_button.vue @@ -32,11 +32,5 @@ export default { </script> <template> - <a - :href="editPath" - class="btn btn-default js-edit-blob" - @click="handleEditClick" - > - Edit - </a> + <a :href="editPath" class="btn btn-default js-edit-blob" @click="handleEditClick"> Edit </a> </template> diff --git a/app/assets/javascripts/diffs/components/file_row_stats.vue b/app/assets/javascripts/diffs/components/file_row_stats.vue index 105f7ebdbed..784f74e498f 100644 --- a/app/assets/javascripts/diffs/components/file_row_stats.vue +++ b/app/assets/javascripts/diffs/components/file_row_stats.vue @@ -10,16 +10,9 @@ export default { </script> <template> - <span - v-once - class="file-row-stats" - > - <span class="cgreen"> - +{{ file.addedLines }} - </span> - <span class="cred"> - -{{ file.removedLines }} - </span> + <span v-once class="file-row-stats"> + <span class="cgreen"> +{{ file.addedLines }} </span> + <span class="cred"> -{{ file.removedLines }} </span> </span> </template> diff --git a/app/assets/javascripts/diffs/components/hidden_files_warning.vue b/app/assets/javascripts/diffs/components/hidden_files_warning.vue index 017dcfcc357..119e139de21 100644 --- a/app/assets/javascripts/diffs/components/hidden_files_warning.vue +++ b/app/assets/javascripts/diffs/components/hidden_files_warning.vue @@ -26,26 +26,13 @@ export default { <h4> {{ __('Too many changes to show.') }} <div class="pull-right"> - <a - :href="plainDiffPath" - class="btn btn-sm" - > - {{ __('Plain diff') }} - </a> - <a - :href="emailPatchPath" - class="btn btn-sm" - > - {{ __('Email patch') }} - </a> + <a :href="plainDiffPath" class="btn btn-sm"> {{ __('Plain diff') }} </a> + <a :href="emailPatchPath" class="btn btn-sm"> {{ __('Email patch') }} </a> </div> </h4> <p> - To preserve performance only - <strong> - {{ visible }} of {{ total }} - </strong> - files are displayed. + To preserve performance only <strong> {{ visible }} of {{ total }} </strong> files are + displayed. </p> </div> </template> diff --git a/app/assets/javascripts/diffs/components/image_diff_overlay.vue b/app/assets/javascripts/diffs/components/image_diff_overlay.vue index ae1b0a52901..d30e64312aa 100644 --- a/app/assets/javascripts/diffs/components/image_diff_overlay.vue +++ b/app/assets/javascripts/diffs/components/image_diff_overlay.vue @@ -97,11 +97,9 @@ export default { v-if="canComment" type="button" class="btn-transparent position-absolute image-diff-overlay-add-comment w-100 h-100 js-add-image-diff-note-button" - @click="clickedImage($event.offsetX, $event.offsetY)" + @click="clickedImage($event.offsetX, $event.offsetY);" > - <span class="sr-only"> - {{ __('Add image comment') }} - </span> + <span class="sr-only"> {{ __('Add image comment') }} </span> </button> <button v-for="(discussion, index) in allDiscussions" @@ -111,12 +109,9 @@ export default { :disabled="!shouldToggleDiscussion" class="js-image-badge" type="button" - @click="toggleDiscussion({ discussionId: discussion.id })" + @click="toggleDiscussion({ discussionId: discussion.id });" > - <icon - v-if="showCommentIcon" - name="image-comment-dark" - /> + <icon v-if="showCommentIcon" name="image-comment-dark" /> <template v-else> {{ index + 1 }} </template> @@ -125,15 +120,13 @@ export default { v-if="currentCommentForm" :style="{ left: `${currentCommentForm.x}px`, - top: `${currentCommentForm.y}px` + top: `${currentCommentForm.y}px`, }" :aria-label="__('Comment form position')" class="btn-transparent comment-indicator" type="button" > - <icon - name="image-comment-dark" - /> + <icon name="image-comment-dark" /> </button> </div> </template> diff --git a/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue b/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue index b9e14c53d2c..91b87fb042c 100644 --- a/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue +++ b/app/assets/javascripts/diffs/components/inline_diff_comment_row.vue @@ -34,19 +34,10 @@ export default { </script> <template> - <tr - :class="className" - class="notes_holder" - > - <td - class="notes_content" - colspan="3" - > + <tr :class="className" class="notes_holder"> + <td class="notes_content" colspan="3"> <div class="content"> - <diff-discussions - v-if="line.discussions.length" - :discussions="line.discussions" - /> + <diff-discussions v-if="line.discussions.length" :discussions="line.discussions" /> <diff-line-note-form v-if="diffLineCommentForms[line.line_code]" :diff-file-hash="diffFileHash" diff --git a/app/assets/javascripts/diffs/components/inline_diff_table_row.vue b/app/assets/javascripts/diffs/components/inline_diff_table_row.vue index 1f4088066d1..8d53fbded73 100644 --- a/app/assets/javascripts/diffs/components/inline_diff_table_row.vue +++ b/app/assets/javascripts/diffs/components/inline_diff_table_row.vue @@ -102,11 +102,6 @@ export default { :is-hover="isHover" class="diff-line-num new_line qa-new-diff-line" /> - <td - :class="line.type" - class="line_content" - v-html="line.rich_text" - > - </td> + <td :class="line.type" class="line_content" v-html="line.rich_text"></td> </tr> </template> diff --git a/app/assets/javascripts/diffs/components/inline_diff_view.vue b/app/assets/javascripts/diffs/components/inline_diff_view.vue index 79efac89e98..fafc1649ce7 100644 --- a/app/assets/javascripts/diffs/components/inline_diff_view.vue +++ b/app/assets/javascripts/diffs/components/inline_diff_view.vue @@ -37,11 +37,10 @@ export default { <table :class="userColorScheme" :data-commit-id="commitId" - class="code diff-wrap-lines js-syntax-highlight text-file js-diff-inline-view"> + class="code diff-wrap-lines js-syntax-highlight text-file js-diff-inline-view" + > <tbody> - <template - v-for="(line, index) in diffLines" - > + <template v-for="(line, index) in diffLines"> <inline-diff-table-row :key="line.line_code" :file-hash="diffFile.file_hash" diff --git a/app/assets/javascripts/diffs/components/no_changes.vue b/app/assets/javascripts/diffs/components/no_changes.vue index 6905630ad8c..25ec157ed25 100644 --- a/app/assets/javascripts/diffs/components/no_changes.vue +++ b/app/assets/javascripts/diffs/components/no_changes.vue @@ -19,29 +19,16 @@ export default { </script> <template> - <div - class="row empty-state nothing-here-block" - > + <div class="row empty-state nothing-here-block"> <div class="col-xs-12"> - <div class="svg-content"> - <span - v-html="emptyImage" - ></span> - </div> + <div class="svg-content"><span v-html="emptyImage"></span></div> </div> <div class="col-xs-12"> <div class="text-content text-center"> - No changes between - <span class="ref-name">{{ sourceBranch }}</span> - and + No changes between <span class="ref-name">{{ sourceBranch }}</span> and <span class="ref-name">{{ targetBranch }}</span> <div class="text-center"> - <a - :href="newBlobPath" - class="btn btn-success" - > - {{ __('Create commit') }} - </a> + <a :href="newBlobPath" class="btn btn-success"> {{ __('Create commit') }} </a> </div> </div> </div> diff --git a/app/assets/javascripts/diffs/components/parallel_diff_comment_row.vue b/app/assets/javascripts/diffs/components/parallel_diff_comment_row.vue index 00c2df4dac1..c6b50983277 100644 --- a/app/assets/javascripts/diffs/components/parallel_diff_comment_row.vue +++ b/app/assets/javascripts/diffs/components/parallel_diff_comment_row.vue @@ -72,17 +72,9 @@ export default { </script> <template> - <tr - :class="className" - class="notes_holder" - > - <td - class="notes_content parallel old" - colspan="2"> - <div - v-if="shouldRenderDiscussionsOnLeft" - class="content" - > + <tr :class="className" class="notes_holder"> + <td class="notes_content parallel old" colspan="2"> + <div v-if="shouldRenderDiscussionsOnLeft" class="content"> <diff-discussions v-if="line.left.discussions.length" :discussions="line.left.discussions" @@ -96,13 +88,8 @@ export default { line-position="left" /> </td> - <td - class="notes_content parallel new" - colspan="2"> - <div - v-if="shouldRenderDiscussionsOnRight" - class="content" - > + <td class="notes_content parallel new" colspan="2"> + <div v-if="shouldRenderDiscussionsOnRight" class="content"> <diff-discussions v-if="line.right.discussions.length" :discussions="line.right.discussions" diff --git a/app/assets/javascripts/diffs/components/parallel_diff_table_row.vue b/app/assets/javascripts/diffs/components/parallel_diff_table_row.vue index 2d87db12fd6..248dfd9815e 100644 --- a/app/assets/javascripts/diffs/components/parallel_diff_table_row.vue +++ b/app/assets/javascripts/diffs/components/parallel_diff_table_row.vue @@ -125,8 +125,7 @@ export default { class="line_content parallel left-side" @mousedown.native="handleParallelLineMouseDown" v-html="line.left.rich_text" - > - </td> + ></td> </template> <template v-else> <td class="diff-line-num old_line empty-cell"></td> @@ -151,8 +150,7 @@ export default { class="line_content parallel right-side" @mousedown.native="handleParallelLineMouseDown" v-html="line.right.rich_text" - > - </td> + ></td> </template> <template v-else> <td class="diff-line-num old_line empty-cell"></td> diff --git a/app/assets/javascripts/diffs/components/parallel_diff_view.vue b/app/assets/javascripts/diffs/components/parallel_diff_view.vue index 6942f9b53e0..771b8a80352 100644 --- a/app/assets/javascripts/diffs/components/parallel_diff_view.vue +++ b/app/assets/javascripts/diffs/components/parallel_diff_view.vue @@ -41,9 +41,7 @@ export default { > <table> <tbody> - <template - v-for="(line, index) in diffLines" - > + <template v-for="(line, index) in diffLines"> <parallel-diff-table-row :key="index" :file-hash="diffFile.file_hash" diff --git a/app/assets/javascripts/diffs/components/tree_list.vue b/app/assets/javascripts/diffs/components/tree_list.vue index 1f82eeae6cb..ec4a4aa1d6d 100644 --- a/app/assets/javascripts/diffs/components/tree_list.vue +++ b/app/assets/javascripts/diffs/components/tree_list.vue @@ -72,16 +72,13 @@ export default { <div class="tree-list-holder d-flex flex-column"> <div class="append-bottom-8 position-relative tree-list-search d-flex"> <div class="flex-fill d-flex"> - <icon - name="search" - class="position-absolute tree-list-icon" - /> + <icon name="search" class="position-absolute tree-list-icon" /> <input v-model="search" :placeholder="s__('MergeRequest|Filter files')" type="search" class="form-control" - @focus="toggleFocusSearch(true)" + @focus="toggleFocusSearch(true);" @blur="blurSearch" /> <button @@ -91,50 +88,39 @@ export default { class="position-absolute bg-transparent tree-list-icon tree-list-clear-icon border-0 p-0" @click="clearSearch" > - <icon - name="close" - /> + <icon name="close" /> </button> </div> - <div - v-show="!focusSearch" - class="btn-group prepend-left-8 tree-list-view-toggle" - > + <div v-show="!focusSearch" class="btn-group prepend-left-8 tree-list-view-toggle"> <button v-gl-tooltip.hover :aria-label="__('List view')" :title="__('List view')" :class="{ - active: !renderTreeList + active: !renderTreeList, }" class="btn btn-default pt-0 pb-0 d-flex align-items-center" type="button" - @click="toggleRenderTreeList(false)" + @click="toggleRenderTreeList(false);" > - <icon - name="hamburger" - /> + <icon name="hamburger" /> </button> <button v-gl-tooltip.hover :aria-label="__('Tree view')" :title="__('Tree view')" :class="{ - active: renderTreeList + active: renderTreeList, }" class="btn btn-default pt-0 pb-0 d-flex align-items-center" type="button" - @click="toggleRenderTreeList(true)" + @click="toggleRenderTreeList(true);" > - <icon - name="file-tree" - /> + <icon name="file-tree" /> </button> </div> </div> - <div - class="tree-list-scroll" - > + <div class="tree-list-scroll"> <template v-if="filteredTreeList.length"> <file-row v-for="file in filteredTreeList" @@ -150,25 +136,15 @@ export default { @clickFile="scrollToFile" /> </template> - <p - v-else - class="prepend-top-20 append-bottom-20 text-center" - > + <p v-else class="prepend-top-20 append-bottom-20 text-center"> {{ s__('MergeRequest|No files found') }} </p> </div> - <div - v-once - class="pt-3 pb-3 text-center" - > + <div v-once class="pt-3 pb-3 text-center"> {{ n__('%d changed file', '%d changed files', diffFilesLength) }} <div> - <span class="cgreen"> - {{ n__('%d addition', '%d additions', addedLines) }} - </span> - <span class="cred"> - {{ n__('%d deleted', '%d deletions', removedLines) }} - </span> + <span class="cgreen"> {{ n__('%d addition', '%d additions', addedLines) }} </span> + <span class="cred"> {{ n__('%d deleted', '%d deletions', removedLines) }} </span> </div> </div> </div> diff --git a/app/assets/javascripts/diffs/store/actions.js b/app/assets/javascripts/diffs/store/actions.js index 6354d3ce1e6..a3de058b20e 100644 --- a/app/assets/javascripts/diffs/store/actions.js +++ b/app/assets/javascripts/diffs/store/actions.js @@ -41,12 +41,14 @@ export const assignDiscussionsToDiff = ( ) => { const diffPositionByLineCode = getDiffPositionByLineCode(state.diffFiles); - discussions.filter(discussion => discussion.diff_discussion).forEach(discussion => { - commit(types.SET_LINE_DISCUSSIONS_FOR_FILE, { - discussion, - diffPositionByLineCode, + discussions + .filter(discussion => discussion.diff_discussion) + .forEach(discussion => { + commit(types.SET_LINE_DISCUSSIONS_FOR_FILE, { + discussion, + diffPositionByLineCode, + }); }); - }); }; export const removeDiscussionsFromDiff = ({ commit }, removeDiscussion) => { diff --git a/app/assets/javascripts/diffs/store/getters.js b/app/assets/javascripts/diffs/store/getters.js index 05e32e3c1f1..6a87b712b48 100644 --- a/app/assets/javascripts/diffs/store/getters.js +++ b/app/assets/javascripts/diffs/store/getters.js @@ -23,7 +23,7 @@ export const diffHasAllExpandedDiscussions = (state, getters) => diff => { }; /** - * Checks if the diff has all discussions collpased + * Checks if the diff has all discussions collapsed * @param {Object} diff * @returns {Boolean} */ diff --git a/app/assets/javascripts/environments/components/container.vue b/app/assets/javascripts/environments/components/container.vue index 6c0b5c1f427..bd402c0eea5 100644 --- a/app/assets/javascripts/environments/components/container.vue +++ b/app/assets/javascripts/environments/components/container.vue @@ -41,7 +41,6 @@ export default { <template> <div class="environments-container"> - <gl-loading-icon v-if="isLoading" :size="3" @@ -51,10 +50,7 @@ export default { <slot name="emptyState"></slot> - <div - v-if="!isLoading && environments.length > 0" - class="table-holder"> - + <div v-if="!isLoading && environments.length > 0" class="table-holder"> <environment-table :environments="environments" :can-create-deployment="canCreateDeployment" diff --git a/app/assets/javascripts/environments/components/empty_state.vue b/app/assets/javascripts/environments/components/empty_state.vue index 2360a52645b..ca2ac4c3c53 100644 --- a/app/assets/javascripts/environments/components/empty_state.vue +++ b/app/assets/javascripts/environments/components/empty_state.vue @@ -24,11 +24,11 @@ export default { {{ s__("Environments|You don't have any environments right now") }} </h4> <p class="blank-state-text"> - {{ s__(`Environments|Environments are places where - code gets deployed, such as staging or production.`) }} - <a :href="helpPath"> - {{ s__("Environments|Read more about environments") }} - </a> + {{ + s__(`Environments|Environments are places where + code gets deployed, such as staging or production.`) + }} + <a :href="helpPath"> {{ s__('Environments|Read more about environments') }} </a> </p> <div class="text-center"> @@ -37,7 +37,7 @@ export default { :href="newPath" class="btn btn-success js-new-environment-button" > - {{ s__("Environments|New environment") }} + {{ s__('Environments|New environment') }} </a> </div> </div> diff --git a/app/assets/javascripts/environments/components/environment_actions.vue b/app/assets/javascripts/environments/components/environment_actions.vue index b849772a82e..1f7dab9fbd2 100644 --- a/app/assets/javascripts/environments/components/environment_actions.vue +++ b/app/assets/javascripts/environments/components/environment_actions.vue @@ -68,9 +68,7 @@ export default { }; </script> <template> - <div - class="btn-group" - role="group"> + <div class="btn-group" role="group"> <button v-tooltip :title="title" @@ -82,34 +80,23 @@ export default { data-toggle="dropdown" > <span> - <icon name="play" /> - <icon - name="chevron-down" - /> + <icon name="play" /> <icon name="chevron-down" /> <gl-loading-icon v-if="isLoading" /> </span> </button> <ul class="dropdown-menu dropdown-menu-right"> - <li - v-for="(action, i) in actions" - :key="i"> + <li v-for="(action, i) in actions" :key="i"> <button :class="{ disabled: isActionDisabled(action) }" :disabled="isActionDisabled(action)" type="button" class="js-manual-action-link no-btn btn d-flex align-items-center" - @click="onClickAction(action)" + @click="onClickAction(action);" > - <span class="flex-fill"> - {{ action.name }} - </span> - <span - v-if="action.scheduledAt" - class="text-secondary" - > - <icon name="clock" /> - {{ remainingTime(action) }} + <span class="flex-fill"> {{ action.name }} </span> + <span v-if="action.scheduledAt" class="text-secondary"> + <icon name="clock" /> {{ remainingTime(action) }} </span> </button> </li> diff --git a/app/assets/javascripts/environments/components/environment_item.vue b/app/assets/javascripts/environments/components/environment_item.vue index 34d94490533..cd2f46fd07a 100644 --- a/app/assets/javascripts/environments/components/environment_item.vue +++ b/app/assets/javascripts/environments/components/environment_item.vue @@ -453,53 +453,28 @@ export default { 'folder-row': model.isFolder, }" class="gl-responsive-table-row" - role="row"> + role="row" + > <div v-gl-tooltip :title="model.name" class="table-section section-wrap section-15 text-truncate" role="gridcell" > - <div - v-if="!model.isFolder" - class="table-mobile-header" - role="rowheader" - > - {{ s__("Environments|Environment") }} + <div v-if="!model.isFolder" class="table-mobile-header" role="rowheader"> + {{ s__('Environments|Environment') }} </div> - <span - v-if="!model.isFolder" - class="environment-name table-mobile-content"> - <a - class="qa-environment-link" - :href="environmentPath" - > - {{ model.name }} - </a> + <span v-if="!model.isFolder" class="environment-name table-mobile-content"> + <a class="qa-environment-link" :href="environmentPath"> {{ model.name }} </a> </span> - <span - v-else - class="folder-name" - role="button" - @click="onClickFolder"> - - <icon - :name="folderIconName" - class="folder-icon" - /> + <span v-else class="folder-name" role="button" @click="onClickFolder"> + <icon :name="folderIconName" class="folder-icon" /> - <icon - name="folder" - class="folder-icon" - /> + <icon name="folder" class="folder-icon" /> - <span> - {{ model.folderName }} - </span> + <span> {{ model.folderName }} </span> - <span class="badge badge-pill"> - {{ model.size }} - </span> + <span class="badge badge-pill"> {{ model.size }} </span> </span> </div> @@ -507,9 +482,7 @@ export default { class="table-section section-10 deployment-column d-none d-sm-none d-md-block" role="gridcell" > - <span v-if="shouldRenderDeploymentID"> - {{ deploymentInternalId }} - </span> + <span v-if="shouldRenderDeploymentID"> {{ deploymentInternalId }} </span> <span v-if="!model.isFolder && deploymentHasUser"> by @@ -523,61 +496,32 @@ export default { </span> </div> - <div - class="table-section section-15 d-none d-sm-none d-md-block" - role="gridcell" - > - <a - v-if="shouldRenderBuildName" - :href="buildPath" - class="build-link flex-truncate-parent" - > + <div class="table-section section-15 d-none d-sm-none d-md-block" role="gridcell"> + <a v-if="shouldRenderBuildName" :href="buildPath" class="build-link flex-truncate-parent"> <span class="flex-truncate-child">{{ buildName }}</span> </a> </div> - <div - v-if="!model.isFolder" - class="table-section section-20" - role="gridcell" - > - <div - role="rowheader" - class="table-mobile-header" - > - {{ s__("Environments|Commit") }} - </div> - <div - v-if="hasLastDeploymentKey" - class="js-commit-component table-mobile-content"> + <div v-if="!model.isFolder" class="table-section section-20" role="gridcell"> + <div role="rowheader" class="table-mobile-header">{{ s__('Environments|Commit') }}</div> + <div v-if="hasLastDeploymentKey" class="js-commit-component table-mobile-content"> <commit-component :tag="commitTag" :commit-ref="commitRef" :commit-url="commitUrl" :short-sha="commitShortSha" :title="commitTitle" - :author="commitAuthor"/> + :author="commitAuthor" + /> </div> - <div - v-if="!hasLastDeploymentKey" - class="commit-title table-mobile-content"> - {{ s__("Environments|No deployments yet") }} + <div v-if="!hasLastDeploymentKey" class="commit-title table-mobile-content"> + {{ s__('Environments|No deployments yet') }} </div> </div> - <div - v-if="!model.isFolder" - class="table-section section-10" - role="gridcell" - > - <div - role="rowheader" - class="table-mobile-header"> - {{ s__("Environments|Updated") }} - </div> - <span - v-if="canShowDate" - class="environment-created-date-timeago table-mobile-content"> + <div v-if="!model.isFolder" class="table-section section-10" role="gridcell"> + <div role="rowheader" class="table-mobile-header">{{ s__('Environments|Updated') }}</div> + <span v-if="canShowDate" class="environment-created-date-timeago table-mobile-content"> {{ createdDate }} </span> </div> @@ -585,12 +529,9 @@ export default { <div v-if="!model.isFolder && displayEnvironmentActions" class="table-section section-30 table-button-footer" - role="gridcell"> - - <div - class="btn-group table-action-buttons" - role="group"> - + role="gridcell" + > + <div class="btn-group table-action-buttons" role="group"> <external-url-component v-if="externalURL && canReadEnvironment" :external-url="externalURL" @@ -601,10 +542,7 @@ export default { :monitoring-url="monitoringUrl" /> - <actions-component - v-if="actions.length > 0" - :actions="actions" - /> + <actions-component v-if="actions.length > 0" :actions="actions" /> <terminal-button-component v-if="model && model.terminal_path" @@ -617,10 +555,7 @@ export default { :retry-url="retryUrl" /> - <stop-component - v-if="canStopEnvironment" - :environment="model" - /> + <stop-component v-if="canStopEnvironment" :environment="model" /> </div> </div> </div> diff --git a/app/assets/javascripts/environments/components/environment_rollback.vue b/app/assets/javascripts/environments/components/environment_rollback.vue index 46c77dca871..50c86af057c 100644 --- a/app/assets/javascripts/environments/components/environment_rollback.vue +++ b/app/assets/javascripts/environments/components/environment_rollback.vue @@ -61,14 +61,7 @@ export default { class="btn d-none d-sm-none d-md-block" @click="onClick" > - <icon - v-if="isLastDeployment" - name="repeat" - /> - <icon - v-else - name="redo" - /> + <icon v-if="isLastDeployment" name="repeat" /> <icon v-else name="redo" /> <gl-loading-icon v-if="isLoading" /> </button> </template> diff --git a/app/assets/javascripts/environments/components/environment_stop.vue b/app/assets/javascripts/environments/components/environment_stop.vue index efecc128368..99f50b499d0 100644 --- a/app/assets/javascripts/environments/components/environment_stop.vue +++ b/app/assets/javascripts/environments/components/environment_stop.vue @@ -65,6 +65,6 @@ export default { data-target="#stop-environment-modal" @click="onClick" > - <icon name="stop"/> + <icon name="stop" /> </loading-button> </template> diff --git a/app/assets/javascripts/environments/components/environments_app.vue b/app/assets/javascripts/environments/components/environments_app.vue index 557b2062c64..ae9459a2482 100644 --- a/app/assets/javascripts/environments/components/environments_app.vue +++ b/app/assets/javascripts/environments/components/environments_app.vue @@ -93,21 +93,11 @@ export default { <stop-environment-modal :environment="environmentInStopModal" /> <div class="top-area"> - <tabs - :tabs="tabs" - scope="environments" - @onChangeTab="onChangeTab" - /> + <tabs :tabs="tabs" scope="environments" @onChangeTab="onChangeTab" /> - <div - v-if="canCreateEnvironment && !isLoading" - class="nav-controls" - > - <a - :href="newEnvironmentPath" - class="btn btn-success" - > - {{ s__("Environments|New environment") }} + <div v-if="canCreateEnvironment && !isLoading" class="nav-controls"> + <a :href="newEnvironmentPath" class="btn btn-success"> + {{ s__('Environments|New environment') }} </a> </div> </div> diff --git a/app/assets/javascripts/environments/components/environments_table.vue b/app/assets/javascripts/environments/components/environments_table.vue index 4eae4eec394..5164d87c5fa 100644 --- a/app/assets/javascripts/environments/components/environments_table.vue +++ b/app/assets/javascripts/environments/components/environments_table.vue @@ -41,48 +41,25 @@ export default { }; </script> <template> - <div - class="ci-table" - role="grid" - > - <div - class="gl-responsive-table-row table-row-header" - role="row" - > - <div - class="table-section section-15 environments-name" - role="columnheader" - > - {{ s__("Environments|Environment") }} + <div class="ci-table" role="grid"> + <div class="gl-responsive-table-row table-row-header" role="row"> + <div class="table-section section-15 environments-name" role="columnheader"> + {{ s__('Environments|Environment') }} </div> - <div - class="table-section section-10 environments-deploy" - role="columnheader" - > - {{ s__("Environments|Deployment") }} + <div class="table-section section-10 environments-deploy" role="columnheader"> + {{ s__('Environments|Deployment') }} </div> - <div - class="table-section section-15 environments-build" - role="columnheader" - > - {{ s__("Environments|Job") }} + <div class="table-section section-15 environments-build" role="columnheader"> + {{ s__('Environments|Job') }} </div> - <div - class="table-section section-20 environments-commit" - role="columnheader" - > - {{ s__("Environments|Commit") }} + <div class="table-section section-20 environments-commit" role="columnheader"> + {{ s__('Environments|Commit') }} </div> - <div - class="table-section section-10 environments-date" - role="columnheader" - > - {{ s__("Environments|Updated") }} + <div class="table-section section-10 environments-date" role="columnheader"> + {{ s__('Environments|Updated') }} </div> </div> - <template - v-for="(model, i) in environments" - :model="model"> + <template v-for="(model, i) in environments" :model="model"> <div is="environment-item" :key="`environment-item-${i}`" @@ -91,12 +68,8 @@ export default { :can-read-environment="canReadEnvironment" /> - <template - v-if="shouldRenderFolderContent(model)" - > - <div - v-if="model.isLoadingFolderContent" - :key="`loading-item-${i}`"> + <template v-if="shouldRenderFolderContent(model)"> + <div v-if="model.isLoadingFolderContent" :key="`loading-item-${i}`"> <gl-loading-icon :size="2" /> </div> @@ -112,11 +85,8 @@ export default { <div :key="`sub-div-${i}`"> <div class="text-center prepend-top-10"> - <a - :href="folderUrl(model)" - class="btn btn-default" - > - {{ s__("Environments|Show all") }} + <a :href="folderUrl(model)" class="btn btn-default"> + {{ s__('Environments|Show all') }} </a> </div> </div> diff --git a/app/assets/javascripts/environments/components/stop_environment_modal.vue b/app/assets/javascripts/environments/components/stop_environment_modal.vue index 2ebc7b5b951..c78d86e9b97 100644 --- a/app/assets/javascripts/environments/components/stop_environment_modal.vue +++ b/app/assets/javascripts/environments/components/stop_environment_modal.vue @@ -62,31 +62,25 @@ export default { @submit="onSubmit" > <template slot="header"> - <h4 - class="modal-title d-flex mw-100" - > + <h4 class="modal-title d-flex mw-100"> Stopping - <span - v-gl-tooltip - :title="environment.name" - class="text-truncate ml-1 mr-1 flex-fill" - >{{ environment.name }}</span> + <span v-gl-tooltip :title="environment.name" class="text-truncate ml-1 mr-1 flex-fill">{{ + environment.name + }}</span> ? </h4> </template> <p>{{ s__('Environments|Are you sure you want to stop this environment?') }}</p> - <div - v-if="!environment.has_stop_action" - class="warning_message" - > + <div v-if="!environment.has_stop_action" class="warning_message"> <p v-html="noStopActionMessage"></p> <a href="https://docs.gitlab.com/ee/ci/environments.html#stopping-an-environment" target="_blank" rel="noopener noreferrer" - >{{ s__('Environments|Learn more about stopping environments') }}</a> + >{{ s__('Environments|Learn more about stopping environments') }}</a + > </div> </gl-modal> </template> diff --git a/app/assets/javascripts/environments/folder/environments_folder_view.vue b/app/assets/javascripts/environments/folder/environments_folder_view.vue index 6be4845fe4c..d6f0b6115a6 100644 --- a/app/assets/javascripts/environments/folder/environments_folder_view.vue +++ b/app/assets/javascripts/environments/folder/environments_folder_view.vue @@ -43,20 +43,12 @@ export default { <div :class="cssContainerClass"> <stop-environment-modal :environment="environmentInStopModal" /> - <div - v-if="!isLoading" - class="top-area" - > - + <div v-if="!isLoading" class="top-area"> <h4 class="js-folder-name environments-folder-name"> - {{ s__("Environments|Environments") }} / <b>{{ folderName }}</b> + {{ s__('Environments|Environments') }} / <b>{{ folderName }}</b> </h4> - <tabs - :tabs="tabs" - scope="environments" - @onChangeTab="onChangeTab" - /> + <tabs :tabs="tabs" scope="environments" @onChangeTab="onChangeTab" /> </div> <container diff --git a/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue b/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue index b9bc5e6ed7f..6b1a934d3fe 100644 --- a/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue +++ b/app/assets/javascripts/filtered_search/components/recent_searches_dropdown_content.vue @@ -58,20 +58,16 @@ export default { </script> <template> <div> - <div - v-if="!isLocalStorageAvailable" - class="dropdown-info-note"> + <div v-if="!isLocalStorageAvailable" class="dropdown-info-note"> This feature requires local storage to be enabled </div> <ul v-else-if="hasItems"> - <li - v-for="(item, index) in processedItems" - :key="`processed-items-${index}`" - > + <li v-for="(item, index) in processedItems" :key="`processed-items-${index}`"> <button type="button" class="filtered-search-history-dropdown-item" - @click="onItemActivated(item.text)"> + @click="onItemActivated(item.text);" + > <span> <span v-for="(token, tokenIndex) in item.tokens" @@ -92,15 +88,12 @@ export default { <button type="button" class="filtered-search-history-clear-button" - @click="onRequestClearRecentSearches($event)"> + @click="onRequestClearRecentSearches($event);" + > Clear recent searches </button> </li> </ul> - <div - v-else - class="dropdown-info-note"> - You don't have any recent searches - </div> + <div v-else class="dropdown-info-note">You don't have any recent searches</div> </div> </template> diff --git a/app/assets/javascripts/frequent_items/components/app.vue b/app/assets/javascripts/frequent_items/components/app.vue index 1ed8254bc58..63531f1f246 100644 --- a/app/assets/javascripts/frequent_items/components/app.vue +++ b/app/assets/javascripts/frequent_items/components/app.vue @@ -95,19 +95,14 @@ export default { <template> <div> - <frequent-items-search-input - :namespace="namespace" - /> + <frequent-items-search-input :namespace="namespace" /> <gl-loading-icon v-if="isLoadingItems" :label="translations.loadingMessage" :size="2" class="loading-animation prepend-top-20" /> - <div - v-if="!isLoadingItems && !hasSearchQuery" - class="section-header" - > + <div v-if="!isLoadingItems && !hasSearchQuery" class="section-header"> {{ translations.header }} </div> <frequent-items-list diff --git a/app/assets/javascripts/frequent_items/components/frequent_items_list.vue b/app/assets/javascripts/frequent_items/components/frequent_items_list.vue index 8e511aa2a36..67ffa97a046 100644 --- a/app/assets/javascripts/frequent_items/components/frequent_items_list.vue +++ b/app/assets/javascripts/frequent_items/components/frequent_items_list.vue @@ -55,11 +55,7 @@ export default { <template> <div class="frequent-items-list-container"> <ul class="list-unstyled"> - <li - v-if="isListEmpty" - :class="{ 'section-failure': isFetchFailed }" - class="section-empty" - > + <li v-if="isListEmpty" :class="{ 'section-failure': isFetchFailed }" class="section-empty"> {{ listEmptyMessage }} </li> <frequent-items-list-item diff --git a/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue b/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue index 2399ee15332..2cbc7c7077b 100644 --- a/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue +++ b/app/assets/javascripts/frequent_items/components/frequent_items_list_item.vue @@ -80,35 +80,14 @@ export default { <template> <li class="frequent-items-list-item-container"> - <a - :href="webUrl" - class="clearfix" - > + <a :href="webUrl" class="clearfix"> <div class="frequent-items-item-avatar-container"> - <img - v-if="hasAvatar" - :src="avatarUrl" - class="avatar s32" - /> - <identicon - v-else - :entity-id="itemId" - :entity-name="itemName" - size-class="s32" - /> + <img v-if="hasAvatar" :src="avatarUrl" class="avatar s32" /> + <identicon v-else :entity-id="itemId" :entity-name="itemName" size-class="s32" /> </div> <div class="frequent-items-item-metadata-container"> - <div - :title="itemName" - class="frequent-items-item-title" - v-html="highlightedItemName" - > - </div> - <div - v-if="truncatedNamespace" - :title="namespace" - class="frequent-items-item-namespace" - > + <div :title="itemName" class="frequent-items-item-title" v-html="highlightedItemName"></div> + <div v-if="truncatedNamespace" :title="namespace" class="frequent-items-item-namespace"> {{ truncatedNamespace }} </div> </div> diff --git a/app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue b/app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue index 14c223c61a4..c69e1b792dc 100644 --- a/app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue +++ b/app/assets/javascripts/frequent_items/components/frequent_items_search_input.vue @@ -49,10 +49,6 @@ export default { type="search" class="form-control" /> - <icon - v-if="!searchQuery" - name="search" - class="search-icon" - /> + <icon v-if="!searchQuery" name="search" class="search-icon" /> </div> </template> diff --git a/app/assets/javascripts/gfm_auto_complete.js b/app/assets/javascripts/gfm_auto_complete.js index 00b3d283570..6f8b73564d0 100644 --- a/app/assets/javascripts/gfm_auto_complete.js +++ b/app/assets/javascripts/gfm_auto_complete.js @@ -151,10 +151,16 @@ class GfmAutoComplete { // Team Members $input.atwho({ at: '@', + alias: 'users', displayTpl(value) { let tmpl = GfmAutoComplete.Loading.template; - if (value.username != null) { - tmpl = GfmAutoComplete.Members.template; + const { avatarTag, username, title } = value; + if (username != null) { + tmpl = GfmAutoComplete.Members.templateFunction({ + avatarTag, + username, + title, + }); } return tmpl; }, @@ -565,8 +571,9 @@ GfmAutoComplete.Emoji = { }; // Team Members GfmAutoComplete.Members = { - // eslint-disable-next-line no-template-curly-in-string - template: '<li>${avatarTag} ${username} <small>${title}</small></li>', + templateFunction({ avatarTag, username, title }) { + return `<li>${avatarTag} ${username} <small>${_.escape(title)}</small></li>`; + }, }; GfmAutoComplete.Labels = { template: diff --git a/app/assets/javascripts/groups/components/group_folder.vue b/app/assets/javascripts/groups/components/group_folder.vue index bcc7a638346..e885b2b5f41 100644 --- a/app/assets/javascripts/groups/components/group_folder.vue +++ b/app/assets/javascripts/groups/components/group_folder.vue @@ -43,18 +43,9 @@ export default { :parent-group="parentGroup" :action="action" /> - <li - v-if="hasMoreChildren" - class="group-row"> - <a - :href="parentGroup.relativePath" - class="group-row-contents has-more-items"> - <i - class="fa fa-external-link" - aria-hidden="true" - > - </i> - {{ moreChildrenStats }} + <li v-if="hasMoreChildren" class="group-row"> + <a :href="parentGroup.relativePath" class="group-row-contents has-more-items"> + <i class="fa fa-external-link" aria-hidden="true"> </i> {{ moreChildrenStats }} </a> </li> </ul> diff --git a/app/assets/javascripts/groups/components/group_item.vue b/app/assets/javascripts/groups/components/group_item.vue index 44d6fa26914..688bd37cc56 100644 --- a/app/assets/javascripts/groups/components/group_item.vue +++ b/app/assets/javascripts/groups/components/group_item.vue @@ -77,89 +77,46 @@ export default { </script> <template> - <li - :id="groupDomId" - :class="rowClass" - class="group-row" - @click.stop="onClickRowGroup" - > + <li :id="groupDomId" :class="rowClass" class="group-row" @click.stop="onClickRowGroup"> <div :class="{ 'project-row-contents': !isGroup }" class="group-row-contents d-flex justify-content-end align-items-center" > - <div - class="folder-toggle-wrap append-right-4 d-flex align-items-center" - > - <item-caret - :is-group-open="group.isOpen" - /> - <item-type-icon - :item-type="group.type" - :is-group-open="group.isOpen" - /> + <div class="folder-toggle-wrap append-right-4 d-flex align-items-center"> + <item-caret :is-group-open="group.isOpen" /> + <item-type-icon :item-type="group.type" :is-group-open="group.isOpen" /> </div> <div :class="{ 'content-loading': group.isChildrenLoading }" class="avatar-container s24 d-none d-sm-flex" > - <a - :href="group.relativePath" - class="no-expand" - > - <img - v-if="hasAvatar" - :src="group.avatarUrl" - class="avatar s24" - /> - <identicon - v-else - :entity-id="group.id" - :entity-name="group.name" - size-class="s24" - /> + <a :href="group.relativePath" class="no-expand"> + <img v-if="hasAvatar" :src="group.avatarUrl" class="avatar s24" /> + <identicon v-else :entity-id="group.id" :entity-name="group.name" size-class="s24" /> </a> </div> - <div - class="group-text flex-grow" - > - <div - class="title namespace-title append-right-8" - > + <div class="group-text flex-grow"> + <div class="title namespace-title append-right-8"> <a v-tooltip :href="group.relativePath" :title="group.fullName" class="no-expand" data-placement="bottom" - >{{ - // ending bracket must be by closing tag to prevent - // link hover text-decoration from over-extending - group.name - }}</a> - <span - v-if="group.permission" - class="user-access-role" + >{{ + // ending bracket must be by closing tag to prevent + // link hover text-decoration from over-extending + group.name + }}</a > - {{ group.permission }} - </span> + <span v-if="group.permission" class="user-access-role"> {{ group.permission }} </span> </div> - <div - v-if="group.description" - class="description" - > - <span v-html="group.description"> - </span> + <div v-if="group.description" class="description"> + <span v-html="group.description"> </span> </div> </div> - <item-stats - :item="group" - class="group-stats prepend-top-2" - /> - <item-actions - v-if="isGroup" - :group="group" - :parent-group="parentGroup" - /> + <item-stats :item="group" class="group-stats prepend-top-2" /> + <item-actions v-if="isGroup" :group="group" :parent-group="parentGroup" /> </div> <group-folder v-if="group.isOpen && hasChildren" diff --git a/app/assets/javascripts/groups/components/groups.vue b/app/assets/javascripts/groups/components/groups.vue index 81b2e5ea37b..f0f5b8395c9 100644 --- a/app/assets/javascripts/groups/components/groups.vue +++ b/app/assets/javascripts/groups/components/groups.vue @@ -43,19 +43,9 @@ export default { <template> <div class="groups-list-tree-container qa-groups-list-tree-container"> - <div - v-if="searchEmpty" - class="has-no-search-results" - > - {{ searchEmptyMessage }} - </div> - <template - v-else - > - <group-folder - :groups="groups" - :action="action" - /> + <div v-if="searchEmpty" class="has-no-search-results">{{ searchEmptyMessage }}</div> + <template v-else> + <group-folder :groups="groups" :action="action" /> <pagination-links :change="change" :page-info="pageInfo" diff --git a/app/assets/javascripts/groups/components/item_actions.vue b/app/assets/javascripts/groups/components/item_actions.vue index c1783d5ce25..a7995865c77 100644 --- a/app/assets/javascripts/groups/components/item_actions.vue +++ b/app/assets/javascripts/groups/components/item_actions.vue @@ -53,8 +53,9 @@ export default { :aria-label="editBtnTitle" data-container="body" data-placement="bottom" - class="edit-group btn no-expand"> - <icon name="settings"/> + class="edit-group btn no-expand" + > + <icon name="settings" /> </a> <a v-if="group.canLeave" @@ -65,8 +66,9 @@ export default { data-container="body" data-placement="bottom" class="leave-group btn no-expand" - @click.prevent="onLeaveGroup"> - <icon name="leave"/> + @click.prevent="onLeaveGroup" + > + <icon name="leave" /> </a> </div> </template> diff --git a/app/assets/javascripts/groups/components/item_caret.vue b/app/assets/javascripts/groups/components/item_caret.vue index 2a5bec5e86c..43b9607ea8e 100644 --- a/app/assets/javascripts/groups/components/item_caret.vue +++ b/app/assets/javascripts/groups/components/item_caret.vue @@ -21,10 +21,5 @@ export default { </script> <template> - <span class="folder-caret"> - <icon - :size="12" - :name="iconClass" - /> - </span> + <span class="folder-caret"> <icon :size="12" :name="iconClass" /> </span> </template> diff --git a/app/assets/javascripts/groups/components/item_stats.vue b/app/assets/javascripts/groups/components/item_stats.vue index 829924ba63c..bc6851ea2bf 100644 --- a/app/assets/javascripts/groups/components/item_stats.vue +++ b/app/assets/javascripts/groups/components/item_stats.vue @@ -76,14 +76,8 @@ export default { css-class="item-visibility" tooltip-placement="left" /> - <div - v-if="isProject" - class="last-updated" - > - <time-ago-tooltip - :time="item.updatedAt" - tooltip-placement="bottom" - /> + <div v-if="isProject" class="last-updated"> + <time-ago-tooltip :time="item.updatedAt" tooltip-placement="bottom" /> </div> </div> </template> diff --git a/app/assets/javascripts/groups/components/item_stats_value.vue b/app/assets/javascripts/groups/components/item_stats_value.vue index c542ca946d3..27b1c632643 100644 --- a/app/assets/javascripts/groups/components/item_stats_value.vue +++ b/app/assets/javascripts/groups/components/item_stats_value.vue @@ -57,12 +57,6 @@ export default { :title="title" data-container="body" > - <icon :name="iconName" /> - <span - v-if="isValuePresent" - class="stat-value" - > - {{ value }} - </span> + <icon :name="iconName" /> <span v-if="isValuePresent" class="stat-value"> {{ value }} </span> </span> </template> diff --git a/app/assets/javascripts/groups/components/item_type_icon.vue b/app/assets/javascripts/groups/components/item_type_icon.vue index 118d94d4937..e1ebd03cb5f 100644 --- a/app/assets/javascripts/groups/components/item_type_icon.vue +++ b/app/assets/javascripts/groups/components/item_type_icon.vue @@ -29,7 +29,5 @@ export default { </script> <template> - <span class="item-type-icon"> - <icon :name="iconClass"/> - </span> + <span class="item-type-icon"> <icon :name="iconClass" /> </span> </template> diff --git a/app/assets/javascripts/ide/components/activity_bar.vue b/app/assets/javascripts/ide/components/activity_bar.vue index 2cebacc1c4c..a1f66ff764d 100644 --- a/app/assets/javascripts/ide/components/activity_bar.vue +++ b/app/assets/javascripts/ide/components/activity_bar.vue @@ -37,7 +37,7 @@ export default { <button v-tooltip :class="{ - active: currentActivityView === $options.activityBarViews.edit + active: currentActivityView === $options.activityBarViews.edit, }" :title="s__('IDE|Edit')" :aria-label="s__('IDE|Edit')" @@ -45,18 +45,16 @@ export default { data-placement="right" type="button" class="ide-sidebar-link js-ide-edit-mode" - @click.prevent="changedActivityView($event, $options.activityBarViews.edit)" + @click.prevent="changedActivityView($event, $options.activityBarViews.edit);" > - <icon - name="code" - /> + <icon name="code" /> </button> </li> <li> <button v-tooltip :class="{ - active: currentActivityView === $options.activityBarViews.review + active: currentActivityView === $options.activityBarViews.review, }" :title="s__('IDE|Review')" :aria-label="s__('IDE|Review')" @@ -64,18 +62,16 @@ export default { data-placement="right" type="button" class="ide-sidebar-link js-ide-review-mode" - @click.prevent="changedActivityView($event, $options.activityBarViews.review)" + @click.prevent="changedActivityView($event, $options.activityBarViews.review);" > - <icon - name="file-modified" - /> + <icon name="file-modified" /> </button> </li> <li v-show="hasChanges"> <button v-tooltip :class="{ - active: currentActivityView === $options.activityBarViews.commit + active: currentActivityView === $options.activityBarViews.commit, }" :title="s__('IDE|Commit')" :aria-label="s__('IDE|Commit')" @@ -83,11 +79,9 @@ export default { data-placement="right" type="button" class="ide-sidebar-link js-ide-commit-mode" - @click.prevent="changedActivityView($event, $options.activityBarViews.commit)" + @click.prevent="changedActivityView($event, $options.activityBarViews.commit);" > - <icon - name="commit" - /> + <icon name="commit" /> </button> </li> </ul> diff --git a/app/assets/javascripts/ide/components/branches/item.vue b/app/assets/javascripts/ide/components/branches/item.vue index cc3e84e3f77..4dff3f7e755 100644 --- a/app/assets/javascripts/ide/components/branches/item.vue +++ b/app/assets/javascripts/ide/components/branches/item.vue @@ -32,28 +32,14 @@ export default { </script> <template> - <a - :href="branchHref" - class="btn-link d-flex align-items-center" - > + <a :href="branchHref" class="btn-link d-flex align-items-center"> <span class="d-flex append-right-default ide-search-list-current-icon"> - <icon - v-if="isActive" - :size="18" - name="mobile-issue-close" - /> + <icon v-if="isActive" :size="18" name="mobile-issue-close" /> </span> <span> - <strong> - {{ item.name }} - </strong> - <span - class="ide-merge-request-project-path d-block mt-1" - > - Updated - <timeago - :time="item.committedDate || ''" - /> + <strong> {{ item.name }} </strong> + <span class="ide-merge-request-project-path d-block mt-1"> + Updated <timeago :time="item.committedDate || ''" /> </span> </span> </a> diff --git a/app/assets/javascripts/ide/components/branches/search_list.vue b/app/assets/javascripts/ide/components/branches/search_list.vue index 600e1063f89..3cfdc1a367a 100644 --- a/app/assets/javascripts/ide/components/branches/search_list.vue +++ b/app/assets/javascripts/ide/components/branches/search_list.vue @@ -68,11 +68,7 @@ export default { class="form-control dropdown-input-field" @input="searchBranches" /> - <icon - :size="18" - name="search" - class="input-icon" - /> + <icon :size="18" name="search" class="input-icon" /> </div> </div> <div class="dropdown-content ide-merge-requests-dropdown-content d-flex"> @@ -81,26 +77,13 @@ export default { :size="2" class="mt-3 mb-3 align-self-center ml-auto mr-auto" /> - <ul - v-else - class="mb-3 w-100" - > + <ul v-else class="mb-3 w-100"> <template v-if="hasBranches"> - <li - v-for="item in branches" - :key="item.name" - > - <item - :item="item" - :project-id="currentProjectId" - :is-active="isActiveBranch(item)" - /> + <li v-for="item in branches" :key="item.name"> + <item :item="item" :project-id="currentProjectId" :is-active="isActiveBranch(item)" /> </li> </template> - <li - v-else - class="ide-search-list-empty d-flex align-items-center justify-content-center" - > + <li v-else class="ide-search-list-empty d-flex align-items-center justify-content-center"> <template v-if="hasNoSearchResults"> {{ __('No branches found') }} </template> diff --git a/app/assets/javascripts/ide/components/commit_sidebar/actions.vue b/app/assets/javascripts/ide/components/commit_sidebar/actions.vue index a8b5c7a16d0..d360dc42cd3 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/actions.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/actions.vue @@ -57,11 +57,7 @@ export default { :disabled="currentBranch && !currentBranch.can_push" :title="$options.currentBranchPermissionsTooltip" > - <span - class="ide-radio-label" - v-html="commitToCurrentBranchText" - > - </span> + <span class="ide-radio-label" v-html="commitToCurrentBranchText"> </span> </radio-group> <radio-group :value="$options.commitToNewBranch" diff --git a/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue b/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue index b0e60edcbe5..5119dbf32eb 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/editor_header.vue @@ -42,18 +42,9 @@ export default { <template> <div class="d-flex ide-commit-editor-header align-items-center"> - <file-icon - :file-name="activeFile.name" - :size="16" - class="mr-2" - /> - <strong class="mr-2"> - {{ activeFile.path }} - </strong> - <changed-file-icon - :file="activeFile" - class="ml-0" - /> + <file-icon :file-name="activeFile.name" :size="16" class="mr-2" /> + <strong class="mr-2"> {{ activeFile.path }} </strong> + <changed-file-icon :file="activeFile" class="ml-0" /> <div class="ml-auto"> <button v-if="!isStaged" @@ -66,7 +57,7 @@ export default { <button :class="{ 'btn-success': !isStaged, - 'btn-warning': isStaged + 'btn-warning': isStaged, }" type="button" class="btn btn-inverted" diff --git a/app/assets/javascripts/ide/components/commit_sidebar/empty_state.vue b/app/assets/javascripts/ide/components/commit_sidebar/empty_state.vue index d0a60d647e5..a23bae8e4c7 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/empty_state.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/empty_state.vue @@ -13,22 +13,12 @@ export default { v-if="!lastCommitMsg" class="multi-file-commit-panel-section ide-commit-empty-state js-empty-state" > - <div - class="ide-commit-empty-state-container" - > - <div class="svg-content svg-80"> - <img :src="noChangesStateSvgPath" /> - </div> + <div class="ide-commit-empty-state-container"> + <div class="svg-content svg-80"><img :src="noChangesStateSvgPath" /></div> <div class="append-right-default prepend-left-default"> - <div - class="text-content text-center" - > - <h4> - {{ __('No changes') }} - </h4> - <p> - {{ __('Edit files in the editor and commit changes here') }} - </p> + <div class="text-content text-center"> + <h4>{{ __('No changes') }}</h4> + <p>{{ __('Edit files in the editor and commit changes here') }}</p> </div> </div> </div> diff --git a/app/assets/javascripts/ide/components/commit_sidebar/form.vue b/app/assets/javascripts/ide/components/commit_sidebar/form.vue index 802827fce76..e5cd2411541 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/form.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/form.vue @@ -96,7 +96,7 @@ export default { <div :class="{ 'is-compact': isCompact, - 'is-full': !isCompact + 'is-full': !isCompact, }" :style="{ height: componentHeight ? `${componentHeight}px` : null, @@ -109,11 +109,7 @@ export default { @enter="enterTransition" @after-enter="afterEndTransition" > - <div - v-if="isCompact" - ref="compactEl" - class="commit-form-compact" - > + <div v-if="isCompact" ref="compactEl" class="commit-form-compact"> <button :disabled="!hasChanges" type="button" @@ -122,21 +118,10 @@ export default { > {{ __('Commit…') }} </button> - <p - class="text-center" - v-html="overviewText" - ></p> + <p class="text-center" v-html="overviewText"></p> </div> - <form - v-if="!isCompact" - ref="formEl" - @submit.prevent.stop="commitChanges" - > - <transition name="fade"> - <success-message - v-show="lastCommitMsg" - /> - </transition> + <form v-if="!isCompact" ref="formEl" @submit.prevent.stop="commitChanges"> + <transition name="fade"> <success-message v-show="lastCommitMsg" /> </transition> <commit-message-field :text="commitMessage" :placeholder="preBuiltCommitMessage" diff --git a/app/assets/javascripts/ide/components/commit_sidebar/list.vue b/app/assets/javascripts/ide/components/commit_sidebar/list.vue index 3e3539e364b..a1094570275 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/list.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/list.vue @@ -93,24 +93,11 @@ export default { </script> <template> - <div - class="ide-commit-list-container" - > - <header - class="multi-file-commit-panel-header d-flex mb-0" - > - <div - class="d-flex align-items-center flex-fill" - > - <icon - v-once - :name="iconName" - :size="18" - class="append-right-8" - /> - <strong> - {{ titleText }} - </strong> + <div class="ide-commit-list-container"> + <header class="multi-file-commit-panel-header d-flex mb-0"> + <div class="d-flex align-items-center flex-fill"> + <icon v-once :name="iconName" :size="18" class="append-right-8" /> + <strong> {{ titleText }} </strong> <div class="d-flex ml-auto"> <button ref="actionBtn" @@ -119,7 +106,7 @@ export default { :aria-label="actionBtnText" :disabled="!filesLength" :class="{ - 'disabled-content': !filesLength + 'disabled-content': !filesLength, }" type="button" class="d-flex ide-staged-action-btn p-0 border-0 align-items-center" @@ -128,11 +115,7 @@ export default { data-boundary="viewport" @click="actionBtnClicked" > - <icon - :name="actionBtnIcon" - :size="16" - class="ml-auto mr-auto" - /> + <icon :name="actionBtnIcon" :size="16" class="ml-auto mr-auto" /> </button> <button v-if="!stagedList" @@ -141,7 +124,7 @@ export default { :aria-label="__('Discard all changes')" :disabled="!filesLength" :class="{ - 'disabled-content': !filesLength + 'disabled-content': !filesLength, }" type="button" class="d-flex ide-staged-action-btn p-0 border-0 align-items-center" @@ -150,23 +133,13 @@ export default { data-boundary="viewport" @click="openDiscardModal" > - <icon - :size="16" - name="remove-all" - class="ml-auto mr-auto" - /> + <icon :size="16" name="remove-all" class="ml-auto mr-auto" /> </button> </div> </div> </header> - <ul - v-if="filesLength" - class="multi-file-commit-list list-unstyled append-bottom-0" - > - <li - v-for="file in fileList" - :key="file.key" - > + <ul v-if="filesLength" class="multi-file-commit-list list-unstyled append-bottom-0"> + <li v-for="file in fileList" :key="file.key"> <list-item :file="file" :action-component="itemActionComponent" @@ -176,10 +149,7 @@ export default { /> </li> </ul> - <p - v-else - class="multi-file-commit-list form-text text-muted text-center" - > + <p v-else class="multi-file-commit-list form-text text-muted text-center"> {{ emptyStateText }} </p> <gl-modal diff --git a/app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue b/app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue index 699fa7dc937..3156a398113 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/list_collapsed.vue @@ -69,9 +69,7 @@ export default { </script> <template> - <div - class="multi-file-commit-list-collapsed text-center" - > + <div class="multi-file-commit-list-collapsed text-center"> <div v-tooltip :title="titleTooltip" @@ -79,11 +77,7 @@ export default { data-placement="left" class="append-bottom-15" > - <icon - v-once - :name="iconName" - :size="18" - /> + <icon v-once :name="iconName" :size="18" /> </div> <div v-tooltip @@ -92,11 +86,7 @@ export default { data-placement="left" class="append-bottom-10" > - <icon - :name="additionIconName" - :size="18" - :css-classes="addedFilesIconClass" - /> + <icon :name="additionIconName" :size="18" :css-classes="addedFilesIconClass" /> </div> {{ addedFilesLength }} <div @@ -106,11 +96,7 @@ export default { data-placement="left" class="prepend-top-10 append-bottom-10" > - <icon - :name="modifiedIconName" - :size="18" - :css-classes="modifiedFilesClass" - /> + <icon :name="modifiedIconName" :size="18" :css-classes="modifiedFilesClass" /> </div> {{ modifiedFilesLength }} </div> diff --git a/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue b/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue index ee0e72cd05f..4be4b02ac1e 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/list_item.vue @@ -99,7 +99,7 @@ export default { v-tooltip :title="tooltipTitle" :class="{ - 'is-active': isActive + 'is-active': isActive, }" class="multi-file-commit-list-path w-100 border-0 ml-0 mr-0" role="button" @@ -107,18 +107,11 @@ export default { @click="openFileInEditor" > <span class="multi-file-commit-list-file-path d-flex align-items-center"> - <file-icon - :file-name="file.name" - class="append-right-8" - />{{ file.name }} + <file-icon :file-name="file.name" class="append-right-8" />{{ file.name }} </span> <div class="ml-auto d-flex align-items-center"> <div class="d-flex align-items-center ide-commit-list-changed-icon"> - <icon - :name="iconName" - :size="16" - :css-classes="iconClass" - /> + <icon :name="iconName" :size="16" :css-classes="iconClass" /> </div> </div> </div> diff --git a/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue b/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue index 37ca108fafc..3173e8a4f9f 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/message_field.vue @@ -71,24 +71,16 @@ export default { <fieldset class="common-note-form ide-commit-message-field"> <div :class="{ - 'is-focused': isFocused + 'is-focused': isFocused, }" class="md-area" > - <div - v-once - class="md-header" - > + <div v-once class="md-header"> <ul class="nav-links"> <li> {{ __('Commit Message') }} - <span - v-popover="$options.popoverOptions" - class="form-text text-muted prepend-left-10" - > - <icon - name="question" - /> + <span v-popover="$options.popoverOptions" class="form-text text-muted prepend-left-10"> + <icon name="question" /> </span> </li> </ul> @@ -97,22 +89,13 @@ export default { <div class="ide-commit-message-highlights-container"> <div :style="{ - transform: `translate3d(0, ${-scrollTop}px, 0)` + transform: `translate3d(0, ${-scrollTop}px, 0)`, }" class="note-textarea highlights monospace" > - <div - v-for="(line, index) in allLines" - :key="index" - > - <span - v-text="line.text" - > - </span><mark - v-show="line.highlightedText" - v-text="line.highlightedText" - > - </mark> + <div v-for="(line, index) in allLines" :key="index"> + <span v-text="line.text"> </span + ><mark v-show="line.highlightedText" v-text="line.highlightedText"> </mark> </div> </div> </div> @@ -124,8 +107,8 @@ export default { name="commit-message" @scroll="handleScroll" @input="onInput" - @focus="updateIsFocused(true)" - @blur="updateIsFocused(false)" + @focus="updateIsFocused(true);" + @blur="updateIsFocused(false);" > </textarea> </div> diff --git a/app/assets/javascripts/ide/components/commit_sidebar/radio_group.vue b/app/assets/javascripts/ide/components/commit_sidebar/radio_group.vue index 969e2aa61c4..3525084b1cb 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/radio_group.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/radio_group.vue @@ -56,7 +56,7 @@ export default { v-tooltip :title="tooltipTitle" :class="{ - 'is-disabled': disabled + 'is-disabled': disabled, }" > <input @@ -65,27 +65,18 @@ export default { :disabled="disabled" type="radio" name="commit-action" - @change="updateCommitAction($event.target.value)" + @change="updateCommitAction($event.target.value);" /> <span class="prepend-left-10"> - <span - v-if="label" - class="ide-radio-label" - > - {{ label }} - </span> - <slot v-else></slot> + <span v-if="label" class="ide-radio-label"> {{ label }} </span> <slot v-else></slot> </span> </label> - <div - v-if="commitAction === value && showInput" - class="ide-commit-new-branch" - > + <div v-if="commitAction === value && showInput" class="ide-commit-new-branch"> <input :placeholder="newBranchName" type="text" class="form-control monospace" - @input="updateBranchName($event.target.value)" + @input="updateBranchName($event.target.value);" /> </div> </fieldset> diff --git a/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue b/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue index adf4b479c97..02c2004d495 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/stage_button.vue @@ -38,10 +38,7 @@ export default { </script> <template> - <div - v-once - class="multi-file-discard-btn d-flex" - > + <div v-once class="multi-file-discard-btn d-flex"> <button v-tooltip :aria-label="__('Stage changes')" @@ -51,13 +48,9 @@ export default { data-container="body" data-boundary="viewport" data-placement="bottom" - @click.stop.prevent="stageChange(path)" + @click.stop.prevent="stageChange(path);" > - <icon - :size="16" - name="mobile-issue-close" - class="ml-auto mr-auto" - /> + <icon :size="16" name="mobile-issue-close" class="ml-auto mr-auto" /> </button> <button v-tooltip @@ -70,18 +63,14 @@ export default { data-placement="bottom" @click.stop.prevent="showDiscardModal" > - <icon - :size="16" - name="remove" - class="ml-auto mr-auto" - /> + <icon :size="16" name="remove" class="ml-auto mr-auto" /> </button> <gl-modal :id="modalId" :header-title-text="modalTitle" :footer-primary-button-text="__('Discard changes')" footer-primary-button-variant="danger" - @submit="discardFileChanges(path)" + @submit="discardFileChanges(path);" > {{ __("You will loose all changes you've made to this file. This action cannot be undone.") }} </gl-modal> diff --git a/app/assets/javascripts/ide/components/commit_sidebar/success_message.vue b/app/assets/javascripts/ide/components/commit_sidebar/success_message.vue index a6df91b79c2..b1d5de8682d 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/success_message.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/success_message.vue @@ -9,23 +9,11 @@ export default { </script> <template> - <div - class="multi-file-commit-panel-success-message" - aria-live="assertive" - > - <div class="svg-content svg-80"> - <img - :src="committedStateSvgPath" - alt="" - /> - </div> + <div class="multi-file-commit-panel-success-message" aria-live="assertive"> + <div class="svg-content svg-80"><img :src="committedStateSvgPath" alt="" /></div> <div class="append-right-default prepend-left-default"> - <div - class="text-content text-center" - > - <h4> - {{ __('All changes are committed') }} - </h4> + <div class="text-content text-center"> + <h4>{{ __('All changes are committed') }}</h4> <p v-html="lastCommitMsg"></p> </div> </div> diff --git a/app/assets/javascripts/ide/components/commit_sidebar/unstage_button.vue b/app/assets/javascripts/ide/components/commit_sidebar/unstage_button.vue index 86c40602074..ce41fcdb087 100644 --- a/app/assets/javascripts/ide/components/commit_sidebar/unstage_button.vue +++ b/app/assets/javascripts/ide/components/commit_sidebar/unstage_button.vue @@ -23,10 +23,7 @@ export default { </script> <template> - <div - v-once - class="multi-file-discard-btn d-flex" - > + <div v-once class="multi-file-discard-btn d-flex"> <button v-tooltip :aria-label="__('Unstage changes')" @@ -36,13 +33,9 @@ export default { data-container="body" data-boundary="viewport" data-placement="bottom" - @click.stop.prevent="unstageChange(path)" + @click.stop.prevent="unstageChange(path);" > - <icon - :size="16" - name="redo" - class="ml-auto mr-auto" - /> + <icon :size="16" name="redo" class="ml-auto mr-auto" /> </button> </div> </template> diff --git a/app/assets/javascripts/ide/components/editor_mode_dropdown.vue b/app/assets/javascripts/ide/components/editor_mode_dropdown.vue index 95598c9aca6..5f99261ec39 100644 --- a/app/assets/javascripts/ide/components/editor_mode_dropdown.vue +++ b/app/assets/javascripts/ide/components/editor_mode_dropdown.vue @@ -30,16 +30,8 @@ export default { </script> <template> - <div - class="dropdown" - > - <button - type="button" - class="btn btn-link" - data-toggle="dropdown" - > - {{ __('Edit') }} - </button> + <div class="dropdown"> + <button type="button" class="btn btn-link" data-toggle="dropdown">{{ __('Edit') }}</button> <div class="dropdown-menu dropdown-menu-selectable dropdown-open-left"> <ul> <li> @@ -48,11 +40,9 @@ export default { 'is-active': viewer === $options.viewerTypes.mr, }" href="#" - @click.prevent="changeMode($options.viewerTypes.mr)" + @click.prevent="changeMode($options.viewerTypes.mr);" > - <strong class="dropdown-menu-inner-title"> - {{ mergeReviewLine }} - </strong> + <strong class="dropdown-menu-inner-title"> {{ mergeReviewLine }} </strong> <span class="dropdown-menu-inner-content"> {{ __('Compare changes with the merge request target branch') }} </span> @@ -64,7 +54,7 @@ export default { 'is-active': viewer === $options.viewerTypes.diff, }" href="#" - @click.prevent="changeMode($options.viewerTypes.diff)" + @click.prevent="changeMode($options.viewerTypes.diff);" > <strong class="dropdown-menu-inner-title">{{ __('Reviewing') }}</strong> <span class="dropdown-menu-inner-content"> diff --git a/app/assets/javascripts/ide/components/error_message.vue b/app/assets/javascripts/ide/components/error_message.vue index 11fc15871ac..22113692968 100644 --- a/app/assets/javascripts/ide/components/error_message.vue +++ b/app/assets/javascripts/ide/components/error_message.vue @@ -43,15 +43,9 @@ export default { </script> <template> - <div - class="flash-container flash-container-page" - @click="clickFlash" - > + <div class="flash-container flash-container-page" @click="clickFlash"> <div class="flash-alert"> - <span - v-html="message.text" - > - </span> + <span v-html="message.text"> </span> <button v-if="message.action" type="button" @@ -59,10 +53,7 @@ export default { @click.stop.prevent="clickAction" > {{ message.actionText }} - <gl-loading-icon - v-show="isLoading" - inline - /> + <gl-loading-icon v-show="isLoading" inline /> </button> </div> </div> diff --git a/app/assets/javascripts/ide/components/external_link.vue b/app/assets/javascripts/ide/components/external_link.vue index e24fe5bbccb..954f84cea17 100644 --- a/app/assets/javascripts/ide/components/external_link.vue +++ b/app/assets/javascripts/ide/components/external_link.vue @@ -20,10 +20,7 @@ export default { </script> <template> - <div - v-if="showButtons" - class="pull-right ide-btn-group" - > + <div v-if="showButtons" class="pull-right ide-btn-group"> <a :href="file.permalink" :title="s__('IDE|Open in file view')" @@ -31,11 +28,7 @@ export default { rel="noopener noreferrer" > <span class="vertical-align-middle">Open in file view</span> - <icon - :size="16" - name="external-link" - css-classes="vertical-align-middle space-right" - /> + <icon :size="16" name="external-link" css-classes="vertical-align-middle space-right" /> </a> </div> </template> diff --git a/app/assets/javascripts/ide/components/file_finder/index.vue b/app/assets/javascripts/ide/components/file_finder/index.vue index 760ed8654ee..bb391912572 100644 --- a/app/assets/javascripts/ide/components/file_finder/index.vue +++ b/app/assets/javascripts/ide/components/file_finder/index.vue @@ -164,13 +164,8 @@ export default { </script> <template> - <div - class="ide-file-finder-overlay" - @mousedown.self="toggleFileFinder(false)" - > - <div - class="dropdown-menu diff-file-changes ide-file-finder show" - > + <div class="ide-file-finder-overlay" @mousedown.self="toggleFileFinder(false);"> + <div class="dropdown-menu diff-file-changes ide-file-finder show"> <div class="dropdown-input"> <input ref="searchInput" @@ -179,12 +174,12 @@ export default { type="search" class="dropdown-input-field" autocomplete="off" - @keydown="onKeydown($event)" - @keyup="onKeyup($event)" + @keydown="onKeydown($event);" + @keyup="onKeyup($event);" /> <i :class="{ - hidden: showClearInputButton + hidden: showClearInputButton, }" aria-hidden="true" class="fa fa-search dropdown-input-search" @@ -192,7 +187,7 @@ export default { <i :aria-label="__('Clear search input')" :class="{ - show: showClearInputButton + show: showClearInputButton, }" role="button" class="fa fa-times dropdown-input-clear" @@ -200,17 +195,9 @@ export default { ></i> </div> <div> - <virtual-list - ref="virtualScrollList" - :size="listHeight" - :remain="listShowCount" - wtag="ul" - > + <virtual-list ref="virtualScrollList" :size="listHeight" :remain="listShowCount" wtag="ul"> <template v-if="filteredBlobsLength"> - <li - v-for="(file, index) in filteredBlobs" - :key="file.key" - > + <li v-for="(file, index) in filteredBlobs" :key="file.key"> <item :file="file" :search-text="searchText" @@ -223,10 +210,7 @@ export default { /> </li> </template> - <li - v-else - class="dropdown-menu-empty-item" - > + <li v-else class="dropdown-menu-empty-item"> <div class="append-right-default prepend-left-default prepend-top-8 append-bottom-8"> <template v-if="loading"> {{ __('Loading...') }} diff --git a/app/assets/javascripts/ide/components/file_finder/item.vue b/app/assets/javascripts/ide/components/file_finder/item.vue index 72ce37be63a..83e80d50aff 100644 --- a/app/assets/javascripts/ide/components/file_finder/item.vue +++ b/app/assets/javascripts/ide/components/file_finder/item.vue @@ -74,9 +74,7 @@ export default { css-classes="diff-file-changed-icon append-right-8" /> <span class="diff-changed-file-content append-right-8"> - <strong - class="diff-changed-file-name" - > + <strong class="diff-changed-file-name"> <span v-for="(char, charIndex) in file.name.split('')" :key="charIndex + char" @@ -87,9 +85,7 @@ export default { > </span> </strong> - <span - class="diff-changed-file-path prepend-top-5" - > + <span class="diff-changed-file-path prepend-top-5"> <span v-for="(char, charIndex) in pathWithEllipsis.split('')" :key="charIndex + char" @@ -101,13 +97,8 @@ export default { </span> </span> </span> - <span - v-if="file.changed || file.tempFile" - class="diff-changed-stats" - > - <changed-file-icon - :file="file" - /> + <span v-if="file.changed || file.tempFile" class="diff-changed-stats"> + <changed-file-icon :file="file" /> </span> </button> </template> diff --git a/app/assets/javascripts/ide/components/file_row_extra.vue b/app/assets/javascripts/ide/components/file_row_extra.vue index 2ad14b88410..d6673cf0421 100644 --- a/app/assets/javascripts/ide/components/file_row_extra.vue +++ b/app/assets/javascripts/ide/components/file_row_extra.vue @@ -69,13 +69,8 @@ export default { <template> <div class="float-right ide-file-icon-holder"> - <mr-file-icon - v-if="file.mrChange" - /> - <span - v-if="showTreeChangesCount" - class="ide-tree-changes" - > + <mr-file-icon v-if="file.mrChange" /> + <span v-if="showTreeChangesCount" class="ide-tree-changes"> {{ changesCount }} <icon v-tooltip diff --git a/app/assets/javascripts/ide/components/file_templates/bar.vue b/app/assets/javascripts/ide/components/file_templates/bar.vue index 3587626c580..d459e3b43d3 100644 --- a/app/assets/javascripts/ide/components/file_templates/bar.vue +++ b/app/assets/javascripts/ide/components/file_templates/bar.vue @@ -48,9 +48,7 @@ export default { <template> <div class="d-flex align-items-center ide-file-templates qa-file-templates-bar"> - <strong class="append-right-default"> - {{ __('File templates') }} - </strong> + <strong class="append-right-default"> {{ __('File templates') }} </strong> <dropdown :data="templateTypes" :label="selectedTemplateType.name || __('Choose a type...')" @@ -67,12 +65,7 @@ export default { @click="selectTemplate" /> <transition name="fade"> - <button - v-show="updateSuccess" - type="button" - class="btn btn-default" - @click="undo" - > + <button v-show="updateSuccess" type="button" class="btn btn-default" @click="undo"> {{ __('Undo') }} </button> </transition> diff --git a/app/assets/javascripts/ide/components/file_templates/dropdown.vue b/app/assets/javascripts/ide/components/file_templates/dropdown.vue index 81d8d0b5132..414ea9c7d4d 100644 --- a/app/assets/javascripts/ide/components/file_templates/dropdown.vue +++ b/app/assets/javascripts/ide/components/file_templates/dropdown.vue @@ -75,48 +75,23 @@ export default { <template> <div class="dropdown"> - <dropdown-button - :toggle-text="label" - data-display="static" - /> + <dropdown-button :toggle-text="label" data-display="static" /> <div class="dropdown-menu pb-0"> - <div - v-if="title" - class="dropdown-title ml-0 mr-0" - > - {{ title }} - </div> - <div - v-if="!showLoading && searchable" - class="dropdown-input" - > + <div v-if="title" class="dropdown-title ml-0 mr-0">{{ title }}</div> + <div v-if="!showLoading && searchable" class="dropdown-input"> <input v-model="search" :placeholder="__('Filter...')" type="search" class="dropdown-input-field qa-dropdown-filter-input" /> - <i - aria-hidden="true" - class="fa fa-search dropdown-input-search" - ></i> + <i aria-hidden="true" class="fa fa-search dropdown-input-search"></i> </div> <div class="dropdown-content"> - <gl-loading-icon - v-if="showLoading" - :size="2" - /> + <gl-loading-icon v-if="showLoading" :size="2" /> <ul v-else> - <li - v-for="(item, index) in outputData" - :key="index" - > - <button - type="button" - @click="clickItem(item)" - > - {{ item.name }} - </button> + <li v-for="(item, index) in outputData" :key="index"> + <button type="button" @click="clickItem(item);">{{ item.name }}</button> </li> </ul> </div> diff --git a/app/assets/javascripts/ide/components/ide.vue b/app/assets/javascripts/ide/components/ide.vue index 0a368f6558c..caec8779cac 100644 --- a/app/assets/javascripts/ide/components/ide.vue +++ b/app/assets/javascripts/ide/components/ide.vue @@ -88,27 +88,13 @@ export default { <template> <article class="ide position-relative d-flex flex-column align-items-stretch"> - <error-message - v-if="errorMessage" - :message="errorMessage" - /> - <div - class="ide-view flex-grow d-flex" - > - <find-file - v-show="fileFindVisible" - /> + <error-message v-if="errorMessage" :message="errorMessage" /> + <div class="ide-view flex-grow d-flex"> + <find-file v-show="fileFindVisible" /> <ide-sidebar /> - <div - class="multi-file-edit-pane" - > - <template - v-if="activeFile" - > - <commit-editor-header - v-if="isCommitModeActive" - :active-file="activeFile" - /> + <div class="multi-file-edit-pane"> + <template v-if="activeFile"> + <commit-editor-header v-if="isCommitModeActive" :active-file="activeFile" /> <repo-tabs v-else :active-file="activeFile" @@ -117,32 +103,20 @@ export default { :has-changes="hasChanges" :merge-request-id="currentMergeRequestId" /> - <repo-editor - :file="activeFile" - class="multi-file-edit-pane-content" - /> + <repo-editor :file="activeFile" class="multi-file-edit-pane-content" /> </template> - <template - v-else - > - <div - v-once - class="ide-empty-state" - > + <template v-else> + <div v-once class="ide-empty-state"> <div class="row js-empty-state"> <div class="col-12"> - <div class="svg-content svg-250"> - <img :src="emptyStateSvgPath" /> - </div> + <div class="svg-content svg-250"><img :src="emptyStateSvgPath" /></div> </div> <div class="col-12"> <div class="text-content text-center"> - <h4> - Welcome to the GitLab IDE - </h4> + <h4>Welcome to the GitLab IDE</h4> <p> - Select a file from the left sidebar to begin editing. - Afterwards, you'll be able to commit your changes. + Select a file from the left sidebar to begin editing. Afterwards, you'll be able + to commit your changes. </p> </div> </div> @@ -150,12 +124,9 @@ export default { </div> </template> </div> - <component - :is="rightPaneComponent" - v-if="currentProjectId" - /> + <component :is="rightPaneComponent" v-if="currentProjectId" /> </div> - <ide-status-bar :file="activeFile"/> + <ide-status-bar :file="activeFile" /> <new-modal /> </article> </template> diff --git a/app/assets/javascripts/ide/components/ide_project_header.vue b/app/assets/javascripts/ide/components/ide_project_header.vue index 6cf190288e8..36bc7c70196 100644 --- a/app/assets/javascripts/ide/components/ide_project_header.vue +++ b/app/assets/javascripts/ide/components/ide_project_header.vue @@ -16,18 +16,10 @@ export default { <template> <div class="context-header ide-context-header"> - <a - :href="project.web_url" - :title="s__('IDE|Go to project')" - > - <project-avatar-default - :project="project" - :size="48" - /> + <a :href="project.web_url" :title="s__('IDE|Go to project')"> + <project-avatar-default :project="project" :size="48" /> <span class="ide-sidebar-project-title"> - <span class="sidebar-context-title"> - {{ project.name }} - </span> + <span class="sidebar-context-title"> {{ project.name }} </span> <span class="sidebar-context-title text-secondary"> {{ project.path_with_namespace }} </span> diff --git a/app/assets/javascripts/ide/components/ide_review.vue b/app/assets/javascripts/ide/components/ide_review.vue index d09c99050fe..901b8892e80 100644 --- a/app/assets/javascripts/ide/components/ide_review.vue +++ b/app/assets/javascripts/ide/components/ide_review.vue @@ -42,13 +42,8 @@ export default { </script> <template> - <ide-tree-list - :viewer-type="viewer" - header-class="ide-review-header" - > - <template - slot="header" - > + <ide-tree-list :viewer-type="viewer" header-class="ide-review-header"> + <template slot="header"> <div class="ide-review-button-holder"> {{ __('Review') }} <editor-mode-dropdown @@ -63,12 +58,12 @@ export default { {{ __('Latest changes') }} </template> <template v-else-if="showMergeRequestText"> - {{ __('Merge request') }} - (<a + {{ __('Merge request') }} (<a v-if="currentMergeRequest" :href="currentMergeRequest.web_url" v-text="mergeRequestId" - ></a>) + ></a + >) </template> </div> </template> diff --git a/app/assets/javascripts/ide/components/ide_side_bar.vue b/app/assets/javascripts/ide/components/ide_side_bar.vue index 6b4849eb6f9..6178d2b1fc7 100644 --- a/app/assets/javascripts/ide/components/ide_side_bar.vue +++ b/app/assets/javascripts/ide/components/ide_side_bar.vue @@ -37,34 +37,21 @@ export default { </script> <template> - <resizable-panel - :collapsible="false" - :initial-width="340" - side="left" - class="flex-column" - > + <resizable-panel :collapsible="false" :initial-width="340" side="left" class="flex-column"> <template v-if="loading"> <div class="multi-file-commit-panel-inner"> - <div - v-for="n in 3" - :key="n" - class="multi-file-loading-container" - > + <div v-for="n in 3" :key="n" class="multi-file-loading-container"> <gl-skeleton-loading /> </div> </div> </template> <template v-else> - <ide-project-header - :project="currentProject" - /> + <ide-project-header :project="currentProject" /> <div class="ide-context-body d-flex flex-fill"> <activity-bar /> <div class="multi-file-commit-panel-inner"> <div class="multi-file-commit-panel-inner-content"> - <component - :is="currentActivityView" - /> + <component :is="currentActivityView" /> </div> <commit-form /> </div> diff --git a/app/assets/javascripts/ide/components/ide_status_bar.vue b/app/assets/javascripts/ide/components/ide_status_bar.vue index a04d09ef374..e2e0acc22b1 100644 --- a/app/assets/javascripts/ide/components/ide_status_bar.vue +++ b/app/assets/javascripts/ide/components/ide_status_bar.vue @@ -79,18 +79,12 @@ export default { <template> <footer class="ide-status-bar"> - <div - v-if="lastCommit" - class="ide-status-branch" - > - <span - v-if="latestPipeline && latestPipeline.details" - class="ide-status-pipeline" - > + <div v-if="lastCommit" class="ide-status-branch"> + <span v-if="latestPipeline && latestPipeline.details" class="ide-status-pipeline"> <button type="button" class="p-0 border-0 h-50" - @click="openRightPane($options.rightSidebarViews.pipelines)" + @click="openRightPane($options.rightSidebarViews.pipelines);" > <ci-icon v-tooltip @@ -99,24 +93,21 @@ export default { /> </button> Pipeline - <a - :href="latestPipeline.details.status.details_path" - class="monospace">#{{ latestPipeline.id }}</a> - {{ latestPipeline.details.status.text }} - for + <a :href="latestPipeline.details.status.details_path" class="monospace" + >#{{ latestPipeline.id }}</a + > + {{ latestPipeline.details.status.text }} for </span> - <icon - name="commit" - /> + <icon name="commit" /> <a v-tooltip :title="lastCommit.message" :href="getCommitPath(lastCommit.short_id)" class="commit-sha" - >{{ lastCommit.short_id }}</a> - by - {{ lastCommit.author_name }} + >{{ lastCommit.short_id }}</a + > + by {{ lastCommit.author_name }} <time v-tooltip :datetime="lastCommit.committed_date" @@ -127,28 +118,11 @@ export default { {{ lastCommitFormatedAge }} </time> </div> - <div - v-if="file" - class="ide-status-file" - > - {{ file.name }} - </div> - <div - v-if="file" - class="ide-status-file" - > - {{ file.eol }} - </div> - <div - v-if="file && !file.binary" - class="ide-status-file"> + <div v-if="file" class="ide-status-file">{{ file.name }}</div> + <div v-if="file" class="ide-status-file">{{ file.eol }}</div> + <div v-if="file && !file.binary" class="ide-status-file"> {{ file.editorRow }}:{{ file.editorColumn }} </div> - <div - v-if="file" - class="ide-status-file" - > - {{ file.fileLanguage }} - </div> + <div v-if="file" class="ide-status-file">{{ file.fileLanguage }}</div> </footer> </template> diff --git a/app/assets/javascripts/ide/components/ide_tree.vue b/app/assets/javascripts/ide/components/ide_tree.vue index 9f9e638f1aa..9fc21adae7c 100644 --- a/app/assets/javascripts/ide/components/ide_tree.vue +++ b/app/assets/javascripts/ide/components/ide_tree.vue @@ -34,12 +34,8 @@ export default { </script> <template> - <ide-tree-list - viewer-type="editor" - > - <template - slot="header" - > + <ide-tree-list viewer-type="editor"> + <template slot="header"> {{ __('Edit') }} <div class="ide-tree-actions ml-auto d-flex"> <new-entry-button @@ -47,7 +43,7 @@ export default { :show-label="false" class="d-flex border-0 p-0 mr-3 qa-new-file" icon="doc-new" - @click="openNewEntryModal({ type: 'blob' })" + @click="openNewEntryModal({ type: 'blob' });" /> <upload :show-label="false" @@ -60,7 +56,7 @@ export default { :show-label="false" class="d-flex border-0 p-0" icon="folder-new" - @click="openNewEntryModal({ type: 'tree' })" + @click="openNewEntryModal({ type: 'tree' });" /> </div> </template> diff --git a/app/assets/javascripts/ide/components/ide_tree_list.vue b/app/assets/javascripts/ide/components/ide_tree_list.vue index 12ed7f86b3d..81374f26645 100644 --- a/app/assets/javascripts/ide/components/ide_tree_list.vue +++ b/app/assets/javascripts/ide/components/ide_tree_list.vue @@ -42,29 +42,18 @@ export default { </script> <template> - <div - class="ide-file-list qa-file-list" - > + <div class="ide-file-list qa-file-list"> <template v-if="showLoading"> - <div - v-for="n in 3" - :key="n" - class="multi-file-loading-container" - > + <div v-for="n in 3" :key="n" class="multi-file-loading-container"> <gl-skeleton-loading /> </div> </template> <template v-else> - <header - :class="headerClass" - class="ide-tree-header" - > + <header :class="headerClass" class="ide-tree-header"> <nav-dropdown /> <slot name="header"></slot> </header> - <div - class="ide-tree-body h-100" - > + <div class="ide-tree-body h-100"> <file-row v-for="file in currentTree.tree" :key="file.key" diff --git a/app/assets/javascripts/ide/components/jobs/detail.vue b/app/assets/javascripts/ide/components/jobs/detail.vue index f884c26ed6a..e8fe5fc696d 100644 --- a/app/assets/javascripts/ide/components/jobs/detail.vue +++ b/app/assets/javascripts/ide/components/jobs/detail.vue @@ -75,20 +75,12 @@ export default { <template> <div class="ide-pipeline build-page d-flex flex-column flex-fill"> <header class="ide-job-header d-flex align-items-center"> - <button - class="btn btn-default btn-sm d-flex" - @click="setDetailJob(null)" - > - <icon - name="chevron-left" - /> - {{ __('View jobs') }} + <button class="btn btn-default btn-sm d-flex" @click="setDetailJob(null);"> + <icon name="chevron-left" /> {{ __('View jobs') }} </button> </header> <div class="top-bar d-flex border-left-0"> - <job-description - :job="detailJob" - /> + <job-description :job="detailJob" /> <div class="controllers ml-auto"> <a v-tooltip @@ -99,28 +91,13 @@ export default { class="controllers-buttons" target="_blank" > - <i - aria-hidden="true" - class="fa fa-file-text-o" - ></i> + <i aria-hidden="true" class="fa fa-file-text-o"></i> </a> - <scroll-button - :disabled="isScrolledToTop" - direction="up" - @click="scrollUp" - /> - <scroll-button - :disabled="isScrolledToBottom" - direction="down" - @click="scrollDown" - /> + <scroll-button :disabled="isScrolledToTop" direction="up" @click="scrollUp" /> + <scroll-button :disabled="isScrolledToBottom" direction="down" @click="scrollDown" /> </div> </div> - <pre - ref="buildTrace" - class="build-trace mb-0 h-100" - @scroll="scrollBuildLog" - > + <pre ref="buildTrace" class="build-trace mb-0 h-100" @scroll="scrollBuildLog"> <code v-show="!detailJob.isLoading" class="bash" diff --git a/app/assets/javascripts/ide/components/jobs/detail/description.vue b/app/assets/javascripts/ide/components/jobs/detail/description.vue index 7e24974f7e5..7280fba9e7a 100644 --- a/app/assets/javascripts/ide/components/jobs/detail/description.vue +++ b/app/assets/javascripts/ide/components/jobs/detail/description.vue @@ -23,24 +23,11 @@ export default { <template> <div class="d-flex align-items-center"> - <ci-icon - :status="job.status" - :borderless="true" - :size="24" - class="d-flex" - /> + <ci-icon :status="job.status" :borderless="true" :size="24" class="d-flex" /> <span class="prepend-left-8"> {{ job.name }} - <a - :href="job.path" - target="_blank" - class="ide-external-link" - > - {{ jobId }} - <icon - :size="12" - name="external-link" - /> + <a :href="job.path" target="_blank" class="ide-external-link"> + {{ jobId }} <icon :size="12" name="external-link" /> </a> </span> </div> diff --git a/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue b/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue index 103a407987f..5674d3ffa80 100644 --- a/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue +++ b/app/assets/javascripts/ide/components/jobs/detail/scroll_button.vue @@ -58,9 +58,7 @@ export default { type="button" @click="clickedScroll" > - <icon - :name="iconName" - /> + <icon :name="iconName" /> </button> </div> </template> diff --git a/app/assets/javascripts/ide/components/jobs/item.vue b/app/assets/javascripts/ide/components/jobs/item.vue index 7f4695a0451..be8bf77bba0 100644 --- a/app/assets/javascripts/ide/components/jobs/item.vue +++ b/app/assets/javascripts/ide/components/jobs/item.vue @@ -26,17 +26,9 @@ export default { <template> <div class="ide-job-item"> - <job-description - :job="job" - class="append-right-default" - /> + <job-description :job="job" class="append-right-default" /> <div class="ml-auto align-self-center"> - <button - v-if="job.started" - type="button" - class="btn btn-default btn-sm" - @click="clickViewLog" - > + <button v-if="job.started" type="button" class="btn btn-default btn-sm" @click="clickViewLog"> {{ __('View log') }} </button> </div> diff --git a/app/assets/javascripts/ide/components/jobs/list.vue b/app/assets/javascripts/ide/components/jobs/list.vue index e3626f60899..2cb5050c3f0 100644 --- a/app/assets/javascripts/ide/components/jobs/list.vue +++ b/app/assets/javascripts/ide/components/jobs/list.vue @@ -26,11 +26,7 @@ export default { <template> <div> - <gl-loading-icon - v-if="loading && !stages.length" - :size="2" - class="prepend-top-default" - /> + <gl-loading-icon v-if="loading && !stages.length" :size="2" class="prepend-top-default" /> <template v-else> <stage v-for="stage in stages" diff --git a/app/assets/javascripts/ide/components/jobs/stage.vue b/app/assets/javascripts/ide/components/jobs/stage.vue index e4fc78afaf2..b1be25ea602 100644 --- a/app/assets/javascripts/ide/components/jobs/stage.vue +++ b/app/assets/javascripts/ide/components/jobs/stage.vue @@ -56,20 +56,15 @@ export default { </script> <template> - <div - class="ide-stage card prepend-top-default" - > + <div class="ide-stage card prepend-top-default"> <div :class="{ - 'border-bottom-0': stage.isCollapsed + 'border-bottom-0': stage.isCollapsed, }" class="card-header" @click="toggleCollapsed" > - <ci-icon - :status="stage.status" - :size="24" - /> + <ci-icon :status="stage.status" :size="24" /> <strong ref="stageTitle" v-tooltip="showTooltip" @@ -79,33 +74,15 @@ export default { > {{ stage.name }} </strong> - <div - v-if="!stage.isLoading || stage.jobs.length" - class="append-right-8 prepend-left-4" - > - <span class="badge badge-pill"> - {{ jobsCount }} - </span> + <div v-if="!stage.isLoading || stage.jobs.length" class="append-right-8 prepend-left-4"> + <span class="badge badge-pill"> {{ jobsCount }} </span> </div> - <icon - :name="collapseIcon" - css-classes="ide-stage-collapse-icon" - /> + <icon :name="collapseIcon" css-classes="ide-stage-collapse-icon" /> </div> - <div - v-show="!stage.isCollapsed" - class="card-body" - > - <gl-loading-icon - v-if="showLoadingIcon" - /> + <div v-show="!stage.isCollapsed" class="card-body"> + <gl-loading-icon v-if="showLoadingIcon" /> <template v-else> - <item - v-for="job in stage.jobs" - :key="job.id" - :job="job" - @clickViewLog="clickViewLog" - /> + <item v-for="job in stage.jobs" :key="job.id" :job="job" @clickViewLog="clickViewLog" /> </template> </div> </div> diff --git a/app/assets/javascripts/ide/components/merge_requests/info.vue b/app/assets/javascripts/ide/components/merge_requests/info.vue index 199d2e74971..73ec992466c 100644 --- a/app/assets/javascripts/ide/components/merge_requests/info.vue +++ b/app/assets/javascripts/ide/components/merge_requests/info.vue @@ -19,13 +19,8 @@ export default { <template> <div class="ide-merge-request-info h-100 d-flex flex-column"> <div class="detail-page-header"> - <icon - name="git-merge" - class="align-self-center append-right-8" - /> - <strong> - !{{ currentMergeRequest.iid }} - </strong> + <icon name="git-merge" class="align-self-center append-right-8" /> + <strong> !{{ currentMergeRequest.iid }} </strong> </div> <div class="issuable-details"> <title-component diff --git a/app/assets/javascripts/ide/components/merge_requests/item.vue b/app/assets/javascripts/ide/components/merge_requests/item.vue index 0c4ea80ba08..60889c893cf 100644 --- a/app/assets/javascripts/ide/components/merge_requests/item.vue +++ b/app/assets/javascripts/ide/components/merge_requests/item.vue @@ -40,24 +40,13 @@ export default { </script> <template> - <a - :href="mergeRequestHref" - class="btn-link d-flex align-items-center" - > + <a :href="mergeRequestHref" class="btn-link d-flex align-items-center"> <span class="d-flex append-right-default ide-search-list-current-icon"> - <icon - v-if="isActive" - :size="18" - name="mobile-issue-close" - /> + <icon v-if="isActive" :size="18" name="mobile-issue-close" /> </span> <span> - <strong> - {{ item.title }} - </strong> - <span class="ide-merge-request-project-path d-block mt-1"> - {{ pathWithID }} - </span> + <strong> {{ item.title }} </strong> + <span class="ide-merge-request-project-path d-block mt-1"> {{ pathWithID }} </span> </span> </a> </template> diff --git a/app/assets/javascripts/ide/components/merge_requests/list.vue b/app/assets/javascripts/ide/components/merge_requests/list.vue index 4df29590b85..ac2b0eddfb4 100644 --- a/app/assets/javascripts/ide/components/merge_requests/list.vue +++ b/app/assets/javascripts/ide/components/merge_requests/list.vue @@ -84,13 +84,9 @@ export default { :placeholder="__('Search merge requests')" @focus="onSearchFocus" @input="searchMergeRequests" - @removeToken="setSearchType(null)" - /> - <icon - :size="18" - name="search" - class="input-icon" + @removeToken="setSearchType(null);" /> + <icon :size="18" name="search" class="input-icon" /> </div> </div> <div class="dropdown-content ide-merge-requests-dropdown-content d-flex"> @@ -100,36 +96,23 @@ export default { class="mt-3 mb-3 align-self-center ml-auto mr-auto" /> <template v-else> - <ul - class="mb-3 w-100" - > + <ul class="mb-3 w-100"> <template v-if="showSearchTypes"> - <li - v-for="searchType in $options.searchTypes" - :key="searchType.type" - > + <li v-for="searchType in $options.searchTypes" :key="searchType.type"> <button type="button" class="btn-link d-flex align-items-center" - @click.stop="setSearchType(searchType)" + @click.stop="setSearchType(searchType);" > <span class="d-flex append-right-default ide-search-list-current-icon"> - <icon - :size="18" - name="search" - /> - </span> - <span> - {{ searchType.label }} + <icon :size="18" name="search" /> </span> + <span> {{ searchType.label }} </span> </button> </li> </template> <template v-else-if="hasMergeRequests"> - <li - v-for="item in mergeRequests" - :key="item.id" - > + <li v-for="item in mergeRequests" :key="item.id"> <item :item="item" :current-id="currentMergeRequestId" @@ -137,10 +120,7 @@ export default { /> </li> </template> - <li - v-else - class="ide-search-list-empty d-flex align-items-center justify-content-center" - > + <li v-else class="ide-search-list-empty d-flex align-items-center justify-content-center"> {{ __('No merge requests found') }} </li> </ul> diff --git a/app/assets/javascripts/ide/components/nav_dropdown.vue b/app/assets/javascripts/ide/components/nav_dropdown.vue index db36779c395..e45d2a62dae 100644 --- a/app/assets/javascripts/ide/components/nav_dropdown.vue +++ b/app/assets/javascripts/ide/components/nav_dropdown.vue @@ -43,17 +43,8 @@ export default { </script> <template> - <div - ref="dropdown" - class="btn-group ide-nav-dropdown dropdown" - > + <div ref="dropdown" class="btn-group ide-nav-dropdown dropdown"> <nav-dropdown-button /> - <div - class="dropdown-menu dropdown-menu-left p-0" - > - <nav-form - v-if="isVisibleDropdown" - /> - </div> + <div class="dropdown-menu dropdown-menu-left p-0"><nav-form v-if="isVisibleDropdown" /></div> </div> </template> diff --git a/app/assets/javascripts/ide/components/nav_dropdown_button.vue b/app/assets/javascripts/ide/components/nav_dropdown_button.vue index 6cee4e9a8f0..f1d44443125 100644 --- a/app/assets/javascripts/ide/components/nav_dropdown_button.vue +++ b/app/assets/javascripts/ide/components/nav_dropdown_button.vue @@ -24,27 +24,12 @@ export default { <template> <dropdown-button> - <span - class="row" - > - <span - class="col-7 text-truncate" - > - <icon - :size="16" - :aria-label="__('Current Branch')" - name="branch" - /> - {{ branchLabel }} + <span class="row"> + <span class="col-7 text-truncate"> + <icon :size="16" :aria-label="__('Current Branch')" name="branch" /> {{ branchLabel }} </span> - <span - class="col-5 pl-0 text-truncate" - > - <icon - :size="16" - :aria-label="__('Merge Request')" - name="merge-request" - /> + <span class="col-5 pl-0 text-truncate"> + <icon :size="16" :aria-label="__('Merge Request')" name="merge-request" /> {{ mergeRequestLabel }} </span> </span> diff --git a/app/assets/javascripts/ide/components/nav_form.vue b/app/assets/javascripts/ide/components/nav_form.vue index 718b836e11c..23c068f329d 100644 --- a/app/assets/javascripts/ide/components/nav_form.vue +++ b/app/assets/javascripts/ide/components/nav_form.vue @@ -15,15 +15,9 @@ export default { </script> <template> - <div - class="ide-nav-form p-0" - > - <tabs - stop-propagation - > - <tab - active - > + <div class="ide-nav-form p-0"> + <tabs stop-propagation> + <tab active> <template slot="title"> {{ __('Merge Requests') }} </template> diff --git a/app/assets/javascripts/ide/components/new_dropdown/button.vue b/app/assets/javascripts/ide/components/new_dropdown/button.vue index aa5fce59dbf..062a64a19d7 100644 --- a/app/assets/javascripts/ide/components/new_dropdown/button.vue +++ b/app/assets/javascripts/ide/components/new_dropdown/button.vue @@ -52,10 +52,7 @@ export default { class="btn-blank" @click.stop.prevent="clicked" > - <icon - :name="icon" - :css-classes="iconClasses" - /> + <icon :name="icon" :css-classes="iconClasses" /> <template v-if="showLabel"> {{ label }} </template> diff --git a/app/assets/javascripts/ide/components/new_dropdown/index.vue b/app/assets/javascripts/ide/components/new_dropdown/index.vue index f02fd6cf7ea..a50d729036f 100644 --- a/app/assets/javascripts/ide/components/new_dropdown/index.vue +++ b/app/assets/javascripts/ide/components/new_dropdown/index.vue @@ -73,19 +73,11 @@ export default { :aria-label="__('Create new file or directory')" type="button" class="rounded border-0 d-flex ide-entry-dropdown-toggle" - @click.stop="openDropdown()" + @click.stop="openDropdown();" > - <icon - name="ellipsis_v" - /> - <icon - name="arrow-down" - /> + <icon name="ellipsis_v" /> <icon name="arrow-down" /> </button> - <ul - ref="dropdownMenu" - class="dropdown-menu dropdown-menu-right" - > + <ul ref="dropdownMenu" class="dropdown-menu dropdown-menu-right"> <template v-if="type === 'tree'"> <li> <item-button @@ -93,22 +85,17 @@ export default { class="d-flex" icon="doc-new" icon-classes="mr-2" - @click="createNewItem('blob')" - /> - </li> - <li> - <upload - :path="path" - @create="createTempEntry" + @click="createNewItem('blob');" /> </li> + <li><upload :path="path" @create="createTempEntry" /></li> <li> <item-button :label="__('New directory')" class="d-flex" icon="folder-new" icon-classes="mr-2" - @click="createNewItem($options.modalTypes.tree)" + @click="createNewItem($options.modalTypes.tree);" /> </li> <li class="divider"></li> @@ -119,7 +106,7 @@ export default { class="d-flex" icon="pencil" icon-classes="mr-2" - @click="createNewItem($options.modalTypes.rename)" + @click="createNewItem($options.modalTypes.rename);" /> </li> <li> @@ -128,7 +115,7 @@ export default { class="d-flex" icon="remove" icon-classes="mr-2" - @click="deleteEntry(path)" + @click="deleteEntry(path);" /> </li> </ul> diff --git a/app/assets/javascripts/ide/components/new_dropdown/modal.vue b/app/assets/javascripts/ide/components/new_dropdown/modal.vue index f0a04011a3e..63cbf41b89b 100644 --- a/app/assets/javascripts/ide/components/new_dropdown/modal.vue +++ b/app/assets/javascripts/ide/components/new_dropdown/modal.vue @@ -99,12 +99,8 @@ export default { @open="focusInput" @closed="closedModal" > - <div - class="form-group row" - > - <label class="label-bold col-form-label col-sm-2"> - {{ __('Name') }} - </label> + <div class="form-group row"> + <label class="label-bold col-form-label col-sm-2"> {{ __('Name') }} </label> <div class="col-sm-10"> <input ref="fieldName" @@ -113,19 +109,12 @@ export default { class="form-control qa-full-file-path" placeholder="/dir/file_name" /> - <ul - v-if="isCreatingNew" - class="prepend-top-default list-inline qa-template-list" - > - <li - v-for="(template, index) in templateTypes" - :key="index" - class="list-inline-item" - > + <ul v-if="isCreatingNew" class="prepend-top-default list-inline qa-template-list"> + <li v-for="(template, index) in templateTypes" :key="index" class="list-inline-item"> <button type="button" class="btn btn-missing p-1 pr-2 pl-2" - @click="createFromTemplate(template)" + @click="createFromTemplate(template);" > {{ template.name }} </button> diff --git a/app/assets/javascripts/ide/components/panes/right.vue b/app/assets/javascripts/ide/components/panes/right.vue index 10aa96dffaf..e318367a5ec 100644 --- a/app/assets/javascripts/ide/components/panes/right.vue +++ b/app/assets/javascripts/ide/components/panes/right.vue @@ -89,9 +89,7 @@ export default { </script> <template> - <div - class="multi-file-commit-panel ide-right-sidebar" - > + <div class="multi-file-commit-panel ide-right-sidebar"> <resizable-panel v-show="isOpen" :collapsible="false" @@ -112,27 +110,21 @@ export default { </resizable-panel> <nav class="ide-activity-bar"> <ul class="list-unstyled"> - <li - v-for="tab of tabs" - :key="tab.title" - > + <li v-for="tab of tabs" :key="tab.title"> <button v-tooltip :title="tab.title" :aria-label="tab.title" :class="{ - active: isActiveTab(tab) && isOpen + active: isActiveTab(tab) && isOpen, }" data-container="body" data-placement="left" class="ide-sidebar-link is-right" type="button" - @click="clickTab($event, tab)" + @click="clickTab($event, tab);" > - <icon - :size="16" - :name="tab.icon" - /> + <icon :size="16" :name="tab.icon" /> </button> </li> </ul> diff --git a/app/assets/javascripts/ide/components/pipelines/list.vue b/app/assets/javascripts/ide/components/pipelines/list.vue index 36cfcac4186..451c8030e16 100644 --- a/app/assets/javascripts/ide/components/pipelines/list.vue +++ b/app/assets/javascripts/ide/components/pipelines/list.vue @@ -50,34 +50,14 @@ export default { <template> <div class="ide-pipeline"> - <gl-loading-icon - v-if="showLoadingIcon" - :size="2" - class="prepend-top-default" - /> + <gl-loading-icon v-if="showLoadingIcon" :size="2" class="prepend-top-default" /> <template v-else-if="latestPipeline !== null"> - <header - v-if="latestPipeline" - class="ide-tree-header ide-pipeline-header" - > - <ci-icon - :status="latestPipeline.details.status" - :size="24" - /> + <header v-if="latestPipeline" class="ide-tree-header ide-pipeline-header"> + <ci-icon :status="latestPipeline.details.status" :size="24" /> <span class="prepend-left-8"> - <strong> - {{ __('Pipeline') }} - </strong> - <a - :href="latestPipeline.path" - target="_blank" - class="ide-external-link" - > - #{{ latestPipeline.id }} - <icon - :size="12" - name="external-link" - /> + <strong> {{ __('Pipeline') }} </strong> + <a :href="latestPipeline.path" target="_blank" class="ide-external-link"> + #{{ latestPipeline.id }} <icon :size="12" name="external-link" /> </a> </span> </header> @@ -87,58 +67,25 @@ export default { :empty-state-svg-path="pipelinesEmptyStateSvgPath" :can-set-ci="true" /> - <div - v-else-if="latestPipeline.yamlError" - class="bs-callout bs-callout-danger" - > - <p class="append-bottom-0"> - {{ __('Found errors in your .gitlab-ci.yml:') }} - </p> - <p class="append-bottom-0 break-word"> - {{ latestPipeline.yamlError }} - </p> - <p - class="append-bottom-0" - v-html="ciLintText" - ></p> + <div v-else-if="latestPipeline.yamlError" class="bs-callout bs-callout-danger"> + <p class="append-bottom-0">{{ __('Found errors in your .gitlab-ci.yml:') }}</p> + <p class="append-bottom-0 break-word">{{ latestPipeline.yamlError }}</p> + <p class="append-bottom-0" v-html="ciLintText"></p> </div> - <tabs - v-else - class="ide-pipeline-list" - > - <tab - :active="!pipelineFailed" - > + <tabs v-else class="ide-pipeline-list"> + <tab :active="!pipelineFailed"> <template slot="title"> {{ __('Jobs') }} - <span - v-if="jobsCount" - class="badge badge-pill" - > - {{ jobsCount }} - </span> + <span v-if="jobsCount" class="badge badge-pill"> {{ jobsCount }} </span> </template> - <jobs-list - :loading="isLoadingJobs" - :stages="stages" - /> + <jobs-list :loading="isLoadingJobs" :stages="stages" /> </tab> - <tab - :active="pipelineFailed" - > + <tab :active="pipelineFailed"> <template slot="title"> {{ __('Failed Jobs') }} - <span - v-if="failedJobsCount" - class="badge badge-pill" - > - {{ failedJobsCount }} - </span> + <span v-if="failedJobsCount" class="badge badge-pill"> {{ failedJobsCount }} </span> </template> - <jobs-list - :loading="isLoadingJobs" - :stages="failedStages" - /> + <jobs-list :loading="isLoadingJobs" :stages="failedStages" /> </tab> </tabs> </template> diff --git a/app/assets/javascripts/ide/components/preview/clientside.vue b/app/assets/javascripts/ide/components/preview/clientside.vue index afc0cfca7d8..c98dda00817 100644 --- a/app/assets/javascripts/ide/components/preview/clientside.vue +++ b/app/assets/javascripts/ide/components/preview/clientside.vue @@ -146,9 +146,7 @@ export default { <template> <div class="preview h-100 w-100 d-flex flex-column"> <template v-if="showPreview"> - <navigator - :manager="manager" - /> + <navigator :manager="manager" /> <div id="ide-preview"></div> </template> <div @@ -156,15 +154,8 @@ export default { v-once class="d-flex h-100 flex-column align-items-center justify-content-center svg-content" > - <img - :src="promotionSvgPath" - :alt="s__('IDE|Live Preview')" - width="130" - height="100" - /> - <h3> - {{ s__('IDE|Live Preview') }} - </h3> + <img :src="promotionSvgPath" :alt="s__('IDE|Live Preview')" width="130" height="100" /> + <h3>{{ s__('IDE|Live Preview') }}</h3> <p class="text-center"> {{ s__('IDE|Preview your web application using Web IDE client-side evaluation.') }} </p> @@ -177,10 +168,6 @@ export default { {{ s__('IDE|Get started with Live Preview') }} </a> </div> - <gl-loading-icon - v-else - :size="2" - class="align-self-center mt-auto mb-auto" - /> + <gl-loading-icon v-else :size="2" class="align-self-center mt-auto mb-auto" /> </div> </template> diff --git a/app/assets/javascripts/ide/components/preview/navigator.vue b/app/assets/javascripts/ide/components/preview/navigator.vue index cc6fc595b74..bc80e1dba25 100644 --- a/app/assets/javascripts/ide/components/preview/navigator.vue +++ b/app/assets/javascripts/ide/components/preview/navigator.vue @@ -91,33 +91,25 @@ export default { :aria-label="s__('IDE|Back')" :disabled="backButtonDisabled" :class="{ - 'disabled-content': backButtonDisabled + 'disabled-content': backButtonDisabled, }" type="button" class="ide-navigator-btn d-flex align-items-center d-transparent border-0 bg-transparent" @click="back" > - <icon - :size="24" - name="chevron-left" - class="m-auto" - /> + <icon :size="24" name="chevron-left" class="m-auto" /> </button> <button :aria-label="s__('IDE|Back')" :disabled="forwardButtonDisabled" :class="{ - 'disabled-content': forwardButtonDisabled + 'disabled-content': forwardButtonDisabled, }" type="button" class="ide-navigator-btn d-flex align-items-center d-transparent border-0 bg-transparent" @click="forward" > - <icon - :size="24" - name="chevron-right" - class="m-auto" - /> + <icon :size="24" name="chevron-right" class="m-auto" /> </button> <button :aria-label="s__('IDE|Refresh preview')" @@ -125,11 +117,7 @@ export default { class="ide-navigator-btn d-flex align-items-center d-transparent border-0 bg-transparent" @click="refresh" > - <icon - :size="18" - name="retry" - class="m-auto" - /> + <icon :size="18" name="retry" class="m-auto" /> </button> <div class="position-relative w-100 prepend-left-4"> <input @@ -138,10 +126,7 @@ export default { class="ide-navigator-location form-control bg-white" readonly /> - <gl-loading-icon - v-if="loading" - class="position-absolute ide-preview-loading-icon" - /> + <gl-loading-icon v-if="loading" class="position-absolute ide-preview-loading-icon" /> </div> </header> </template> diff --git a/app/assets/javascripts/ide/components/repo_commit_section.vue b/app/assets/javascripts/ide/components/repo_commit_section.vue index 5e86876c1c1..8dd88f187d4 100644 --- a/app/assets/javascripts/ide/components/repo_commit_section.vue +++ b/app/assets/javascripts/ide/components/repo_commit_section.vue @@ -71,9 +71,7 @@ export default { </script> <template> - <div - class="multi-file-commit-panel-section" - > + <div class="multi-file-commit-panel-section"> <deprecated-modal id="ide-create-branch-modal" :primary-button-label="__('Create new branch')" @@ -82,13 +80,13 @@ export default { @submit="forceCreateNewBranch" > <template slot="body"> - {{ __(`This branch has changed since you started editing. - Would you like to create a new branch?`) }} + {{ + __(`This branch has changed since you started editing. + Would you like to create a new branch?`) + }} </template> </deprecated-modal> - <template - v-if="showStageUnstageArea" - > + <template v-if="showStageUnstageArea"> <commit-files-list :title="__('Unstaged')" :key-prefix="$options.stageKeys.unstaged" @@ -116,8 +114,6 @@ export default { icon-name="staged" /> </template> - <empty-state - v-if="unusedSeal" - /> + <empty-state v-if="unusedSeal" /> </div> </template> diff --git a/app/assets/javascripts/ide/components/repo_editor.vue b/app/assets/javascripts/ide/components/repo_editor.vue index 7b0f717962e..c13d3ec094b 100644 --- a/app/assets/javascripts/ide/components/repo_editor.vue +++ b/app/assets/javascripts/ide/components/repo_editor.vue @@ -212,20 +212,15 @@ export default { </script> <template> - <div - id="ide" - class="blob-viewer-container blob-editor-container" - > + <div id="ide" class="blob-viewer-container blob-editor-container"> <div class="ide-mode-tabs clearfix"> - <ul - v-if="!shouldHideEditor && isEditModeActive" - class="nav-links float-left" - > + <ul v-if="!shouldHideEditor && isEditModeActive" class="nav-links float-left"> <li :class="editTabCSS"> <a href="javascript:void(0);" role="button" - @click.prevent="setFileViewMode({ file, viewMode: 'editor' })"> + @click.prevent="setFileViewMode({ file, viewMode: 'editor' });" + > <template v-if="viewer === $options.viewerTypes.edit"> {{ __('Edit') }} </template> @@ -234,41 +229,36 @@ export default { </template> </a> </li> - <li - v-if="file.previewMode" - :class="previewTabCSS"> + <li v-if="file.previewMode" :class="previewTabCSS"> <a href="javascript:void(0);" role="button" - @click.prevent="setFileViewMode({ file, viewMode:'preview' })"> + @click.prevent="setFileViewMode({ file, viewMode: 'preview' });" + > {{ file.previewMode.previewTitle }} </a> </li> </ul> - <external-link - :file="file" - /> + <external-link :file="file" /> </div> - <file-templates-bar - v-if="showFileTemplatesBar(file.name)" - /> + <file-templates-bar v-if="showFileTemplatesBar(file.name)" /> <div - v-show="!shouldHideEditor && file.viewMode ==='editor'" + v-show="!shouldHideEditor && file.viewMode === 'editor'" ref="editor" :class="{ 'is-readonly': isCommitModeActive, 'is-deleted': file.deleted, - 'is-added': file.tempFile + 'is-added': file.tempFile, }" class="multi-file-editor-holder" - > - </div> + ></div> <content-viewer v-if="showContentViewer" :content="file.content || file.raw" :path="file.rawPath || file.path" :file-size="file.size" - :project-path="file.projectId"/> + :project-path="file.projectId" + /> <diff-viewer v-if="showDiffViewer" :diff-mode="file.mrChange.diffMode" @@ -276,6 +266,7 @@ export default { :new-sha="currentMergeRequest.sha" :old-path="file.mrChange.old_path" :old-sha="currentMergeRequest.baseCommitSha" - :project-path="file.projectId"/> + :project-path="file.projectId" + /> </div> </template> diff --git a/app/assets/javascripts/ide/components/repo_file_status_icon.vue b/app/assets/javascripts/ide/components/repo_file_status_icon.vue index 97589e116c5..a964d90b090 100644 --- a/app/assets/javascripts/ide/components/repo_file_status_icon.vue +++ b/app/assets/javascripts/ide/components/repo_file_status_icon.vue @@ -25,15 +25,7 @@ export default { </script> <template> - <span - v-if="file.file_lock" - v-tooltip - :title="lockTooltip" - data-container="body" - > - <icon - name="lock" - css-classes="file-status-icon" - /> + <span v-if="file.file_lock" v-tooltip :title="lockTooltip" data-container="body"> + <icon name="lock" css-classes="file-status-icon" /> </span> </template> diff --git a/app/assets/javascripts/ide/components/repo_tab.vue b/app/assets/javascripts/ide/components/repo_tab.vue index d621653d6fd..4b87b83db8a 100644 --- a/app/assets/javascripts/ide/components/repo_tab.vue +++ b/app/assets/javascripts/ide/components/repo_tab.vue @@ -72,41 +72,26 @@ export default { <li :class="{ active: tab.active, - disabled: tab.pending + disabled: tab.pending, }" - @click="clickFile(tab)" + @click="clickFile(tab);" @mouseover="mouseOverTab" @mouseout="mouseOutTab" > - <div - :title="tab.url" - class="multi-file-tab" - > - <file-icon - :file-name="tab.name" - :size="16" - /> + <div :title="tab.url" class="multi-file-tab"> + <file-icon :file-name="tab.name" :size="16" /> {{ tab.name }} - <file-status-icon - :file="tab" - /> + <file-status-icon :file="tab" /> </div> <button :aria-label="closeLabel" :disabled="tab.pending" type="button" class="multi-file-tab-close" - @click.stop.prevent="closeFile(tab)" + @click.stop.prevent="closeFile(tab);" > - <icon - v-if="!showChangedIcon" - :size="12" - name="close" - /> - <changed-file-icon - v-else - :file="tab" - /> + <icon v-if="!showChangedIcon" :size="12" name="close" /> + <changed-file-icon v-else :file="tab" /> </button> </li> </template> diff --git a/app/assets/javascripts/ide/components/repo_tabs.vue b/app/assets/javascripts/ide/components/repo_tabs.vue index c12a63e26be..4dbc4383894 100644 --- a/app/assets/javascripts/ide/components/repo_tabs.vue +++ b/app/assets/javascripts/ide/components/repo_tabs.vue @@ -51,15 +51,8 @@ export default { <template> <div class="multi-file-tabs"> - <ul - ref="tabsScroller" - class="list-unstyled append-bottom-0" - > - <repo-tab - v-for="tab in files" - :key="tab.key" - :tab="tab" - /> + <ul ref="tabsScroller" class="list-unstyled append-bottom-0"> + <repo-tab v-for="tab in files" :key="tab.key" :tab="tab" /> </ul> </div> </template> diff --git a/app/assets/javascripts/ide/components/resizable_panel.vue b/app/assets/javascripts/ide/components/resizable_panel.vue index 7277fcb7617..a89de56ab5c 100644 --- a/app/assets/javascripts/ide/components/resizable_panel.vue +++ b/app/assets/javascripts/ide/components/resizable_panel.vue @@ -78,8 +78,8 @@ export default { :min-size="minSize" :max-size="$options.maxSize" :side="side === 'right' ? 'left' : 'right'" - @resize-start="setResizingStatus(true)" - @resize-end="setResizingStatus(false)" + @resize-start="setResizingStatus(true);" + @resize-end="setResizingStatus(false);" /> </div> </template> diff --git a/app/assets/javascripts/ide/components/shared/tokened_input.vue b/app/assets/javascripts/ide/components/shared/tokened_input.vue index 30010957a16..f58e08c2cc9 100644 --- a/app/assets/javascripts/ide/components/shared/tokened_input.vue +++ b/app/assets/javascripts/ide/components/shared/tokened_input.vue @@ -72,31 +72,16 @@ export default { <div class="filtered-search-wrapper"> <div class="filtered-search-box"> <div class="tokens-container list-unstyled"> - <div - v-for="token in tokens" - :key="token.label" - class="filtered-search-token" - > + <div v-for="token in tokens" :key="token.label" class="filtered-search-token"> <button class="selectable btn-blank" type="button" - @click.stop="removeToken(token)" - @keyup.delete="removeToken(token)" + @click.stop="removeToken(token);" + @keyup.delete="removeToken(token);" > - <div - class="value-container rounded" - > - <div - class="value" - >{{ token.label }}</div> - <div - class="remove-token inverted" - > - <icon - :size="10" - name="close" - /> - </div> + <div class="value-container rounded"> + <div class="value">{{ token.label }}</div> + <div class="remove-token inverted"><icon :size="10" name="close" /></div> </div> </button> </div> diff --git a/app/assets/javascripts/ide/stores/actions/file.js b/app/assets/javascripts/ide/stores/actions/file.js index 30dcf7ef4df..a297740bd5f 100644 --- a/app/assets/javascripts/ide/stores/actions/file.js +++ b/app/assets/javascripts/ide/stores/actions/file.js @@ -56,7 +56,10 @@ export const setFileActive = ({ commit, state, getters, dispatch }, path) => { dispatch('scrollToTab'); }; -export const getFileData = ({ state, commit, dispatch }, { path, makeFileActive = true }) => { +export const getFileData = ( + { state, commit, dispatch }, + { path, makeFileActive = true, openFile = makeFileActive }, +) => { const file = state.entries[path]; if (file.raw || (file.tempFile && !file.prevPath)) return Promise.resolve(); @@ -71,8 +74,8 @@ export const getFileData = ({ state, commit, dispatch }, { path, makeFileActive const normalizedHeaders = normalizeHeaders(headers); setPageTitle(decodeURI(normalizedHeaders['PAGE-TITLE'])); - commit(types.SET_FILE_DATA, { data, file }); - if (makeFileActive) commit(types.TOGGLE_FILE_OPEN, path); + if (data) commit(types.SET_FILE_DATA, { data, file }); + if (openFile) commit(types.TOGGLE_FILE_OPEN, path); if (makeFileActive) dispatch('setFileActive', path); commit(types.TOGGLE_LOADING, { entry: file }); }) diff --git a/app/assets/javascripts/ide/stores/actions/merge_request.js b/app/assets/javascripts/ide/stores/actions/merge_request.js index 3ac2f8b3698..8404c6d4f72 100644 --- a/app/assets/javascripts/ide/stores/actions/merge_request.js +++ b/app/assets/javascripts/ide/stores/actions/merge_request.js @@ -161,6 +161,7 @@ export const openMergeRequest = ( dispatch('getFileData', { path: change.new_path, makeFileActive: ind === 0, + openFile: true, }); } } diff --git a/app/assets/javascripts/ide/stores/modules/pipelines/getters.js b/app/assets/javascripts/ide/stores/modules/pipelines/getters.js index f545453806f..ef7cd4ff8e8 100644 --- a/app/assets/javascripts/ide/stores/modules/pipelines/getters.js +++ b/app/assets/javascripts/ide/stores/modules/pipelines/getters.js @@ -6,10 +6,12 @@ export const pipelineFailed = state => state.latestPipeline && state.latestPipeline.details.status.text === states.failed; export const failedStages = state => - state.stages.filter(stage => stage.status.text.toLowerCase() === states.failed).map(stage => ({ - ...stage, - jobs: stage.jobs.filter(job => job.status.text.toLowerCase() === states.failed), - })); + state.stages + .filter(stage => stage.status.text.toLowerCase() === states.failed) + .map(stage => ({ + ...stage, + jobs: stage.jobs.filter(job => job.status.text.toLowerCase() === states.failed), + })); export const failedJobsCount = state => state.stages.reduce( diff --git a/app/assets/javascripts/issue_show/components/app.vue b/app/assets/javascripts/issue_show/components/app.vue index 04c1cf021d9..e4e2eab2acd 100644 --- a/app/assets/javascripts/issue_show/components/app.vue +++ b/app/assets/javascripts/issue_show/components/app.vue @@ -294,11 +294,7 @@ export default { :issuable-type="issuableType" /> - <recaptcha-modal - v-show="showRecaptcha" - :html="recaptchaHTML" - @close="closeRecaptchaModal" - /> + <recaptcha-modal v-show="showRecaptcha" :html="recaptchaHTML" @close="closeRecaptchaModal" /> </div> <div v-else> <title-component diff --git a/app/assets/javascripts/issue_show/components/description.vue b/app/assets/javascripts/issue_show/components/description.vue index 461cb3271b7..5ca88d75063 100644 --- a/app/assets/javascripts/issue_show/components/description.vue +++ b/app/assets/javascripts/issue_show/components/description.vue @@ -106,7 +106,7 @@ export default { <div v-if="descriptionHtml" :class="{ - 'js-task-list-container': canUpdate + 'js-task-list-container': canUpdate, }" class="description" > @@ -114,11 +114,11 @@ export default { ref="gfm-content" :class="{ 'issue-realtime-pre-pulse': preAnimation, - 'issue-realtime-trigger-pulse': pulseAnimation + 'issue-realtime-trigger-pulse': pulseAnimation, }" class="wiki" - v-html="descriptionHtml"> - </div> + v-html="descriptionHtml" + ></div> <textarea v-if="descriptionText" v-model="descriptionText" @@ -127,10 +127,6 @@ export default { > </textarea> - <recaptcha-modal - v-show="showRecaptcha" - :html="recaptchaHTML" - @close="closeRecaptcha" - /> + <recaptcha-modal v-show="showRecaptcha" :html="recaptchaHTML" @close="closeRecaptcha" /> </div> </template> diff --git a/app/assets/javascripts/issue_show/components/edit_actions.vue b/app/assets/javascripts/issue_show/components/edit_actions.vue index 5dda35d64bb..42a3de62772 100644 --- a/app/assets/javascripts/issue_show/components/edit_actions.vue +++ b/app/assets/javascripts/issue_show/components/edit_actions.vue @@ -68,33 +68,21 @@ export default { :disabled="formState.updateLoading || !isSubmitEnabled" class="btn btn-success float-left qa-save-button" type="submit" - @click.prevent="updateIssuable"> + @click.prevent="updateIssuable" + > Save changes - <i - v-if="formState.updateLoading" - class="fa fa-spinner fa-spin" - aria-hidden="true"> - </i> - </button> - <button - class="btn btn-default float-right" - type="button" - @click="closeForm"> - Cancel + <i v-if="formState.updateLoading" class="fa fa-spinner fa-spin" aria-hidden="true"> </i> </button> + <button class="btn btn-default float-right" type="button" @click="closeForm">Cancel</button> <button v-if="shouldShowDeleteButton" :class="{ disabled: deleteLoading }" :disabled="deleteLoading" class="btn btn-danger float-right append-right-default qa-delete-button" type="button" - @click="deleteIssuable"> - Delete - <i - v-if="deleteLoading" - class="fa fa-spinner fa-spin" - aria-hidden="true"> - </i> + @click="deleteIssuable" + > + Delete <i v-if="deleteLoading" class="fa fa-spinner fa-spin" aria-hidden="true"> </i> </button> </div> </template> diff --git a/app/assets/javascripts/issue_show/components/edited.vue b/app/assets/javascripts/issue_show/components/edited.vue index 73ecb26c28d..14ad8d3b7c9 100644 --- a/app/assets/javascripts/issue_show/components/edited.vue +++ b/app/assets/javascripts/issue_show/components/edited.vue @@ -31,23 +31,12 @@ export default { </script> <template> - <small - class="edited-text" - > + <small class="edited-text"> Edited - <time-ago-tooltip - v-if="updatedAt" - :time="updatedAt" - tooltip-placement="bottom" - /> - <span - v-if="hasUpdatedBy" - > + <time-ago-tooltip v-if="updatedAt" :time="updatedAt" tooltip-placement="bottom" /> + <span v-if="hasUpdatedBy"> by - <a - :href="updatedByPath" - class="author-link" - > + <a :href="updatedByPath" class="author-link"> <span>{{ updatedByName }}</span> </a> </span> diff --git a/app/assets/javascripts/issue_show/components/fields/description.vue b/app/assets/javascripts/issue_show/components/fields/description.vue index e9e96a985a7..90258c0e044 100644 --- a/app/assets/javascripts/issue_show/components/fields/description.vue +++ b/app/assets/javascripts/issue_show/components/fields/description.vue @@ -44,11 +44,7 @@ export default { <template> <div class="common-note-form"> - <label - class="sr-only" - for="issue-description"> - Description - </label> + <label class="sr-only" for="issue-description"> Description </label> <markdown-field :markdown-preview-path="markdownPreviewPath" :markdown-docs-path="markdownDocsPath" @@ -67,7 +63,8 @@ export default { aria-label="Description" placeholder="Write a comment or drag your files here…" @keydown.meta.enter="updateIssuable" - @keydown.ctrl.enter="updateIssuable"> + @keydown.ctrl.enter="updateIssuable" + > </textarea> </markdown-field> </div> diff --git a/app/assets/javascripts/issue_show/components/fields/description_template.vue b/app/assets/javascripts/issue_show/components/fields/description_template.vue index e433bf66cfc..14f0acf6540 100644 --- a/app/assets/javascripts/issue_show/components/fields/description_template.vue +++ b/app/assets/javascripts/issue_show/components/fields/description_template.vue @@ -44,9 +44,7 @@ export default { </script> <template> - <div - class="dropdown js-issuable-selector-wrap" - data-issuable-type="issue"> + <div class="dropdown js-issuable-selector-wrap" data-issuable-type="issue"> <button ref="toggle" :data-namespace-path="projectNamespace" @@ -56,57 +54,33 @@ export default { type="button" data-field-name="issuable_template" data-selected="null" - data-toggle="dropdown"> - <span class="dropdown-toggle-text"> - Choose a template - </span> - <i - aria-hidden="true" - class="fa fa-chevron-down"> - </i> + data-toggle="dropdown" + > + <span class="dropdown-toggle-text"> Choose a template </span> + <i aria-hidden="true" class="fa fa-chevron-down"> </i> </button> <div class="dropdown-menu dropdown-select"> <div class="dropdown-title"> Choose a template - <button - class="dropdown-title-button dropdown-menu-close" - aria-label="Close" - type="button"> - <i - aria-hidden="true" - class="fa fa-times dropdown-menu-close-icon"> - </i> + <button class="dropdown-title-button dropdown-menu-close" aria-label="Close" type="button"> + <i aria-hidden="true" class="fa fa-times dropdown-menu-close-icon"> </i> </button> </div> <div class="dropdown-input"> - <input - type="search" - class="dropdown-input-field" - placeholder="Filter" - autocomplete="off" /> - <i - aria-hidden="true" - class="fa fa-search dropdown-input-search"> - </i> + <input type="search" class="dropdown-input-field" placeholder="Filter" autocomplete="off" /> + <i aria-hidden="true" class="fa fa-search dropdown-input-search"> </i> <i role="button" aria-label="Clear templates search input" - class="fa fa-times dropdown-input-clear js-dropdown-input-clear"> + class="fa fa-times dropdown-input-clear js-dropdown-input-clear" + > </i> </div> <div class="dropdown-content"></div> <div class="dropdown-footer"> <ul class="dropdown-footer-list"> - <li> - <a class="no-template"> - No template - </a> - </li> - <li> - <a class="reset-template"> - Reset template - </a> - </li> + <li><a class="no-template"> No template </a></li> + <li><a class="reset-template"> Reset template </a></li> </ul> </div> </div> diff --git a/app/assets/javascripts/issue_show/components/fields/title.vue b/app/assets/javascripts/issue_show/components/fields/title.vue index 11f4153b8d5..c3d7ba4907f 100644 --- a/app/assets/javascripts/issue_show/components/fields/title.vue +++ b/app/assets/javascripts/issue_show/components/fields/title.vue @@ -14,11 +14,7 @@ export default { <template> <fieldset> - <label - class="sr-only" - for="issuable-title"> - Title - </label> + <label class="sr-only" for="issuable-title"> Title </label> <input id="issuable-title" v-model="formState.title" @@ -27,6 +23,7 @@ export default { placeholder="Title" aria-label="Title" @keydown.meta.enter="updateIssuable" - @keydown.ctrl.enter="updateIssuable" /> + @keydown.ctrl.enter="updateIssuable" + /> </fieldset> </template> diff --git a/app/assets/javascripts/issue_show/components/form.vue b/app/assets/javascripts/issue_show/components/form.vue index 3b430d92912..45b60bc3392 100644 --- a/app/assets/javascripts/issue_show/components/form.vue +++ b/app/assets/javascripts/issue_show/components/form.vue @@ -80,9 +80,7 @@ export default { <form> <locked-warning v-if="formState.lockedWarningVisible" /> <div class="row"> - <div - v-if="hasIssuableTemplates" - class="col-sm-4 col-lg-3"> + <div v-if="hasIssuableTemplates" class="col-sm-4 col-lg-3"> <description-template :form-state="formState" :issuable-templates="issuableTemplates" @@ -96,10 +94,7 @@ export default { 'col-12': !hasIssuableTemplates, }" > - <title-field - :form-state="formState" - :issuable-templates="issuableTemplates" - /> + <title-field :form-state="formState" :issuable-templates="issuableTemplates" /> </div> </div> <description-field diff --git a/app/assets/javascripts/issue_show/components/locked_warning.vue b/app/assets/javascripts/issue_show/components/locked_warning.vue index 0682c6f2a35..639221473b1 100644 --- a/app/assets/javascripts/issue_show/components/locked_warning.vue +++ b/app/assets/javascripts/issue_show/components/locked_warning.vue @@ -11,10 +11,7 @@ export default { <template> <div class="alert alert-danger"> Someone edited the issue at the same time you did. Please check out - <a - :href="currentPath" - target="_blank" - rel="nofollow">the issue</a> - and make sure your changes will not unintentionally remove theirs. + <a :href="currentPath" target="_blank" rel="nofollow">the issue</a> and make sure your changes + will not unintentionally remove theirs. </div> </template> diff --git a/app/assets/javascripts/issue_show/components/title.vue b/app/assets/javascripts/issue_show/components/title.vue index ed26e53ac0e..3b5c95ccded 100644 --- a/app/assets/javascripts/issue_show/components/title.vue +++ b/app/assets/javascripts/issue_show/components/title.vue @@ -69,12 +69,11 @@ export default { <h2 :class="{ 'issue-realtime-pre-pulse': preAnimation, - 'issue-realtime-trigger-pulse': pulseAnimation + 'issue-realtime-trigger-pulse': pulseAnimation, }" class="title" v-html="titleHtml" - > - </h2> + ></h2> <button v-if="showInlineEditButton && canUpdate" v-tooltip @@ -86,7 +85,6 @@ export default { data-container="body" @click="edit" v-html="pencilIcon" - > - </button> + ></button> </div> </template> diff --git a/app/assets/javascripts/jobs/components/artifacts_block.vue b/app/assets/javascripts/jobs/components/artifacts_block.vue index 932675c0fc6..309b7427b9e 100644 --- a/app/assets/javascripts/jobs/components/artifacts_block.vue +++ b/app/assets/javascripts/jobs/components/artifacts_block.vue @@ -28,33 +28,19 @@ export default { </script> <template> <div class="block"> - <div class="title"> - {{ s__('Job|Job artifacts') }} - </div> + <div class="title">{{ s__('Job|Job artifacts') }}</div> - <p - v-if="isExpired" - class="js-artifacts-removed build-detail-row" - > + <p v-if="isExpired" class="js-artifacts-removed build-detail-row"> {{ s__('Job|The artifacts were removed') }} </p> - <p - v-else-if="willExpire" - class="js-artifacts-will-be-removed build-detail-row" - > + <p v-else-if="willExpire" class="js-artifacts-will-be-removed build-detail-row"> {{ s__('Job|The artifacts will be removed in') }} </p> - <timeago-tooltip - v-if="artifact.expire_at" - :time="artifact.expire_at" - /> + <timeago-tooltip v-if="artifact.expire_at" :time="artifact.expire_at" /> - <div - class="btn-group d-flex" - role="group" - > + <div class="btn-group d-flex" role="group"> <gl-link v-if="artifact.keep_path" :href="artifact.keep_path" diff --git a/app/assets/javascripts/jobs/components/commit_block.vue b/app/assets/javascripts/jobs/components/commit_block.vue index 9373dbebc8a..3b9c61bd48c 100644 --- a/app/assets/javascripts/jobs/components/commit_block.vue +++ b/app/assets/javascripts/jobs/components/commit_block.vue @@ -28,15 +28,15 @@ export default { <div :class="{ 'block-last': isLastBlock, - block: !isLastBlock - }"> + block: !isLastBlock, + }" + > <p> {{ __('Commit') }} - <gl-link - :href="commit.commit_path" - class="js-commit-sha commit-sha link-commit" - >{{ commit.short_id }}</gl-link> + <gl-link :href="commit.commit_path" class="js-commit-sha commit-sha link-commit">{{ + commit.short_id + }}</gl-link> <clipboard-button :text="commit.short_id" @@ -44,15 +44,11 @@ export default { css-class="btn btn-clipboard btn-transparent" /> - <gl-link - v-if="mergeRequest" - :href="mergeRequest.path" - class="js-link-commit link-commit" - >!{{ mergeRequest.iid }}</gl-link> + <gl-link v-if="mergeRequest" :href="mergeRequest.path" class="js-link-commit link-commit" + >!{{ mergeRequest.iid }}</gl-link + > </p> - <p class="build-light-text append-bottom-0"> - {{ commit.title }} - </p> + <p class="build-light-text append-bottom-0">{{ commit.title }}</p> </div> </template> diff --git a/app/assets/javascripts/jobs/components/empty_state.vue b/app/assets/javascripts/jobs/components/empty_state.vue index afc4d931a68..668fcf3d673 100644 --- a/app/assets/javascripts/jobs/components/empty_state.vue +++ b/app/assets/javascripts/jobs/components/empty_state.vue @@ -42,31 +42,16 @@ export default { <template> <div class="row empty-state"> <div class="col-12"> - <div - :class="illustrationSizeClass" - class="svg-content" - > - <img :src="illustrationPath" /> - </div> + <div :class="illustrationSizeClass" class="svg-content"><img :src="illustrationPath" /></div> </div> <div class="col-12"> <div class="text-content"> - <h4 class="js-job-empty-state-title text-center"> - {{ title }} - </h4> + <h4 class="js-job-empty-state-title text-center">{{ title }}</h4> - <p - v-if="content" - class="js-job-empty-state-content" - > - {{ content }} - </p> + <p v-if="content" class="js-job-empty-state-content">{{ content }}</p> - <div - v-if="action" - class="text-center" - > + <div v-if="action" class="text-center"> <gl-link :href="action.path" :data-method="action.method" diff --git a/app/assets/javascripts/jobs/components/environments_block.vue b/app/assets/javascripts/jobs/components/environments_block.vue index 6d1eb713886..2d09cf5760f 100644 --- a/app/assets/javascripts/jobs/components/environments_block.vue +++ b/app/assets/javascripts/jobs/components/environments_block.vue @@ -130,11 +130,8 @@ export default { <template> <div class="prepend-top-default js-environment-container"> <div class="environment-information"> - <ci-icon :status="iconStatus"/> - <p - class="inline append-bottom-0" - v-html="environment" - ></p> + <ci-icon :status="iconStatus" /> + <p class="inline append-bottom-0" v-html="environment"></p> </div> </div> </template> diff --git a/app/assets/javascripts/jobs/components/erased_block.vue b/app/assets/javascripts/jobs/components/erased_block.vue index 712f564b065..8437ad89301 100644 --- a/app/assets/javascripts/jobs/components/erased_block.vue +++ b/app/assets/javascripts/jobs/components/erased_block.vue @@ -30,18 +30,14 @@ export default { <div class="prepend-top-default js-build-erased"> <div class="erased alert alert-warning"> <template v-if="isErasedByUser"> - {{ s__("Job|Job has been erased by") }} - <gl-link :href="user.web_url"> - {{ user.username }} - </gl-link> + {{ s__('Job|Job has been erased by') }} + <gl-link :href="user.web_url"> {{ user.username }} </gl-link> </template> <template v-else> - {{ s__("Job|Job has been erased") }} + {{ s__('Job|Job has been erased') }} </template> - <timeago-tooltip - :time="erasedAt" - /> + <timeago-tooltip :time="erasedAt" /> </div> </div> </template> diff --git a/app/assets/javascripts/jobs/components/job_app.vue b/app/assets/javascripts/jobs/components/job_app.vue index ecb809ca4de..786ab16992d 100644 --- a/app/assets/javascripts/jobs/components/job_app.vue +++ b/app/assets/javascripts/jobs/components/job_app.vue @@ -210,10 +210,7 @@ export default { /> </div> - <callout - v-if="shouldRenderCalloutMessage" - :message="job.callout_message" - /> + <callout v-if="shouldRenderCalloutMessage" :message="job.callout_message" /> </header> <!-- EO Header Section --> @@ -245,23 +242,17 @@ export default { ref="sticky" class="js-archived-job prepend-top-default archived-sticky sticky-top" > - <icon - name="lock" - class="align-text-bottom" - /> + <icon name="lock" class="align-text-bottom" /> {{ __('This job is archived. Only the complete pipeline can be retried.') }} </div> - <!--job log --> - <div - v-if="hasTrace" - class="build-trace-container" - > + <!-- job log --> + <div v-if="hasTrace" class="build-trace-container"> <log-top-bar :class="{ 'sidebar-expanded': isSidebarOpen, 'sidebar-collapsed': !isSidebarOpen, - 'has-archived-block': job.archived + 'has-archived-block': job.archived, }" :erase-path="job.erase_path" :size="traceSize" @@ -273,14 +264,11 @@ export default { @scrollJobLogTop="scrollTop" @scrollJobLogBottom="scrollBottom" /> - <log - :trace="trace" - :is-complete="isTraceComplete" - /> + <log :trace="trace" :is-complete="isTraceComplete" /> </div> <!-- EO job log --> - <!--empty state --> + <!-- empty state --> <empty-state v-if="!hasTrace" class="js-job-empty-state" @@ -290,9 +278,9 @@ export default { :content="emptyStateIllustration.content" :action="emptyStateAction" /> - <!-- EO empty state --> + <!-- EO empty state --> - <!-- EO Body Section --> + <!-- EO Body Section --> </div> </template> @@ -301,7 +289,7 @@ export default { class="js-job-sidebar" :class="{ 'right-sidebar-expanded': isSidebarOpen, - 'right-sidebar-collapsed': !isSidebarOpen + 'right-sidebar-collapsed': !isSidebarOpen, }" :runner-help-url="runnerHelpUrl" /> diff --git a/app/assets/javascripts/jobs/components/job_container_item.vue b/app/assets/javascripts/jobs/components/job_container_item.vue index 80cbed422a0..845699a90b5 100644 --- a/app/assets/javascripts/jobs/components/job_container_item.vue +++ b/app/assets/javascripts/jobs/components/job_container_item.vue @@ -46,7 +46,7 @@ export default { class="build-job" :class="{ retried: job.retried, - active: isActive + active: isActive, }" > <gl-link @@ -56,21 +56,13 @@ export default { data-boundary="viewport" class="js-job-link" > - <icon - v-if="isActive" - name="arrow-right" - class="js-arrow-right icon-arrow-right" - /> + <icon v-if="isActive" name="arrow-right" class="js-arrow-right icon-arrow-right" /> <ci-icon :status="job.status" /> <span>{{ job.name ? job.name : job.id }}</span> - <icon - v-if="job.retried" - name="retry" - class="js-retry-icon" - /> + <icon v-if="job.retried" name="retry" class="js-retry-icon" /> </gl-link> </div> </template> diff --git a/app/assets/javascripts/jobs/components/job_log_controllers.vue b/app/assets/javascripts/jobs/components/job_log_controllers.vue index 5e0495bb231..52e14f954ee 100644 --- a/app/assets/javascripts/jobs/components/job_log_controllers.vue +++ b/app/assets/javascripts/jobs/components/job_log_controllers.vue @@ -75,12 +75,8 @@ export default { <template v-if="isTraceSizeVisible"> {{ jobLogSize }} - <gl-link - v-if="rawPath" - :href="rawPath" - class="js-raw-link raw-link" - > - {{ s__("Job|Complete Raw") }} + <gl-link v-if="rawPath" :href="rawPath" class="js-raw-link raw-link"> + {{ s__('Job|Complete Raw') }} </gl-link> </template> </div> @@ -112,11 +108,7 @@ export default { <!-- eo links --> <!-- scroll buttons --> - <div - v-gl-tooltip - :title="s__('Job|Scroll to top')" - class="controllers-buttons" - > + <div v-gl-tooltip :title="s__('Job|Scroll to top')" class="controllers-buttons"> <gl-button :disabled="isScrollTopDisabled" type="button" @@ -127,11 +119,7 @@ export default { </gl-button> </div> - <div - v-gl-tooltip - :title="s__('Job|Scroll to bottom')" - class="controllers-buttons" - > + <div v-gl-tooltip :title="s__('Job|Scroll to bottom')" class="controllers-buttons"> <gl-button :disabled="isScrollBottomDisabled" class="js-scroll-bottom btn-scroll btn-transparent btn-blank" diff --git a/app/assets/javascripts/jobs/components/sidebar.vue b/app/assets/javascripts/jobs/components/sidebar.vue index 21f0a1435d7..0f590e077bf 100644 --- a/app/assets/javascripts/jobs/components/sidebar.vue +++ b/app/assets/javascripts/jobs/components/sidebar.vue @@ -107,17 +107,11 @@ export default { }; </script> <template> - <aside - class="right-sidebar build-sidebar" - data-offset-top="101" - data-spy="affix" - > + <aside class="right-sidebar build-sidebar" data-offset-top="101" data-spy="affix"> <div class="sidebar-container"> <div class="blocks-container"> <div class="block"> - <strong class="inline prepend-top-8"> - {{ job.name }} - </strong> + <strong class="inline prepend-top-8"> {{ job.name }} </strong> <gl-link v-if="job.retry_path" :class="retryButtonClass" @@ -134,8 +128,7 @@ export default { btn-inverted visible-md-block visible-lg-block" target="_blank" > - {{ __('Debug') }} - <icon name="external-link" /> + {{ __('Debug') }} <icon name="external-link" /> </gl-link> <gl-button :aria-label="__('Toggle Sidebar')" @@ -144,17 +137,10 @@ export default { float-right d-block d-md-none js-sidebar-build-toggle" @click="toggleSidebar" > - <i - aria-hidden="true" - data-hidden="true" - class="fa fa-angle-double-right" - ></i> + <i aria-hidden="true" data-hidden="true" class="fa fa-angle-double-right"></i> </gl-button> </div> - <div - v-if="job.retry_path || job.new_issue_path" - class="block retry-link" - > + <div v-if="job.retry_path || job.new_issue_path" class="block retry-link"> <gl-link v-if="job.new_issue_path" :href="job.new_issue_path" @@ -172,17 +158,10 @@ export default { {{ __('Retry') }} </gl-link> </div> - <div :class="{ block : renderBlock }"> - <p - v-if="job.merge_request" - class="build-detail-row js-job-mr" - > - <span class="build-light-text"> - {{ __('Merge Request:') }} - </span> - <gl-link :href="job.merge_request.path"> - !{{ job.merge_request.iid }} - </gl-link> + <div :class="{ block: renderBlock }"> + <p v-if="job.merge_request" class="build-detail-row js-job-mr"> + <span class="build-light-text"> {{ __('Merge Request:') }} </span> + <gl-link :href="job.merge_request.path"> !{{ job.merge_request.iid }} </gl-link> </p> <detail-row @@ -203,12 +182,7 @@ export default { class="js-job-erased" title="Erased" /> - <detail-row - v-if="job.queued" - :value="queued" - class="js-job-queued" - title="Queued" - /> + <detail-row v-if="job.queued" :value="queued" class="js-job-queued" title="Queued" /> <detail-row v-if="hasTimeout" :help-url="runnerHelpUrl" @@ -216,37 +190,21 @@ export default { class="js-job-timeout" title="Timeout" /> - <detail-row - v-if="job.runner" - :value="runnerId" - class="js-job-runner" - title="Runner" - /> + <detail-row v-if="job.runner" :value="runnerId" class="js-job-runner" title="Runner" /> <detail-row v-if="job.coverage" :value="coverage" class="js-job-coverage" title="Coverage" /> - <p - v-if="job.tags.length" - class="build-detail-row js-job-tags" - > - <span class="build-light-text"> - {{ __('Tags:') }} - </span> - <span - v-for="(tag, i) in job.tags" - :key="i" - class="label label-primary"> + <p v-if="job.tags.length" class="build-detail-row js-job-tags"> + <span class="build-light-text"> {{ __('Tags:') }} </span> + <span v-for="(tag, i) in job.tags" :key="i" class="label label-primary"> {{ tag }} </span> </p> - <div - v-if="job.cancel_path" - class="btn-group prepend-top-5" - role="group"> + <div v-if="job.cancel_path" class="btn-group prepend-top-5" role="group"> <gl-link :href="job.cancel_path" class="js-cancel-job btn btn-sm btn-default" @@ -258,14 +216,8 @@ export default { </div> </div> - <artifacts-block - v-if="hasArtifact" - :artifact="job.artifact" - /> - <trigger-block - v-if="hasTriggers" - :trigger="job.trigger" - /> + <artifacts-block v-if="hasArtifact" :artifact="job.artifact" /> + <trigger-block v-if="hasTriggers" :trigger="job.trigger" /> <commit-block :is-last-block="hasStages" :commit="commit" @@ -281,11 +233,7 @@ export default { /> </div> - <jobs-container - v-if="jobs.length" - :jobs="jobs" - :job-id="job.id" - /> + <jobs-container v-if="jobs.length" :jobs="jobs" :job-id="job.id" /> </div> </aside> </template> diff --git a/app/assets/javascripts/jobs/components/sidebar_detail_row.vue b/app/assets/javascripts/jobs/components/sidebar_detail_row.vue index d143e9f586c..77be295e802 100644 --- a/app/assets/javascripts/jobs/components/sidebar_detail_row.vue +++ b/app/assets/javascripts/jobs/components/sidebar_detail_row.vue @@ -34,27 +34,11 @@ export default { </script> <template> <p class="build-detail-row"> - <span - v-if="hasTitle" - class="build-light-text" - > - {{ title }}: - </span> - {{ value }} + <span v-if="hasTitle" class="build-light-text"> {{ title }}: </span> {{ value }} - <span - v-if="hasHelpURL" - class="help-button float-right" - > - <gl-link - :href="helpUrl" - target="_blank" - rel="noopener noreferrer nofollow" - > - <i - class="fa fa-question-circle" - aria-hidden="true" - ></i> + <span v-if="hasHelpURL" class="help-button float-right"> + <gl-link :href="helpUrl" target="_blank" rel="noopener noreferrer nofollow"> + <i class="fa fa-question-circle" aria-hidden="true"></i> </gl-link> </span> </p> diff --git a/app/assets/javascripts/jobs/components/stages_dropdown.vue b/app/assets/javascripts/jobs/components/stages_dropdown.vue index dc26b246d71..90482500bbf 100644 --- a/app/assets/javascripts/jobs/components/stages_dropdown.vue +++ b/app/assets/javascripts/jobs/components/stages_dropdown.vue @@ -36,26 +36,13 @@ export default { </script> <template> <div class="block-last dropdown"> - <ci-icon - :status="pipeline.details.status" - class="vertical-align-middle" - /> + <ci-icon :status="pipeline.details.status" class="vertical-align-middle" /> {{ __('Pipeline') }} - <a - :href="pipeline.path" - class="js-pipeline-path link-commit" - > - #{{ pipeline.id }} - </a> + <a :href="pipeline.path" class="js-pipeline-path link-commit"> #{{ pipeline.id }} </a> <template v-if="hasRef"> {{ __('from') }} - <a - :href="pipeline.ref.path" - class="link-commit ref-name" - > - {{ pipeline.ref.name }} - </a> + <a :href="pipeline.ref.path" class="link-commit ref-name"> {{ pipeline.ref.name }} </a> </template> <button @@ -63,20 +50,12 @@ export default { data-toggle="dropdown" class="js-selected-stage dropdown-menu-toggle prepend-top-8" > - {{ selectedStage }} - <i class="fa fa-chevron-down" ></i> + {{ selectedStage }} <i class="fa fa-chevron-down"></i> </button> <ul class="dropdown-menu"> - <li - v-for="stage in stages" - :key="stage.name" - > - <button - type="button" - class="js-stage-item stage-item" - @click="onStageClick(stage)" - > + <li v-for="stage in stages" :key="stage.name"> + <button type="button" class="js-stage-item stage-item" @click="onStageClick(stage);"> {{ stage.name }} </button> </li> diff --git a/app/assets/javascripts/jobs/components/stuck_block.vue b/app/assets/javascripts/jobs/components/stuck_block.vue index 2b2ebe4c3f7..7b077d5e621 100644 --- a/app/assets/javascripts/jobs/components/stuck_block.vue +++ b/app/assets/javascripts/jobs/components/stuck_block.vue @@ -26,42 +26,29 @@ export default { </script> <template> <div class="bs-callout bs-callout-warning"> - <p - v-if="tags.length" - class="js-stuck-with-tags append-bottom-0" - > - {{ s__(`This job is stuck, because you don't have - any active runners online with any of these tags assigned to them:`) }} - <span - v-for="(tag, index) in tags" - :key="index" - class="badge badge-primary" - > - {{ tag }} - </span> + <p v-if="tags.length" class="js-stuck-with-tags append-bottom-0"> + {{ + s__(`This job is stuck, because you don't have + any active runners online with any of these tags assigned to them:`) + }} + <span v-for="(tag, index) in tags" :key="index" class="badge badge-primary"> {{ tag }} </span> </p> - <p - v-else-if="hasNoRunnersForProject" - class="js-stuck-no-runners append-bottom-0" - > - {{ s__(`Job|This job is stuck, because the project - doesn't have any runners online assigned to it.`) }} + <p v-else-if="hasNoRunnersForProject" class="js-stuck-no-runners append-bottom-0"> + {{ + s__(`Job|This job is stuck, because the project + doesn't have any runners online assigned to it.`) + }} </p> - <p - v-else - class="js-stuck-no-active-runner append-bottom-0" - > - {{ s__(`This job is stuck, because you don't - have any active runners that can run this job.`) }} + <p v-else class="js-stuck-no-active-runner append-bottom-0"> + {{ + s__(`This job is stuck, because you don't + have any active runners that can run this job.`) + }} </p> - {{ __("Go to") }} - <gl-link - v-if="runnersPath" - :href="runnersPath" - class="js-runners-path" - > - {{ __("Runners page") }} + {{ __('Go to') }} + <gl-link v-if="runnersPath" :href="runnersPath" class="js-runners-path"> + {{ __('Runners page') }} </gl-link> </div> </template> diff --git a/app/assets/javascripts/jobs/components/trigger_block.vue b/app/assets/javascripts/jobs/components/trigger_block.vue index 4d18f76b7ea..4a9b2903eec 100644 --- a/app/assets/javascripts/jobs/components/trigger_block.vue +++ b/app/assets/javascripts/jobs/components/trigger_block.vue @@ -31,18 +31,10 @@ export default { <template> <div class="build-widget block"> - <h4 class="title"> - {{ __('Trigger') }} - </h4> + <h4 class="title">{{ __('Trigger') }}</h4> - <p - v-if="trigger.short_token" - class="js-short-token" - > - <span class="build-light-text"> - {{ __('Token') }} - </span> - {{ trigger.short_token }} + <p v-if="trigger.short_token" class="js-short-token"> + <span class="build-light-text"> {{ __('Token') }} </span> {{ trigger.short_token }} </p> <p v-if="hasVariables"> @@ -56,24 +48,13 @@ export default { </gl-button> </p> - <dl - v-if="areVariablesVisible" - class="js-build-variables trigger-build-variables" - > - <template - v-for="variable in trigger.variables" - > - <dt - :key="`${variable.key}-variable`" - class="js-build-variable trigger-build-variable" - > + <dl v-if="areVariablesVisible" class="js-build-variables trigger-build-variables"> + <template v-for="variable in trigger.variables"> + <dt :key="`${variable.key}-variable`" class="js-build-variable trigger-build-variable"> {{ variable.key }} </dt> - <dd - :key="`${variable.key}-value`" - class="js-build-value trigger-build-value" - > + <dd :key="`${variable.key}-value`" class="js-build-value trigger-build-value"> {{ variable.value }} </dd> </template> diff --git a/app/assets/javascripts/lib/utils/common_utils.js b/app/assets/javascripts/lib/utils/common_utils.js index e14fff7a610..3186ae9c133 100644 --- a/app/assets/javascripts/lib/utils/common_utils.js +++ b/app/assets/javascripts/lib/utils/common_utils.js @@ -226,7 +226,17 @@ export const getParameterByName = (name, urlToParse) => { return decodeURIComponent(results[2].replace(/\+/g, ' ')); }; -const handleSelectedRange = range => { +const handleSelectedRange = (range, restrictToNode) => { + // Make sure this range is within the restricting container + if (restrictToNode && !range.intersectsNode(restrictToNode)) return null; + + // If only a part of the range is within the wanted container, we need to restrict the range to it + if (restrictToNode && !restrictToNode.contains(range.commonAncestorContainer)) { + if (!restrictToNode.contains(range.startContainer)) range.setStart(restrictToNode, 0); + if (!restrictToNode.contains(range.endContainer)) + range.setEnd(restrictToNode, restrictToNode.childNodes.length); + } + const container = range.commonAncestorContainer; // add context to fragment if needed if (container.tagName === 'OL') { @@ -237,14 +247,22 @@ const handleSelectedRange = range => { return range.cloneContents(); }; -export const getSelectedFragment = () => { +export const getSelectedFragment = restrictToNode => { const selection = window.getSelection(); if (selection.rangeCount === 0) return null; + // Most usages of the selection only want text from a part of the page (e.g. discussion) + if (restrictToNode && !selection.containsNode(restrictToNode, true)) return null; + const documentFragment = document.createDocumentFragment(); + documentFragment.originalNodes = []; for (let i = 0; i < selection.rangeCount; i += 1) { const range = selection.getRangeAt(i); - documentFragment.appendChild(handleSelectedRange(range)); + const handledRange = handleSelectedRange(range, restrictToNode); + if (handledRange) { + documentFragment.appendChild(handledRange); + documentFragment.originalNodes.push(range.commonAncestorContainer); + } } if (documentFragment.textContent.length === 0) return null; diff --git a/app/assets/javascripts/lib/utils/text_markdown.js b/app/assets/javascripts/lib/utils/text_markdown.js index c52cfb806a2..3618c6af7e2 100644 --- a/app/assets/javascripts/lib/utils/text_markdown.js +++ b/app/assets/javascripts/lib/utils/text_markdown.js @@ -39,7 +39,7 @@ function blockTagText(text, textArea, blockTag, selected) { } } -function moveCursor({ textArea, tag, wrapped, removedLastNewLine, select }) { +function moveCursor({ textArea, tag, positionBetweenTags, removedLastNewLine, select }) { var pos; if (!textArea.setSelectionRange) { return; @@ -51,7 +51,7 @@ function moveCursor({ textArea, tag, wrapped, removedLastNewLine, select }) { return textArea.setSelectionRange(startPosition, endPosition); } if (textArea.selectionStart === textArea.selectionEnd) { - if (wrapped) { + if (positionBetweenTags) { pos = textArea.selectionStart - tag.length; } else { pos = textArea.selectionStart; @@ -67,7 +67,6 @@ function moveCursor({ textArea, tag, wrapped, removedLastNewLine, select }) { export function insertMarkdownText({ textArea, text, tag, blockTag, selected, wrap, select }) { var textToInsert, - inserted, selectedSplit, startChar, removedLastNewLine, @@ -155,7 +154,7 @@ export function insertMarkdownText({ textArea, text, tag, blockTag, selected, wr return moveCursor({ textArea, tag: tag.replace(textPlaceholder, selected), - wrap, + positionBetweenTags: wrap && selected.length === 0, removedLastNewLine, select, }); @@ -171,10 +170,6 @@ function updateText({ textArea, tag, blockTag, wrap, select }) { return insertMarkdownText({ textArea, text, tag, blockTag, selected, wrap, select }); } -function replaceRange(s, start, end, substitute) { - return s.substring(0, start) + substitute + s.substring(end); -} - export function addMarkdownListeners(form) { return $('.js-md', form) .off('click') diff --git a/app/assets/javascripts/mirrors/constants.js b/app/assets/javascripts/mirrors/constants.js new file mode 100644 index 00000000000..8dd6a726425 --- /dev/null +++ b/app/assets/javascripts/mirrors/constants.js @@ -0,0 +1,4 @@ +export default { + PASSWORD: 'password', + SSH: 'ssh_public_key', +}; diff --git a/app/assets/javascripts/pages/projects/settings/repository/show/mirror_repos.js b/app/assets/javascripts/mirrors/mirror_repos.js index 4c56af20cc3..0d8f31d6bfc 100644 --- a/app/assets/javascripts/pages/projects/settings/repository/show/mirror_repos.js +++ b/app/assets/javascripts/mirrors/mirror_repos.js @@ -3,10 +3,12 @@ import _ from 'underscore'; import { __ } from '~/locale'; import Flash from '~/flash'; import axios from '~/lib/utils/axios_utils'; +import SSHMirror from './ssh_mirror'; export default class MirrorRepos { constructor(container) { this.$container = $(container); + this.$password = null; this.$form = $('.js-mirror-form', this.$container); this.$urlInput = $('.js-mirror-url', this.$form); this.$protectedBranchesInput = $('.js-mirror-protected', this.$form); @@ -26,6 +28,18 @@ export default class MirrorRepos { this.$authMethod.on('change', () => this.togglePassword()); this.$password.on('input.updateUrl', () => this.debouncedUpdateUrl()); + + this.initMirrorSSH(); + } + + initMirrorSSH() { + if (this.$password) { + this.$password.off('input.updateUrl'); + } + this.$password = undefined; + + this.sshMirror = new SSHMirror('.js-mirror-form'); + this.sshMirror.init(); } updateUrl() { diff --git a/app/assets/javascripts/mirrors/ssh_mirror.js b/app/assets/javascripts/mirrors/ssh_mirror.js new file mode 100644 index 00000000000..5bdf5d6277a --- /dev/null +++ b/app/assets/javascripts/mirrors/ssh_mirror.js @@ -0,0 +1,299 @@ +import $ from 'jquery'; +import _ from 'underscore'; +import { __ } from '~/locale'; +import axios from '~/lib/utils/axios_utils'; +import Flash from '~/flash'; +import { backOff } from '~/lib/utils/common_utils'; +import AUTH_METHOD from './constants'; + +export default class SSHMirror { + constructor(formSelector) { + this.backOffRequestCounter = 0; + + this.$form = $(formSelector); + + this.$repositoryUrl = this.$form.find('.js-repo-url'); + this.$knownHosts = this.$form.find('.js-known-hosts'); + + this.$sectionSSHHostKeys = this.$form.find('.js-ssh-host-keys-section'); + this.$hostKeysInformation = this.$form.find('.js-fingerprint-ssh-info'); + this.$btnDetectHostKeys = this.$form.find('.js-detect-host-keys'); + this.$btnSSHHostsShowAdvanced = this.$form.find('.btn-show-advanced'); + this.$dropdownAuthType = this.$form.find('.js-mirror-auth-type'); + + this.$wellAuthTypeChanging = this.$form.find('.js-well-changing-auth'); + this.$wellPasswordAuth = this.$form.find('.js-well-password-auth'); + this.$wellSSHAuth = this.$form.find('.js-well-ssh-auth'); + this.$sshPublicKeyWrap = this.$form.find('.js-ssh-public-key-wrap'); + this.$regeneratePublicSshKeyButton = this.$wellSSHAuth.find('.js-btn-regenerate-ssh-key'); + this.$regeneratePublicSshKeyModal = this.$wellSSHAuth.find( + '.js-regenerate-public-ssh-key-confirm-modal', + ); + } + + init() { + this.handleRepositoryUrlInput(true); + + this.$repositoryUrl.on('keyup', () => this.handleRepositoryUrlInput()); + this.$knownHosts.on('keyup', e => this.handleSSHKnownHostsInput(e)); + this.$dropdownAuthType.on('change', e => this.handleAuthTypeChange(e)); + this.$btnDetectHostKeys.on('click', e => this.handleDetectHostKeys(e)); + this.$btnSSHHostsShowAdvanced.on('click', e => this.handleSSHHostsAdvanced(e)); + this.$regeneratePublicSshKeyButton.on('click', () => + this.$regeneratePublicSshKeyModal.toggle(true), + ); + $('.js-confirm', this.$regeneratePublicSshKeyModal).on('click', e => + this.regeneratePublicSshKey(e), + ); + $('.js-cancel', this.$regeneratePublicSshKeyModal).on('click', () => + this.$regeneratePublicSshKeyModal.toggle(false), + ); + } + + /** + * Method to monitor Git Repository URL input + */ + handleRepositoryUrlInput(forceMatch) { + const protocol = this.$repositoryUrl.val().split('://')[0]; + const protRegEx = /http|git/; + + // Validate URL and verify if it consists only supported protocols + if (forceMatch || this.$form.get(0).checkValidity()) { + const isSsh = protocol === 'ssh'; + // Hide/Show SSH Host keys section only for SSH URLs + this.$sectionSSHHostKeys.collapse(isSsh ? 'show' : 'hide'); + this.$btnDetectHostKeys.enable(); + + // Verify if URL is http, https or git and hide/show Auth type dropdown + // as we don't support auth type SSH for non-SSH URLs + const matchesProtocol = protRegEx.test(protocol); + this.$dropdownAuthType.attr('disabled', matchesProtocol); + + if (forceMatch && isSsh) { + this.$dropdownAuthType.val(AUTH_METHOD.SSH); + this.toggleAuthWell(AUTH_METHOD.SSH); + } else { + this.$dropdownAuthType.val(AUTH_METHOD.PASSWORD); + this.toggleAuthWell(AUTH_METHOD.PASSWORD); + } + } + } + + /** + * Click event handler to detect SSH Host key and fingerprints from + * provided Git Repository URL. + */ + handleDetectHostKeys() { + const projectMirrorSSHEndpoint = this.$form.data('project-mirror-ssh-endpoint'); + const repositoryUrl = this.$repositoryUrl.val(); + const currentKnownHosts = this.$knownHosts.val(); + const $btnLoadSpinner = this.$btnDetectHostKeys.find('.js-spinner'); + + // Disable button while we make request + this.$btnDetectHostKeys.disable(); + $btnLoadSpinner.removeClass('d-none'); + + // Make backOff polling to get data + backOff((next, stop) => { + axios + .get( + `${projectMirrorSSHEndpoint}?ssh_url=${repositoryUrl}&compare_host_keys=${encodeURIComponent( + currentKnownHosts, + )}`, + ) + .then(({ data, status }) => { + if (status === 204) { + this.backOffRequestCounter += 1; + if (this.backOffRequestCounter < 3) { + next(); + } else { + stop(data); + } + } else { + stop(data); + } + }) + .catch(stop); + }) + .then(res => { + $btnLoadSpinner.addClass('d-none'); + // Once data is received, we show verification info along with Host keys and fingerprints + this.$hostKeysInformation + .find('.js-fingerprint-verification') + .collapse(res.host_keys_changed ? 'hide' : 'show'); + if (res.known_hosts && res.fingerprints) { + this.showSSHInformation(res); + } + }) + .catch(({ response }) => { + // Show failure message when there's an error and re-enable Detect host keys button + const failureMessage = response.data + ? response.data.message + : __('An error occurred while detecting host keys'); + Flash(failureMessage); + + $btnLoadSpinner.addClass('hidden'); + this.$btnDetectHostKeys.enable(); + }); + } + + /** + * Method to monitor known hosts textarea input + */ + handleSSHKnownHostsInput() { + // Strike-out fingerprints and remove verification info if `known hosts` value is altered + this.$hostKeysInformation.find('.js-fingerprints-list').addClass('invalidate'); + this.$hostKeysInformation.find('.js-fingerprint-verification').collapse('hide'); + } + + /** + * Click event handler for `Show advanced` button under SSH Host keys section + */ + handleSSHHostsAdvanced() { + const $knownHost = this.$sectionSSHHostKeys.find('.js-ssh-known-hosts'); + const toggleShowAdvanced = $knownHost.hasClass('show'); + + $knownHost.collapse('toggle'); + this.$btnSSHHostsShowAdvanced.toggleClass('show-advanced', toggleShowAdvanced); + } + + /** + * Authentication method dropdown change event listener + */ + handleAuthTypeChange() { + const projectMirrorAuthTypeEndpoint = `${this.$form.attr('action')}.json`; + const $sshPublicKey = this.$sshPublicKeyWrap.find('.ssh-public-key'); + const selectedAuthType = this.$dropdownAuthType.val(); + + this.$wellPasswordAuth.collapse('hide'); + this.$wellSSHAuth.collapse('hide'); + + // This request should happen only if selected Auth type was SSH + // and SSH Public key was not present on page load + if (selectedAuthType === AUTH_METHOD.SSH && !$sshPublicKey.text().trim()) { + if (!this.$wellSSHAuth.length) return; + + // Construct request body + const authTypeData = { + project: { + ...this.$regeneratePublicSshKeyButton.data().projectData, + }, + }; + + this.$wellAuthTypeChanging.collapse('show'); + this.$dropdownAuthType.disable(); + + axios + .put(projectMirrorAuthTypeEndpoint, JSON.stringify(authTypeData), { + headers: { + 'Content-Type': 'application/json; charset=utf-8', + }, + }) + .then(({ data }) => { + // Show SSH public key container and fill in public key + this.toggleAuthWell(selectedAuthType); + this.toggleSSHAuthWellMessage(true); + this.setSSHPublicKey(data.import_data_attributes.ssh_public_key); + + this.$wellAuthTypeChanging.collapse('hide'); + this.$dropdownAuthType.enable(); + }) + .catch(() => { + Flash(__('Something went wrong on our end.')); + + this.$wellAuthTypeChanging.collapse('hide'); + this.$dropdownAuthType.enable(); + }); + } else { + this.toggleAuthWell(selectedAuthType); + this.$wellSSHAuth.find('.js-ssh-public-key-present').collapse('show'); + } + } + + /** + * Method to parse SSH Host keys data and render it + * under SSH host keys section + */ + showSSHInformation(sshHostKeys) { + const $fingerprintsList = this.$hostKeysInformation.find('.js-fingerprints-list'); + let fingerprints = ''; + sshHostKeys.fingerprints.forEach(fingerprint => { + const escFingerprints = _.escape(fingerprint.fingerprint); + fingerprints += `<code>${escFingerprints}</code>`; + }); + + this.$hostKeysInformation.collapse('show'); + $fingerprintsList.removeClass('invalidate'); + $fingerprintsList.html(fingerprints); + this.$sectionSSHHostKeys.find('.js-known-hosts').val(sshHostKeys.known_hosts); + } + + /** + * Toggle Auth type information container based on provided `authType` + */ + toggleAuthWell(authType) { + this.$wellPasswordAuth.collapse(authType === AUTH_METHOD.PASSWORD ? 'show' : 'hide'); + this.$wellSSHAuth.collapse(authType === AUTH_METHOD.SSH ? 'show' : 'hide'); + } + + /** + * Toggle SSH auth information message + */ + toggleSSHAuthWellMessage(sshKeyPresent) { + this.$sshPublicKeyWrap.collapse(sshKeyPresent ? 'show' : 'hide'); + this.$wellSSHAuth.find('.js-ssh-public-key-present').collapse(sshKeyPresent ? 'show' : 'hide'); + this.$regeneratePublicSshKeyButton.collapse(sshKeyPresent ? 'show' : 'hide'); + this.$wellSSHAuth.find('.js-ssh-public-key-pending').collapse(sshKeyPresent ? 'hide' : 'show'); + } + + /** + * Sets SSH Public key to Clipboard button and shows it on UI. + */ + setSSHPublicKey(sshPublicKey) { + this.$sshPublicKeyWrap.find('.ssh-public-key').text(sshPublicKey); + this.$sshPublicKeyWrap + .find('.btn-copy-ssh-public-key') + .attr('data-clipboard-text', sshPublicKey); + } + + regeneratePublicSshKey(event) { + event.preventDefault(); + + this.$regeneratePublicSshKeyModal.toggle(false); + + const button = this.$regeneratePublicSshKeyButton; + const spinner = $('.js-spinner', button); + const endpoint = button.data('endpoint'); + const authTypeData = { + project: { + ...this.$regeneratePublicSshKeyButton.data().projectData, + }, + }; + + button.attr('disabled', 'disabled'); + spinner.removeClass('d-none'); + + axios + .patch(endpoint, authTypeData) + .then(({ data }) => { + button.removeAttr('disabled'); + spinner.addClass('d-none'); + + this.setSSHPublicKey(data.import_data_attributes.ssh_public_key); + }) + .catch(() => { + Flash(_('Unable to regenerate public ssh key.')); + }); + } + + destroy() { + this.$repositoryUrl.off('keyup'); + this.$form.find('.js-known-hosts').off('keyup'); + this.$dropdownAuthType.off('change'); + this.$btnDetectHostKeys.off('click'); + this.$btnSSHHostsShowAdvanced.off('click'); + this.$regeneratePublicSshKeyButton.off('click'); + $('.js-confirm', this.$regeneratePublicSshKeyModal).off('click'); + $('.js-cancel', this.$regeneratePublicSshKeyModal).off('click'); + } +} diff --git a/app/assets/javascripts/monitoring/components/dashboard.vue b/app/assets/javascripts/monitoring/components/dashboard.vue index 98182d92c2f..218c508a608 100644 --- a/app/assets/javascripts/monitoring/components/dashboard.vue +++ b/app/assets/javascripts/monitoring/components/dashboard.vue @@ -176,35 +176,19 @@ export default { </script> <template> - <div - v-if="!showEmptyState" - :key="forceRedraw" - class="prometheus-graphs prepend-top-default" - > + <div v-if="!showEmptyState" :key="forceRedraw" class="prometheus-graphs prepend-top-default"> <div class="environments d-flex align-items-center"> {{ s__('Metrics|Environment') }} <div class="dropdown prepend-left-10"> - <button - class="dropdown-menu-toggle" - data-toggle="dropdown" - type="button" - > - <span> - {{ currentEnvironmentName }} - </span> - <icon - name="chevron-down" - /> + <button class="dropdown-menu-toggle" data-toggle="dropdown" type="button"> + <span> {{ currentEnvironmentName }} </span> <icon name="chevron-down" /> </button> - <div - v-if="store.environmentsData.length > 0" + <div + v-if="store.environmentsData.length > 0" class="dropdown-menu dropdown-menu-selectable dropdown-menu-drop-up" > <ul> - <li - v-for="environment in store.environmentsData" - :key="environment.latest.id" - > + <li v-for="environment in store.environmentsData" :key="environment.latest.id"> <a :href="environment.latest.metrics_path" :class="{ 'is-active': environment.latest.name == currentEnvironmentName }" diff --git a/app/assets/javascripts/monitoring/components/empty_state.vue b/app/assets/javascripts/monitoring/components/empty_state.vue index 82b9a4b1adb..23e1e734b37 100644 --- a/app/assets/javascripts/monitoring/components/empty_state.vue +++ b/app/assets/javascripts/monitoring/components/empty_state.vue @@ -89,27 +89,14 @@ export default { <template> <div class="prometheus-state"> - <div class="state-svg svg-content"> - <img :src="currentState.svgUrl" /> - </div> - <h4 class="state-title"> - {{ currentState.title }} - </h4> + <div class="state-svg svg-content"><img :src="currentState.svgUrl" /></div> + <h4 class="state-title">{{ currentState.title }}</h4> <p class="state-description"> {{ currentState.description }} - <a - v-if="showButtonDescription" - :href="settingsPath" - > - Prometheus server - </a> + <a v-if="showButtonDescription" :href="settingsPath"> Prometheus server </a> </p> <div class="state-button"> - <a - v-if="currentState.buttonPath" - :href="currentState.buttonPath" - class="btn btn-success" - > + <a v-if="currentState.buttonPath" :href="currentState.buttonPath" class="btn btn-success"> {{ currentState.buttonText }} </a> </div> diff --git a/app/assets/javascripts/monitoring/components/graph.vue b/app/assets/javascripts/monitoring/components/graph.vue index 5c6e2e09e46..815063237fc 100644 --- a/app/assets/javascripts/monitoring/components/graph.vue +++ b/app/assets/javascripts/monitoring/components/graph.vue @@ -247,33 +247,17 @@ export default { <template> <div class="prometheus-graph" - @mouseover="showFlagContent = true" - @mouseleave="showFlagContent = false" + @mouseover="showFlagContent = true;" + @mouseleave="showFlagContent = false;" > <div class="prometheus-graph-header"> - <h5 class="prometheus-graph-title"> - {{ graphData.title }} - </h5> - <div class="prometheus-graph-widgets"> - <slot></slot> - </div> + <h5 class="prometheus-graph-title">{{ graphData.title }}</h5> + <div class="prometheus-graph-widgets"><slot></slot></div> </div> - <div - :style="paddingBottomRootSvg" - class="prometheus-svg-container" - > - <svg - ref="baseSvg" - :viewBox="outerViewBox" - > - <g - :transform="axisTransform" - class="x-axis" - /> - <g - class="y-axis" - transform="translate(70, 20)" - /> + <div :style="paddingBottomRootSvg" class="prometheus-svg-container"> + <svg ref="baseSvg" :viewBox="outerViewBox"> + <g :transform="axisTransform" class="x-axis" /> + <g class="y-axis" transform="translate(70, 20)" /> <graph-axis :graph-width="graphWidth" :graph-height="graphHeight" @@ -282,15 +266,8 @@ export default { :y-axis-label="yAxisLabel" :unit-of-display="unitOfDisplay" /> - <svg - ref="graphData" - :viewBox="innerViewBox" - class="graph-data" - > - <slot - name="additionalSvgContent" - :graphDrawData="graphDrawData" - /> + <svg ref="graphData" :viewBox="innerViewBox" class="graph-data"> + <slot name="additionalSvgContent" :graphDrawData="graphDrawData" /> <graph-path v-for="(path, index) in timeSeries" :key="index" @@ -309,11 +286,11 @@ export default { /> <rect ref="graphOverlay" - :width="(graphWidth - 70)" - :height="(graphHeight - 100)" + :width="graphWidth - 70" + :height="graphHeight - 100" class="prometheus-graph-overlay" transform="translate(-5, 20)" - @mousemove="handleMouseOverGraph($event)" + @mousemove="handleMouseOverGraph($event);" /> </svg> </svg> @@ -331,10 +308,6 @@ export default { :current-coordinates="currentCoordinates" /> </div> - <graph-legend - v-if="showLegend" - :legend-title="legendTitle" - :time-series="timeSeries" - /> + <graph-legend v-if="showLegend" :legend-title="legendTitle" :time-series="timeSeries" /> </div> </template> diff --git a/app/assets/javascripts/monitoring/components/graph/axis.vue b/app/assets/javascripts/monitoring/components/graph/axis.vue index 616410ec34f..8f046857a20 100644 --- a/app/assets/javascripts/monitoring/components/graph/axis.vue +++ b/app/assets/javascripts/monitoring/components/graph/axis.vue @@ -110,19 +110,8 @@ export default { > {{ yAxisLabelSentenceCase }} </text> - <rect - :x="xPosition + 60" - :y="graphHeight - 80" - class="rect-axis-text" - width="35" - height="50" - /> - <text - :x="xPosition + 60" - :y="yPosition" - class="label-axis-text x-label-text" - dy=".35em" - > + <rect :x="xPosition + 60" :y="graphHeight - 80" class="rect-axis-text" width="35" height="50" /> + <text :x="xPosition + 60" :y="yPosition" class="label-axis-text x-label-text" dy=".35em"> {{ timeString }} </text> </g> diff --git a/app/assets/javascripts/monitoring/components/graph/deployment.vue b/app/assets/javascripts/monitoring/components/graph/deployment.vue index a7289ed53e8..bee9784692c 100644 --- a/app/assets/javascripts/monitoring/components/graph/deployment.vue +++ b/app/assets/javascripts/monitoring/components/graph/deployment.vue @@ -31,41 +31,16 @@ export default { <g v-for="(deployment, index) in deploymentData" :key="index" - :transform="transformDeploymentGroup(deployment)"> - <rect - :height="calculatedHeight" - x="0" - y="0" - width="3" - fill="url(#shadow-gradient)" - /> - <line - :y2="calculatedHeight" - class="deployment-line" - x1="0" - y1="0" - x2="0" - stroke="#000" - /> - </g> - <svg - height="0" - width="0" + :transform="transformDeploymentGroup(deployment)" > + <rect :height="calculatedHeight" x="0" y="0" width="3" fill="url(#shadow-gradient)" /> + <line :y2="calculatedHeight" class="deployment-line" x1="0" y1="0" x2="0" stroke="#000" /> + </g> + <svg height="0" width="0"> <defs> - <linearGradient - id="shadow-gradient" - > - <stop - offset="0%" - stop-color="#000" - stop-opacity="0.4" - /> - <stop - offset="100%" - stop-color="#000" - stop-opacity="0" - /> + <linearGradient id="shadow-gradient"> + <stop offset="0%" stop-color="#000" stop-opacity="0.4" /> + <stop offset="100%" stop-color="#000" stop-opacity="0" /> </linearGradient> </defs> </svg> diff --git a/app/assets/javascripts/monitoring/components/graph/flag.vue b/app/assets/javascripts/monitoring/components/graph/flag.vue index 1720476480e..9d6d1caef80 100644 --- a/app/assets/javascripts/monitoring/components/graph/flag.vue +++ b/app/assets/javascripts/monitoring/components/graph/flag.vue @@ -117,59 +117,29 @@ export default { </script> <template> - <div - :style="cursorStyle" - class="prometheus-graph-cursor" - > - <div - v-if="showFlagContent" - :class="flagOrientation" - class="prometheus-graph-flag popover" - > + <div :style="cursorStyle" class="prometheus-graph-cursor"> + <div v-if="showFlagContent" :class="flagOrientation" class="prometheus-graph-flag popover"> <div class="arrow-shadow"></div> <div class="arrow"></div> <div class="popover-title"> - <h5 v-if="deploymentFlagData"> - Deployed - </h5> - {{ formatDate }} - <strong>{{ formatTime }}</strong> + <h5 v-if="deploymentFlagData">Deployed</h5> + {{ formatDate }} <strong>{{ formatTime }}</strong> </div> - <div - v-if="deploymentFlagData" - class="popover-content deploy-meta-content" - > + <div v-if="deploymentFlagData" class="popover-content deploy-meta-content"> <div> - <icon - :size="12" - name="commit" - /> - <a :href="deploymentFlagData.commitUrl"> - {{ deploymentFlagData.sha.slice(0, 8) }} - </a> + <icon :size="12" name="commit" /> + <a :href="deploymentFlagData.commitUrl"> {{ deploymentFlagData.sha.slice(0, 8) }} </a> </div> - <div - v-if="deploymentFlagData.tag" - > - <icon - :size="12" - name="label" - /> - <a :href="deploymentFlagData.tagUrl"> - {{ deploymentFlagData.ref }} - </a> + <div v-if="deploymentFlagData.tag"> + <icon :size="12" name="label" /> + <a :href="deploymentFlagData.tagUrl"> {{ deploymentFlagData.ref }} </a> </div> </div> <div class="popover-content"> <table class="prometheus-table"> - <tr - v-for="(series, index) in timeSeries" - :key="index" - > - <track-line :track="series"/> - <td> - {{ series.track }} {{ seriesMetricLabel(index, series) }} - </td> + <tr v-for="(series, index) in timeSeries" :key="index"> + <track-line :track="series" /> + <td>{{ series.track }} {{ seriesMetricLabel(index, series) }}</td> <td> <strong>{{ seriesMetricValue(index, series) }}</strong> </td> diff --git a/app/assets/javascripts/monitoring/components/graph/legend.vue b/app/assets/javascripts/monitoring/components/graph/legend.vue index ef18ae5c2c8..b5211c306a3 100644 --- a/app/assets/javascripts/monitoring/components/graph/legend.vue +++ b/app/assets/javascripts/monitoring/components/graph/legend.vue @@ -39,15 +39,9 @@ export default { <strong v-if="series.renderCanary">{{ series.trackName }}</strong> </td> <track-line :track="series" /> - <td - v-if="timeSeries.length > 1" - class="legend-metric-title"> - <track-info - v-if="series.metricTag" - :track="series" /> - <track-info - v-else - :track="series"> + <td v-if="timeSeries.length > 1" class="legend-metric-title"> + <track-info v-if="series.metricTag" :track="series" /> + <track-info v-else :track="series"> <strong>{{ legendTitle }}</strong> series {{ index + 1 }} </track-info> </td> @@ -57,13 +51,9 @@ export default { </track-info> </td> <template v-for="(track, trackIndex) in series.tracksLegend"> - <track-line - :key="`track-line-${trackIndex}`" - :track="track"/> + <track-line :key="`track-line-${trackIndex}`" :track="track" /> <td :key="`track-info-${trackIndex}`"> - <track-info - :track="track" - class="legend-metric-title" /> + <track-info :track="track" class="legend-metric-title" /> </td> </template> </tr> diff --git a/app/assets/javascripts/monitoring/components/graph/path.vue b/app/assets/javascripts/monitoring/components/graph/path.vue index a9b7ce586ce..f2c237ec391 100644 --- a/app/assets/javascripts/monitoring/components/graph/path.vue +++ b/app/assets/javascripts/monitoring/components/graph/path.vue @@ -52,11 +52,7 @@ export default { class="circle-path" r="3" /> - <path - :d="generatedAreaPath" - :fill="areaColor" - class="metric-area" - /> + <path :d="generatedAreaPath" :fill="areaColor" class="metric-area" /> <path :d="generatedLinePath" :stroke="lineColor" diff --git a/app/assets/javascripts/monitoring/components/graph/track_line.vue b/app/assets/javascripts/monitoring/components/graph/track_line.vue index e04fd9c1f35..d2ed1ba113e 100644 --- a/app/assets/javascripts/monitoring/components/graph/track_line.vue +++ b/app/assets/javascripts/monitoring/components/graph/track_line.vue @@ -18,9 +18,7 @@ export default { </script> <template> <td> - <svg - width="16" - height="8"> + <svg width="16" height="8"> <line :stroke-dasharray="stylizedLine" :stroke="track.lineColor" diff --git a/app/assets/javascripts/monitoring/components/graph_group.vue b/app/assets/javascripts/monitoring/components/graph_group.vue index 241627f9790..b20ad1802f3 100644 --- a/app/assets/javascripts/monitoring/components/graph_group.vue +++ b/app/assets/javascripts/monitoring/components/graph_group.vue @@ -15,21 +15,11 @@ export default { </script> <template> - <div - v-if="showPanels" - class="card prometheus-panel" - > + <div v-if="showPanels" class="card prometheus-panel"> <div class="card-header"> <h4>{{ name }}</h4> </div> - <div class="card-body prometheus-graph-group"> - <slot></slot> - </div> - </div> - <div - v-else - class="prometheus-graph-group" - > - <slot></slot> + <div class="card-body prometheus-graph-group"><slot></slot></div> </div> + <div v-else class="prometheus-graph-group"><slot></slot></div> </template> diff --git a/app/assets/javascripts/notebook/cells/code.vue b/app/assets/javascripts/notebook/cells/code.vue index 18cef82cec0..bd6736152f5 100644 --- a/app/assets/javascripts/notebook/cells/code.vue +++ b/app/assets/javascripts/notebook/cells/code.vue @@ -42,12 +42,14 @@ export default { :raw-code="rawInputCode" :count="cell.execution_count" :code-css-class="codeCssClass" - type="input" /> + type="input" + /> <output-cell v-if="hasOutput" :count="cell.execution_count" :output="output" - :code-css-class="codeCssClass" /> + :code-css-class="codeCssClass" + /> </div> </template> diff --git a/app/assets/javascripts/notebook/cells/code/index.vue b/app/assets/javascripts/notebook/cells/code/index.vue index 0691ba64f8e..8bf2431c4c6 100644 --- a/app/assets/javascripts/notebook/cells/code/index.vue +++ b/app/assets/javascripts/notebook/cells/code/index.vue @@ -44,14 +44,7 @@ export default { <template> <div :class="type"> - <prompt - :type="promptType" - :count="count" /> - <pre - ref="code" - :class="codeCssClass" - class="language-python" - v-text="code"> - </pre> + <prompt :type="promptType" :count="count" /> + <pre ref="code" :class="codeCssClass" class="language-python" v-text="code"></pre> </div> </template> diff --git a/app/assets/javascripts/notebook/cells/markdown.vue b/app/assets/javascripts/notebook/cells/markdown.vue index 5aa83db0986..61eabbcb8b2 100644 --- a/app/assets/javascripts/notebook/cells/markdown.vue +++ b/app/assets/javascripts/notebook/cells/markdown.vue @@ -100,10 +100,7 @@ export default { <template> <div class="cell text-cell"> <prompt /> - <div - class="markdown" - v-html="markdown"> - </div> + <div class="markdown" v-html="markdown"></div> </div> </template> diff --git a/app/assets/javascripts/notebook/cells/output/image.vue b/app/assets/javascripts/notebook/cells/output/image.vue index a17868963ce..fe8c81398fb 100644 --- a/app/assets/javascripts/notebook/cells/output/image.vue +++ b/app/assets/javascripts/notebook/cells/output/image.vue @@ -19,8 +19,5 @@ export default { </script> <template> - <div class="output"> - <prompt /> - <img :src="'data:' + outputType + ';base64,' + rawCode" /> - </div> + <div class="output"><prompt /> <img :src="'data:' + outputType + ';base64,' + rawCode" /></div> </template> diff --git a/app/assets/javascripts/notebook/cells/output/index.vue b/app/assets/javascripts/notebook/cells/output/index.vue index d9f8604ed10..bd0bcc0d819 100644 --- a/app/assets/javascripts/notebook/cells/output/index.vue +++ b/app/assets/javascripts/notebook/cells/output/index.vue @@ -22,7 +22,7 @@ export default { }, output: { type: Object, - requred: true, + required: true, default: () => ({}), }, }, diff --git a/app/assets/javascripts/notebook/cells/prompt.vue b/app/assets/javascripts/notebook/cells/prompt.vue index d96f701ee3e..3f1f239a806 100644 --- a/app/assets/javascripts/notebook/cells/prompt.vue +++ b/app/assets/javascripts/notebook/cells/prompt.vue @@ -22,9 +22,7 @@ export default { <template> <div class="prompt"> - <span v-if="hasKeys"> - {{ type }} [{{ count }}]: - </span> + <span v-if="hasKeys"> {{ type }} [{{ count }}]: </span> </div> </template> diff --git a/app/assets/javascripts/notebook/index.vue b/app/assets/javascripts/notebook/index.vue index c5cc8c97dda..6a54d0b3823 100644 --- a/app/assets/javascripts/notebook/index.vue +++ b/app/assets/javascripts/notebook/index.vue @@ -52,7 +52,8 @@ export default { v-for="(cell, index) in cells" :key="index" :cell="cell" - :code-css-class="codeCssClass" /> + :code-css-class="codeCssClass" + /> </div> </template> diff --git a/app/assets/javascripts/notes/components/comment_form.vue b/app/assets/javascripts/notes/components/comment_form.vue index 10e80883c00..884ccca7bde 100644 --- a/app/assets/javascripts/notes/components/comment_form.vue +++ b/app/assets/javascripts/notes/components/comment_form.vue @@ -308,13 +308,8 @@ Please check your network connection and try again.`; <template> <div> <note-signed-out-widget v-if="!isLoggedIn" /> - <discussion-locked-widget - v-else-if="!canCreateNote" - :issuable-type="issuableTypeTitle" - /> - <div - v-else-if="canCreateNote" - class="notes notes-form timeline"> + <discussion-locked-widget v-else-if="!canCreateNote" :issuable-type="issuableTypeTitle" /> + <div v-else-if="canCreateNote" class="notes notes-form timeline"> <div class="timeline-entry note-form"> <div class="timeline-entry-inner"> <div class="flash-container error-alert timeline-content"></div> @@ -328,11 +323,7 @@ Please check your network connection and try again.`; /> </div> <div class="timeline-content timeline-content-form"> - <form - ref="commentForm" - class="new-note common-note-form gfm-form js-main-target-form" - > - + <form ref="commentForm" class="new-note common-note-form gfm-form js-main-target-form"> <div class="error-alert"></div> <issue-warning @@ -347,7 +338,8 @@ Please check your network connection and try again.`; :markdown-docs-path="markdownDocsPath" :quick-actions-docs-path="quickActionsDocsPath" :markdown-version="markdownVersion" - :add-spacing-classes="false"> + :add-spacing-classes="false" + > <textarea id="note-body" ref="textarea" @@ -360,21 +352,24 @@ js-gfm-input js-autosize markdown-area js-vue-textarea qa-comment-input" data-supports-quick-actions="true" aria-label="Description" placeholder="Write a comment or drag your files here…" - @keydown.up="editCurrentUserLastNote()" - @keydown.meta.enter="handleSave()" - @keydown.ctrl.enter="handleSave()"> + @keydown.up="editCurrentUserLastNote();" + @keydown.meta.enter="handleSave();" + @keydown.ctrl.enter="handleSave();" + > </textarea> </markdown-field> <div class="note-form-actions"> <div class="float-left btn-group -append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown"> +append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" + > <button :disabled="isSubmitButtonDisabled" class="btn btn-create comment-btn js-comment-button js-comment-submit-button qa-comment-button" type="submit" - @click.prevent="handleSave()"> + @click.prevent="handleSave();" + > {{ __(commentButtonTitle) }} </button> <button @@ -384,11 +379,9 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" class="btn comment-btn note-type-toggle js-note-new-discussion dropdown-toggle qa-note-dropdown" data-display="static" data-toggle="dropdown" - aria-label="Open comment type dropdown"> - <i - aria-hidden="true" - class="fa fa-caret-down toggle-icon"> - </i> + aria-label="Open comment type dropdown" + > + <i aria-hidden="true" class="fa fa-caret-down toggle-icon"> </i> </button> <ul class="note-type-dropdown dropdown-open-top dropdown-menu"> @@ -396,16 +389,12 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" <button type="button" class="btn btn-transparent" - @click.prevent="setNoteType('comment')"> - <i - aria-hidden="true" - class="fa fa-check icon"> - </i> + @click.prevent="setNoteType('comment');" + > + <i aria-hidden="true" class="fa fa-check icon"> </i> <div class="description"> <strong>Comment</strong> - <p> - Add a general comment to this {{ noteableDisplayName }}. - </p> + <p>Add a general comment to this {{ noteableDisplayName }}.</p> </div> </button> </li> @@ -414,16 +403,12 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" <button type="button" class="btn btn-transparent qa-discussion-option" - @click.prevent="setNoteType('discussion')"> - <i - aria-hidden="true" - class="fa fa-check icon"> - </i> + @click.prevent="setNoteType('discussion');" + > + <i aria-hidden="true" class="fa fa-check icon"> </i> <div class="description"> <strong>Start discussion</strong> - <p> - {{ startDiscussionDescription }} - </p> + <p>{{ startDiscussionDescription }}</p> </div> </button> </li> @@ -435,18 +420,19 @@ append-right-10 comment-type-dropdown js-comment-type-dropdown droplab-dropdown" :loading="isToggleStateButtonLoading" :container-class="[ actionButtonClassNames, - 'btn btn-comment btn-comment-and-close js-action-button' + 'btn btn-comment btn-comment-and-close js-action-button', ]" :disabled="isToggleStateButtonLoading || isSubmitting" :label="issueActionButtonTitle" - @click="handleSave(true)" + @click="handleSave(true);" /> <button v-if="note.length" type="button" class="btn btn-cancel js-note-discard" - @click="discard"> + @click="discard" + > Discard draft </button> </div> diff --git a/app/assets/javascripts/notes/components/diff_with_note.vue b/app/assets/javascripts/notes/components/diff_with_note.vue index 30fcb895369..8e8bd150647 100644 --- a/app/assets/javascripts/notes/components/diff_with_note.vue +++ b/app/assets/javascripts/notes/components/diff_with_note.vue @@ -90,11 +90,7 @@ export default { </script> <template> - <div - ref="fileHolder" - :class="diffFileClass" - class="diff-file file-holder" - > + <div ref="fileHolder" :class="diffFileClass" class="diff-file file-holder"> <diff-file-header :discussion-path="discussion.discussion_path" :diff-file="diffFile" @@ -102,36 +98,17 @@ export default { :discussions-expanded="isDiscussionsExpanded" :expanded="!isCollapsed" /> - <div - v-if="diffFile.text" - :class="userColorScheme" - class="diff-content code" - > + <div v-if="diffFile.text" :class="userColorScheme" class="diff-content code"> <table> - <tr - v-for="line in normalizedDiffLines" - :key="line.line_code" - class="line_holder" - > + <tr v-for="line in normalizedDiffLines" :key="line.line_code" class="line_holder"> <td class="diff-line-num old_line">{{ line.old_line }}</td> <td class="diff-line-num new_line">{{ line.new_line }}</td> - <td - :class="line.type" - class="line_content" - v-html="line.rich_text" - > - </td> + <td :class="line.type" class="line_content" v-html="line.rich_text"></td> </tr> - <tr - v-if="!hasTruncatedDiffLines" - class="line_holder line-holder-placeholder" - > + <tr v-if="!hasTruncatedDiffLines" class="line_holder line-holder-placeholder"> <td class="old_line diff-line-num"></td> <td class="new_line diff-line-num"></td> - <td - v-if="error" - class="js-error-lazy-load-diff diff-loading-error-block" - > + <td v-if="error" class="js-error-lazy-load-diff diff-loading-error-block"> Unable to load the diff <button class="btn-link btn-link-retry btn-no-padding js-toggle-lazy-diff-retry-button" @@ -140,28 +117,18 @@ export default { Try again </button> </td> - <td - v-else - class="line_content js-success-lazy-load" - > + <td v-else class="line_content js-success-lazy-load"> <span></span> <gl-skeleton-loading /> <span></span> </td> </tr> <tr class="notes_holder"> - <td - class="notes_content" - colspan="3" - > - <slot></slot> - </td> + <td class="notes_content" colspan="3"><slot></slot></td> </tr> </table> </div> - <div - v-else - > + <div v-else> <diff-viewer :diff-mode="diffMode" :new-path="diffFile.new_path" diff --git a/app/assets/javascripts/notes/components/discussion_counter.vue b/app/assets/javascripts/notes/components/discussion_counter.vue index a4d76a70696..ee79ecbf9b3 100644 --- a/app/assets/javascripts/notes/components/discussion_counter.vue +++ b/app/assets/javascripts/notes/components/discussion_counter.vue @@ -50,13 +50,9 @@ export default { </script> <template> - <div - v-if="discussionCount > 0" - class="line-resolve-all-container prepend-top-8"> + <div v-if="discussionCount > 0" class="line-resolve-all-container prepend-top-8"> <div> - <div - :class="{ 'has-next-btn': hasNextButton }" - class="line-resolve-all"> + <div :class="{ 'has-next-btn': hasNextButton }" class="line-resolve-all"> <span :class="{ 'is-active': allResolved }" class="line-resolve-btn is-disabled" @@ -68,29 +64,25 @@ export default { {{ resolvedDiscussionCount }}/{{ discussionCount }} {{ countText }} resolved </span> </div> - <div - v-if="resolveAllDiscussionsIssuePath && !allResolved" - class="btn-group" - role="group"> + <div v-if="resolveAllDiscussionsIssuePath && !allResolved" class="btn-group" role="group"> <a v-tooltip :href="resolveAllDiscussionsIssuePath" :title="s__('Resolve all discussions in new issue')" data-container="body" - class="new-issue-for-discussion btn btn-default discussion-create-issue-btn"> + class="new-issue-for-discussion btn btn-default discussion-create-issue-btn" + > <icon name="issue-new" /> </a> </div> - <div - v-if="isLoggedIn && !allResolved" - class="btn-group" - role="group"> + <div v-if="isLoggedIn && !allResolved" class="btn-group" role="group"> <button v-tooltip title="Jump to first unresolved discussion" data-container="body" class="btn btn-default discussion-next-btn" - @click="jumpToFirstUnresolvedDiscussion"> + @click="jumpToFirstUnresolvedDiscussion" + > <icon name="comment-next" /> </button> </div> diff --git a/app/assets/javascripts/notes/components/discussion_filter.vue b/app/assets/javascripts/notes/components/discussion_filter.vue index affa2d1b574..86c114a761a 100644 --- a/app/assets/javascripts/notes/components/discussion_filter.vue +++ b/app/assets/javascripts/notes/components/discussion_filter.vue @@ -64,30 +64,24 @@ export default { data-toggle="dropdown" aria-expanded="false" > - {{ currentFilter.title }} - <icon name="chevron-down" /> + {{ currentFilter.title }} <icon name="chevron-down" /> </button> <div class="dropdown-menu dropdown-menu-selectable dropdown-menu-right" - aria-labelledby="discussion-filter-dropdown"> + aria-labelledby="discussion-filter-dropdown" + > <div class="dropdown-content"> <ul> - <li - v-for="filter in filters" - :key="filter.value" - > + <li v-for="filter in filters" :key="filter.value"> <button :class="{ 'is-active': filter.value === currentValue }" class="qa-filter-options" type="button" - @click="selectFilter(filter.value)" + @click="selectFilter(filter.value);" > {{ filter.title }} </button> - <div - v-if="filter.value === defaultValue" - class="dropdown-divider" - ></div> + <div v-if="filter.value === defaultValue" class="dropdown-divider"></div> </li> </ul> </div> diff --git a/app/assets/javascripts/notes/components/discussion_locked_widget.vue b/app/assets/javascripts/notes/components/discussion_locked_widget.vue index de0a5f8489b..c469a6b7bcd 100644 --- a/app/assets/javascripts/notes/components/discussion_locked_widget.vue +++ b/app/assets/javascripts/notes/components/discussion_locked_widget.vue @@ -13,11 +13,7 @@ export default { <template> <div class="disabled-comment text-center"> <span class="issuable-note-warning inline"> - <icon - :size="16" - name="lock" - class="icon" - /> + <icon :size="16" name="lock" class="icon" /> <span> This {{ issuableDisplayName }} is locked. Only <b>project members</b> can comment. </span> diff --git a/app/assets/javascripts/notes/components/note_actions.vue b/app/assets/javascripts/notes/components/note_actions.vue index 0f0d7f4661a..9a5817890c9 100644 --- a/app/assets/javascripts/notes/components/note_actions.vue +++ b/app/assets/javascripts/notes/components/note_actions.vue @@ -119,14 +119,8 @@ export default { <template> <div class="note-actions"> - <span - v-if="accessLevel" - class="note-role user-access-role"> - {{ accessLevel }} - </span> - <div - v-if="canResolve" - class="note-actions-item"> + <span v-if="accessLevel" class="note-role user-access-role"> {{ accessLevel }} </span> + <div v-if="canResolve" class="note-actions-item"> <button v-tooltip :class="{ 'is-disabled': !resolvable, 'is-active': isResolved }" @@ -134,19 +128,15 @@ export default { :aria-label="resolveButtonTitle" type="button" class="line-resolve-btn note-action-button" - @click="onResolve"> + @click="onResolve" + > <template v-if="!isResolving"> <icon name="check-circle" /> </template> - <gl-loading-icon - v-else - inline - /> + <gl-loading-icon v-else inline /> </button> </div> - <div - v-if="canAwardEmoji" - class="note-actions-item"> + <div v-if="canAwardEmoji" class="note-actions-item"> <a v-tooltip :class="{ 'js-user-authored': isAuthoredByCurrentUser }" @@ -157,24 +147,16 @@ export default { href="#" title="Add reaction" > - <gl-loading-icon inline/> + <gl-loading-icon inline /> <icon css-classes="link-highlight award-control-icon-neutral" name="emoji_slightly_smiling_face" /> - <icon - css-classes="link-highlight award-control-icon-positive" - name="emoji_smiley" - /> - <icon - css-classes="link-highlight award-control-icon-super-positive" - name="emoji_smiley" - /> + <icon css-classes="link-highlight award-control-icon-positive" name="emoji_smiley" /> + <icon css-classes="link-highlight award-control-icon-super-positive" name="emoji_smiley" /> </a> </div> - <div - v-if="canEdit" - class="note-actions-item"> + <div v-if="canEdit" class="note-actions-item"> <button v-tooltip type="button" @@ -182,17 +164,12 @@ export default { class="note-action-button js-note-edit btn btn-transparent" data-container="body" data-placement="bottom" - @click="onEdit"> - <icon - name="pencil" - css-classes="link-highlight" - /> + @click="onEdit" + > + <icon name="pencil" css-classes="link-highlight" /> </button> </div> - <div - v-if="showDeleteAction" - class="note-actions-item" - > + <div v-if="showDeleteAction" class="note-actions-item"> <button v-tooltip type="button" @@ -202,15 +179,10 @@ export default { data-placement="bottom" @click="onDelete" > - <icon - name="remove" - class="link-highlight" - /> + <icon name="remove" class="link-highlight" /> </button> </div> - <div - v-else-if="shouldShowActionsDropdown" - class="dropdown more-actions note-actions-item"> + <div v-else-if="shouldShowActionsDropdown" class="dropdown more-actions note-actions-item"> <button v-tooltip type="button" @@ -218,17 +190,13 @@ export default { class="note-action-button more-actions-toggle btn btn-transparent" data-toggle="dropdown" data-container="body" - data-placement="bottom"> - <icon - css-classes="icon" - name="ellipsis_v" - /> + data-placement="bottom" + > + <icon css-classes="icon" name="ellipsis_v" /> </button> <ul class="dropdown-menu more-actions-dropdown dropdown-open-left"> <li v-if="canReportAsAbuse"> - <a :href="reportAbusePath"> - {{ __('Report abuse to GitLab') }} - </a> + <a :href="reportAbusePath"> {{ __('Report abuse to GitLab') }} </a> </li> <li v-if="noteUrl"> <button @@ -243,10 +211,9 @@ export default { <button class="btn btn-transparent js-note-delete js-note-delete" type="button" - @click.prevent="onDelete"> - <span class="text-danger"> - {{ __('Delete comment') }} - </span> + @click.prevent="onDelete" + > + <span class="text-danger"> {{ __('Delete comment') }} </span> </button> </li> </ul> diff --git a/app/assets/javascripts/notes/components/note_attachment.vue b/app/assets/javascripts/notes/components/note_attachment.vue index 34ecbd00c63..b6d8c831e2e 100644 --- a/app/assets/javascripts/notes/components/note_attachment.vue +++ b/app/assets/javascripts/notes/components/note_attachment.vue @@ -12,27 +12,12 @@ export default { <template> <div class="note-attachment"> - <a - v-if="attachment.image" - :href="attachment.url" - target="_blank" - rel="noopener noreferrer"> - <img - :src="attachment.url" - class="note-image-attach" - /> + <a v-if="attachment.image" :href="attachment.url" target="_blank" rel="noopener noreferrer"> + <img :src="attachment.url" class="note-image-attach" /> </a> <div class="attachment"> - <a - v-if="attachment.url" - :href="attachment.url" - target="_blank" - rel="noopener noreferrer"> - <i - class="fa fa-paperclip" - aria-hidden="true"> - </i> - {{ attachment.filename }} + <a v-if="attachment.url" :href="attachment.url" target="_blank" rel="noopener noreferrer"> + <i class="fa fa-paperclip" aria-hidden="true"> </i> {{ attachment.filename }} </a> </div> </div> diff --git a/app/assets/javascripts/notes/components/note_awards_list.vue b/app/assets/javascripts/notes/components/note_awards_list.vue index 401bcfabbe4..4aba2e65edb 100644 --- a/app/assets/javascripts/notes/components/note_awards_list.vue +++ b/app/assets/javascripts/notes/components/note_awards_list.vue @@ -174,15 +174,12 @@ export default { data-boundary="viewport" data-placement="bottom" type="button" - @click="handleAward(awardName)"> + @click="handleAward(awardName);" + > <span v-html="getAwardHTML(awardName)"></span> - <span class="award-control-text js-counter"> - {{ awardList.length }} - </span> + <span class="award-control-text js-counter"> {{ awardList.length }} </span> </button> - <div - v-if="canAwardEmoji" - class="award-menu-holder"> + <div v-if="canAwardEmoji" class="award-menu-holder"> <button v-tooltip :class="{ 'js-user-authored': isAuthoredByMe }" @@ -191,7 +188,8 @@ export default { aria-label="Add reaction" data-boundary="viewport" data-placement="bottom" - type="button"> + type="button" + > <span class="award-control-icon award-control-icon-neutral"> <icon name="emoji_slightly_smiling_face" /> </span> @@ -203,7 +201,8 @@ export default { </span> <i aria-hidden="true" - class="fa fa-spinner fa-spin award-control-icon award-control-icon-loading"></i> + class="fa fa-spinner fa-spin award-control-icon award-control-icon-loading" + ></i> </button> </div> </div> diff --git a/app/assets/javascripts/notes/components/note_body.vue b/app/assets/javascripts/notes/components/note_body.vue index 9375627359c..c0bee600181 100644 --- a/app/assets/javascripts/notes/components/note_body.vue +++ b/app/assets/javascripts/notes/components/note_body.vue @@ -67,13 +67,8 @@ export default { </script> <template> - <div - ref="note-body" - :class="{ 'js-task-list-container': canEdit }" - class="note-body"> - <div - class="note-text md" - v-html="note.note_html"></div> + <div ref="note-body" :class="{ 'js-task-list-container': canEdit }" class="note-body"> + <div class="note-text md" v-html="note.note_html"></div> <note-form v-if="isEditing" ref="noteForm" @@ -88,7 +83,8 @@ export default { v-if="canEdit" v-model="note.note" :data-update-url="note.path" - class="hidden js-task-list-field"></textarea> + class="hidden js-task-list-field" + ></textarea> <note-edited-text v-if="note.last_edited_at" :edited-at="note.last_edited_at" @@ -104,9 +100,6 @@ export default { :toggle-award-path="note.toggle_award_path" :can-award-emoji="note.current_user.can_award_emoji" /> - <note-attachment - v-if="note.attachment" - :attachment="note.attachment" - /> + <note-attachment v-if="note.attachment" :attachment="note.attachment" /> </div> </template> diff --git a/app/assets/javascripts/notes/components/note_edited_text.vue b/app/assets/javascripts/notes/components/note_edited_text.vue index d848335022f..3d3dbbd7fe1 100644 --- a/app/assets/javascripts/notes/components/note_edited_text.vue +++ b/app/assets/javascripts/notes/components/note_edited_text.vue @@ -39,17 +39,9 @@ export default { <div :class="className"> {{ actionText }} <template v-if="editedBy"> - by - <a - :href="editedBy.path" - class="js-vue-author author-link"> - {{ editedBy.name }} - </a> + by <a :href="editedBy.path" class="js-vue-author author-link"> {{ editedBy.name }} </a> </template> {{ actionDetailText }} - <time-ago-tooltip - :time="editedAt" - tooltip-placement="bottom" - /> + <time-ago-tooltip :time="editedAt" tooltip-placement="bottom" /> </div> </template> diff --git a/app/assets/javascripts/notes/components/note_form.vue b/app/assets/javascripts/notes/components/note_form.vue index 31ee8fed984..ad58267b533 100644 --- a/app/assets/javascripts/notes/components/note_form.vue +++ b/app/assets/javascripts/notes/components/note_form.vue @@ -146,27 +146,14 @@ export default { </script> <template> - <div - ref="editNoteForm" - class="note-edit-form current-note-edit-form js-discussion-note-form"> - <div - v-if="conflictWhileEditing" - class="js-conflict-edit-warning alert alert-danger"> + <div ref="editNoteForm" class="note-edit-form current-note-edit-form js-discussion-note-form"> + <div v-if="conflictWhileEditing" class="js-conflict-edit-warning alert alert-danger"> This comment has changed since you started editing, please review the - <a - :href="noteHash" - target="_blank" - rel="noopener noreferrer"> - updated comment - </a> - to ensure information is not lost. + <a :href="noteHash" target="_blank" rel="noopener noreferrer"> updated comment </a> to ensure + information is not lost. </div> <div class="flash-container timeline-content"></div> - <form - :data-line-code="lineCode" - class="edit-note common-note-form js-quick-submit gfm-form" - > - + <form :data-line-code="lineCode" class="edit-note common-note-form js-quick-submit gfm-form"> <issue-warning v-if="hasWarning(getNoteableData)" :is-locked="isLocked(getNoteableData)" @@ -178,7 +165,8 @@ export default { :markdown-docs-path="markdownDocsPath" :markdown-version="markdownVersion" :quick-actions-docs-path="quickActionsDocsPath" - :add-spacing-classes="false"> + :add-spacing-classes="false" + > <textarea id="note_note" ref="textarea" @@ -190,10 +178,11 @@ export default { js-autosize markdown-area js-vue-issue-note-form js-vue-textarea qa-reply-input" aria-label="Description" placeholder="Write a comment or drag your files here…" - @keydown.meta.enter="handleUpdate()" - @keydown.ctrl.enter="handleUpdate()" - @keydown.up="editMyLastNote()" - @keydown.esc="cancelHandler(true)"> + @keydown.meta.enter="handleUpdate();" + @keydown.ctrl.enter="handleUpdate();" + @keydown.up="editMyLastNote();" + @keydown.esc="cancelHandler(true);" + > </textarea> </markdown-field> <div class="note-form-actions clearfix"> @@ -201,20 +190,22 @@ js-autosize markdown-area js-vue-issue-note-form js-vue-textarea qa-reply-input" :disabled="isDisabled" type="button" class="js-vue-issue-save btn btn-success js-comment-button " - @click="handleUpdate()"> + @click="handleUpdate();" + > {{ saveButtonTitle }} </button> <button v-if="discussion.resolvable" class="btn btn-nr btn-default append-right-10 js-comment-resolve-button" - @click.prevent="handleUpdate(true)" + @click.prevent="handleUpdate(true);" > {{ resolveButtonTitle }} </button> <button class="btn btn-cancel note-edit-cancel js-close-discussion-note-form" type="button" - @click="cancelHandler()"> + @click="cancelHandler();" + > Cancel </button> </div> diff --git a/app/assets/javascripts/notes/components/note_header.vue b/app/assets/javascripts/notes/components/note_header.vue index dd7313d7b10..8b7450783c9 100644 --- a/app/assets/javascripts/notes/components/note_header.vue +++ b/app/assets/javascripts/notes/components/note_header.vue @@ -63,44 +63,26 @@ export default { <template> <div class="note-header-info"> - <div - v-if="includeToggle" - class="discussion-actions"> + <div v-if="includeToggle" class="discussion-actions"> <button class="note-action-button discussion-toggle-button js-vue-toggle-button" type="button" - @click="handleToggle"> - <i - :class="toggleChevronClass" - class="fa" - aria-hidden="true"> - </i> + @click="handleToggle" + > + <i :class="toggleChevronClass" class="fa" aria-hidden="true"> </i> {{ __('Toggle discussion') }} </button> </div> - <a - v-if="hasAuthor" - :href="author.path" - > + <a v-if="hasAuthor" :href="author.path"> <span class="note-header-author-name">{{ author.name }}</span> - <span - v-if="author.status_tooltip_html" - v-html="author.status_tooltip_html"></span> - <span class="note-headline-light"> - @{{ author.username }} - </span> + <span v-if="author.status_tooltip_html" v-html="author.status_tooltip_html"></span> + <span class="note-headline-light"> @{{ author.username }} </span> </a> - <span v-else> - {{ __('A deleted user') }} - </span> + <span v-else> {{ __('A deleted user') }} </span> <span class="note-headline-light"> <span class="note-headline-meta"> - <span class="system-note-message"> - <slot></slot> - </span> - <template - v-if="createdAt" - > + <span class="system-note-message"> <slot></slot> </span> + <template v-if="createdAt"> <span class="system-note-separator"> <template v-if="actionText"> {{ actionText }} @@ -109,11 +91,9 @@ export default { <a :href="noteTimestampLink" class="note-timestamp system-note-separator" - @click="updateTargetNoteHash"> - <time-ago-tooltip - :time="createdAt" - tooltip-placement="bottom" - /> + @click="updateTargetNoteHash" + > + <time-ago-tooltip :time="createdAt" tooltip-placement="bottom" /> </a> </template> <i diff --git a/app/assets/javascripts/notes/components/note_signed_out_widget.vue b/app/assets/javascripts/notes/components/note_signed_out_widget.vue index 91f7c269757..e3eb92956b1 100644 --- a/app/assets/javascripts/notes/components/note_signed_out_widget.vue +++ b/app/assets/javascripts/notes/components/note_signed_out_widget.vue @@ -16,10 +16,6 @@ export default { <template> <div class="disabled-comment text-center"> - Please - <a :href="registerLink">register</a> - or - <a :href="signInLink">sign in</a> - to reply + Please <a :href="registerLink">register</a> or <a :href="signInLink">sign in</a> to reply </div> </template> diff --git a/app/assets/javascripts/notes/components/noteable_discussion.vue b/app/assets/javascripts/notes/components/noteable_discussion.vue index 7740967ccd5..f6842fa240e 100644 --- a/app/assets/javascripts/notes/components/noteable_discussion.vue +++ b/app/assets/javascripts/notes/components/noteable_discussion.vue @@ -302,20 +302,14 @@ Please check your network connection and try again.`; </script> <template> - <li - class="note note-discussion timeline-entry" - :class="componentClassName" - > + <li class="note note-discussion timeline-entry" :class="componentClassName"> <div class="timeline-entry-inner"> <div class="timeline-content"> <div :data-discussion-id="transformedDiscussion.discussion_id" class="discussion js-discussion-container" > - <div - v-if="shouldRenderHeader" - class="discussion-header note-wrapper" - > + <div v-if="shouldRenderHeader" class="discussion-header note-wrapper"> <div class="timeline-icon"> <user-avatar-link v-if="author" @@ -346,9 +340,7 @@ Please check your network connection and try again.`; </template> <template v-else-if="discussion.for_commit"> started a discussion on commit - <a :href="discussion.discussion_path"> - {{ truncateSha(discussion.commit_id) }} - </a> + <a :href="discussion.discussion_path"> {{ truncateSha(discussion.commit_id) }} </a> </template> <template v-else> started a discussion @@ -369,14 +361,8 @@ Please check your network connection and try again.`; class-name="discussion-headline-light js-discussion-headline" /> </div> - <div - v-if="shouldShowDiscussions" - class="discussion-body"> - <component - :is="wrapperComponent" - v-bind="wrapperComponentProps" - :class="wrapperClass" - > + <div v-if="shouldShowDiscussions" class="discussion-body"> + <component :is="wrapperComponent" v-bind="wrapperComponentProps" :class="wrapperClass"> <div class="discussion-notes"> <ul class="notes"> <template v-if="shouldGroupReplies"> @@ -385,11 +371,7 @@ Please check your network connection and try again.`; :note="componentData(initialDiscussion)" @handleDeleteNote="deleteNoteHandler" > - <slot - slot="avatar-badge" - name="avatar-badge" - > - </slot> + <slot slot="avatar-badge" name="avatar-badge"> </slot> </component> <toggle-replies-widget v-if="hasReplies" @@ -415,12 +397,7 @@ Please check your network connection and try again.`; :note="componentData(note)" @handleDeleteNote="deleteNoteHandler" > - <slot - v-if="index === 0" - slot="avatar-badge" - name="avatar-badge" - > - </slot> + <slot v-if="index === 0" slot="avatar-badge" name="avatar-badge"> </slot> </component> </template> </ul> @@ -443,7 +420,7 @@ Please check your network connection and try again.`; <button type="button" class="btn btn-default mr-sm-2" - @click="resolveHandler()" + @click="resolveHandler();" > <i v-if="isResolving" @@ -458,10 +435,7 @@ Please check your network connection and try again.`; class="btn-group discussion-actions ml-sm-2" role="group" > - <div - v-if="!discussionResolved" - class="btn-group" - role="group"> + <div v-if="!discussionResolved" class="btn-group" role="group"> <a v-tooltip :href="discussion.resolve_with_issue_path" @@ -473,10 +447,7 @@ Please check your network connection and try again.`; <icon name="issue-new" /> </a> </div> - <div - v-if="showJumpToNextDiscussion" - class="btn-group" - role="group"> + <div v-if="showJumpToNextDiscussion" class="btn-group" role="group"> <button v-tooltip class="btn btn-default discussion-next-btn" diff --git a/app/assets/javascripts/notes/components/noteable_note.vue b/app/assets/javascripts/notes/components/noteable_note.vue index 9ab91e2abe5..c2e49f8b23f 100644 --- a/app/assets/javascripts/notes/components/noteable_note.vue +++ b/app/assets/javascripts/notes/components/noteable_note.vue @@ -184,11 +184,7 @@ export default { :img-alt="author.name" :img-size="40" > - <slot - slot="avatar-badge" - name="avatar-badge" - > - </slot> + <slot slot="avatar-badge" name="avatar-badge"> </slot> </user-avatar-link> </div> <div class="timeline-content"> diff --git a/app/assets/javascripts/notes/components/notes_app.vue b/app/assets/javascripts/notes/components/notes_app.vue index 69ddfd751e0..79ece036e69 100644 --- a/app/assets/javascripts/notes/components/notes_app.vue +++ b/app/assets/javascripts/notes/components/notes_app.vue @@ -198,14 +198,8 @@ export default { </script> <template> - <div - v-show="shouldShow" - id="notes" - > - <ul - id="notes-list" - class="notes main-notes-list timeline" - > + <div v-show="shouldShow" id="notes"> + <ul id="notes-list" class="notes main-notes-list timeline"> <component :is="getComponentName(discussion)" v-for="discussion in allDiscussions" diff --git a/app/assets/javascripts/notes/components/toggle_replies_widget.vue b/app/assets/javascripts/notes/components/toggle_replies_widget.vue index 78ecbbb9247..e9d05c5cdcd 100644 --- a/app/assets/javascripts/notes/components/toggle_replies_widget.vue +++ b/app/assets/javascripts/notes/components/toggle_replies_widget.vue @@ -42,15 +42,9 @@ export default { </script> <template> - <li - :class="className" - class="replies-toggle" - > + <li :class="className" class="replies-toggle"> <template v-if="collapsed"> - <icon - name="chevron-right" - @click.native="toggle" - /> + <icon name="chevron-right" @click.native="toggle" /> <div> <user-avatar-link v-for="author in uniqueAuthors" @@ -63,32 +57,17 @@ export default { tooltip-placement="bottom" /> </div> - <button - class="btn btn-link js-replies-text" - type="button" - @click="toggle" - > + <button class="btn btn-link js-replies-text" type="button" @click="toggle"> {{ replies.length }} {{ n__('reply', 'replies', replies.length) }} </button> {{ __('Last reply by') }} - <a - :href="lastReply.author.path" - class="btn btn-link author-link" - > + <a :href="lastReply.author.path" class="btn btn-link author-link"> {{ lastReply.author.name }} </a> - <time-ago-tooltip - :time="lastReply.created_at" - tooltip-placement="bottom" - /> + <time-ago-tooltip :time="lastReply.created_at" tooltip-placement="bottom" /> </template> - <span - v-else - class="collapse-replies-btn js-collapse-replies" - @click="toggle" - > - <icon name="chevron-down" /> - {{ s__('Notes|Collapse replies') }} + <span v-else class="collapse-replies-btn js-collapse-replies" @click="toggle"> + <icon name="chevron-down" /> {{ s__('Notes|Collapse replies') }} </span> </li> </template> diff --git a/app/assets/javascripts/notes/stores/getters.js b/app/assets/javascripts/notes/stores/getters.js index 8df95c279eb..980d79605d7 100644 --- a/app/assets/javascripts/notes/stores/getters.js +++ b/app/assets/javascripts/notes/stores/getters.js @@ -81,15 +81,17 @@ export const allResolvableDiscussions = (state, getters) => export const resolvedDiscussionsById = state => { const map = {}; - state.discussions.filter(d => d.resolvable).forEach(n => { - if (n.notes) { - const resolved = n.notes.filter(note => note.resolvable).every(note => note.resolved); - - if (resolved) { - map[n.id] = n; + state.discussions + .filter(d => d.resolvable) + .forEach(n => { + if (n.notes) { + const resolved = n.notes.filter(note => note.resolvable).every(note => note.resolved); + + if (resolved) { + map[n.id] = n; + } } - } - }); + }); return map; }; diff --git a/app/assets/javascripts/pages/admin/projects/index/components/delete_project_modal.vue b/app/assets/javascripts/pages/admin/projects/index/components/delete_project_modal.vue index 3c383735f4a..527c16860c0 100644 --- a/app/assets/javascripts/pages/admin/projects/index/components/delete_project_modal.vue +++ b/app/assets/javascripts/pages/admin/projects/index/components/delete_project_modal.vue @@ -92,28 +92,12 @@ export default { @submit="onSubmit" @cancel="onCancel" > - <template - slot="body" - slot-scope="props" - > + <template slot="body" slot-scope="props"> <p v-html="props.text"></p> <p v-html="confirmationTextLabel"></p> - <form - ref="form" - :action="deleteProjectUrl" - method="post" - > - <input - ref="method" - type="hidden" - name="_method" - value="delete" - /> - <input - :value="csrfToken" - type="hidden" - name="authenticity_token" - /> + <form ref="form" :action="deleteProjectUrl" method="post"> + <input ref="method" type="hidden" name="_method" value="delete" /> + <input :value="csrfToken" type="hidden" name="authenticity_token" /> <input v-model="enteredProjectName" name="projectName" diff --git a/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue b/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue index 4b33fcc759a..e8905b479ee 100644 --- a/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue +++ b/app/assets/javascripts/pages/admin/users/components/delete_user_modal.vue @@ -128,28 +128,12 @@ export default { @submit="onSubmit" @cancel="onCancel" > - <template - slot="body" - slot-scope="props" - > + <template slot="body" slot-scope="props"> <p v-html="props.text"></p> <p v-html="confirmationTextLabel"></p> - <form - ref="form" - :action="deleteUserUrl" - method="post" - > - <input - ref="method" - type="hidden" - name="_method" - value="delete" - /> - <input - :value="csrfToken" - type="hidden" - name="authenticity_token" - /> + <form ref="form" :action="deleteUserUrl" method="post"> + <input ref="method" type="hidden" name="_method" value="delete" /> + <input :value="csrfToken" type="hidden" name="authenticity_token" /> <input v-model="enteredUsername" type="text" diff --git a/app/assets/javascripts/pages/milestones/shared/components/delete_milestone_modal.vue b/app/assets/javascripts/pages/milestones/shared/components/delete_milestone_modal.vue index a4778077bc4..061044eba84 100644 --- a/app/assets/javascripts/pages/milestones/shared/components/delete_milestone_modal.vue +++ b/app/assets/javascripts/pages/milestones/shared/components/delete_milestone_modal.vue @@ -121,13 +121,10 @@ Once deleted, it cannot be undone or recovered.`), :text="text" :primary-button-label="s__('Milestones|Delete milestone')" kind="danger" - @submit="onSubmit"> - - <template - slot="body" - slot-scope="props"> + @submit="onSubmit" + > + <template slot="body" slot-scope="props"> <p v-html="props.text"></p> </template> - </deprecated-modal> </template> diff --git a/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue b/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue index 9d19e4a095d..a79ef07f1c5 100644 --- a/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue +++ b/app/assets/javascripts/pages/milestones/shared/components/promote_milestone_modal.vue @@ -69,9 +69,7 @@ export default { footer-primary-button-variant="warning" @submit="onSubmit" > - <template - slot="title" - > + <template slot="title"> {{ title }} </template> {{ text }} diff --git a/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue b/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue index e8b646f3f6e..e723cd3fea9 100644 --- a/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue +++ b/app/assets/javascripts/pages/projects/labels/components/promote_label_modal.vue @@ -89,13 +89,7 @@ export default { footer-primary-button-variant="warning" @submit="onSubmit" > - <div - slot="title" - class="modal-title-with-label" - v-html="title" - > - {{ title }} - </div> + <div slot="title" class="modal-title-with-label" v-html="title">{{ title }}</div> {{ text }} </gl-modal> diff --git a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue index ab6f42d928c..db2a4041ec0 100644 --- a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue +++ b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/interval_pattern_input.vue @@ -70,20 +70,13 @@ export default { :checked="isEditable" class="label-bold" type="radio" - @click="toggleCustomInput(true)" + @click="toggleCustomInput(true);" /> - <label for="custom"> - {{ s__('PipelineSheduleIntervalPattern|Custom') }} - </label> + <label for="custom"> {{ s__('PipelineSheduleIntervalPattern|Custom') }} </label> <span class="cron-syntax-link-wrap"> - (<a - :href="cronSyntaxUrl" - target="_blank" - > - {{ __('Cron syntax') }} - </a>) + (<a :href="cronSyntaxUrl" target="_blank"> {{ __('Cron syntax') }} </a>) </span> </div> @@ -95,15 +88,10 @@ export default { :value="cronIntervalPresets.everyDay" class="label-bold" type="radio" - @click="toggleCustomInput(false)" + @click="toggleCustomInput(false);" /> - <label - class="label-bold" - for="every-day" - > - {{ __('Every day (at 4:00am)') }} - </label> + <label class="label-bold" for="every-day"> {{ __('Every day (at 4:00am)') }} </label> </div> <div class="cron-preset-radio-input"> @@ -114,13 +102,10 @@ export default { :value="cronIntervalPresets.everyWeek" class="label-bold" type="radio" - @click="toggleCustomInput(false)" + @click="toggleCustomInput(false);" /> - <label - class="label-bold" - for="every-week" - > + <label class="label-bold" for="every-week"> {{ __('Every week (Sundays at 4:00am)') }} </label> </div> @@ -133,13 +118,10 @@ export default { :value="cronIntervalPresets.everyMonth" class="label-bold" type="radio" - @click="toggleCustomInput(false)" + @click="toggleCustomInput(false);" /> - <label - class="label-bold" - for="every-month" - > + <label class="label-bold" for="every-month"> {{ __('Every month (on the 1st at 4:00am)') }} </label> </div> diff --git a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/pipeline_schedules_callout.vue b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/pipeline_schedules_callout.vue index 33fc2420e4d..1edd076604c 100644 --- a/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/pipeline_schedules_callout.vue +++ b/app/assets/javascripts/pages/projects/pipeline_schedules/shared/components/pipeline_schedules_callout.vue @@ -28,37 +28,26 @@ export default { }; </script> <template> - <div - v-if="!calloutDismissed" - class="pipeline-schedules-user-callout user-callout"> + <div v-if="!calloutDismissed" class="pipeline-schedules-user-callout user-callout"> <div class="bordered-box landing content-block"> - <button - id="dismiss-callout-btn" - class="btn btn-default close" - @click="dismissCallout"> - <i - aria-hidden="true" - class="fa fa-times"> - </i> + <button id="dismiss-callout-btn" class="btn btn-default close" @click="dismissCallout"> + <i aria-hidden="true" class="fa fa-times"> </i> </button> - <div - class="svg-container" - v-html="illustrationSvg"> - </div> + <div class="svg-container" v-html="illustrationSvg"></div> <div class="user-callout-copy"> <h4>{{ __('Scheduling Pipelines') }}</h4> <p> - {{ __(`The pipelines schedule runs pipelines in the future, + {{ + __(`The pipelines schedule runs pipelines in the future, repeatedly, for specific branches or tags. -Those scheduled pipelines will inherit limited project access based on their associated user.`) }} +Those scheduled pipelines will inherit limited project access based on their associated user.`) + }} </p> - <p> {{ __('Learn more in the') }} - <a - :href="docsUrl" - target="_blank" - rel="nofollow" - > - {{ s__('Learn more in the|pipeline schedules documentation') }}</a>. + <p> + {{ __('Learn more in the') }} + <a :href="docsUrl" target="_blank" rel="nofollow"> + {{ s__('Learn more in the|pipeline schedules documentation') }}</a + >. <!-- oneline to prevent extra space before period --> </p> </div> diff --git a/app/assets/javascripts/pages/projects/settings/repository/show/index.js b/app/assets/javascripts/pages/projects/settings/repository/show/index.js index 78cf5406e43..1ef4b460263 100644 --- a/app/assets/javascripts/pages/projects/settings/repository/show/index.js +++ b/app/assets/javascripts/pages/projects/settings/repository/show/index.js @@ -1,5 +1,5 @@ import initForm from '../form'; -import MirrorRepos from './mirror_repos'; +import MirrorRepos from '~/mirrors/mirror_repos'; document.addEventListener('DOMContentLoaded', () => { initForm(); diff --git a/app/assets/javascripts/pages/projects/shared/permissions/components/project_feature_setting.vue b/app/assets/javascripts/pages/projects/shared/permissions/components/project_feature_setting.vue index dced839c883..ff6dadeff7d 100644 --- a/app/assets/javascripts/pages/projects/shared/permissions/components/project_feature_setting.vue +++ b/app/assets/javascripts/pages/projects/shared/permissions/components/project_feature_setting.vue @@ -69,16 +69,8 @@ export default { </script> <template> - <div - :data-for="name" - class="project-feature-controls" - > - <input - v-if="name" - :name="name" - :value="value" - type="hidden" - /> + <div :data-for="name" class="project-feature-controls"> + <input v-if="name" :name="name" :value="value" type="hidden" /> <project-feature-toggle :value="featureEnabled" :disabled-input="disabledInput" @@ -99,11 +91,7 @@ export default { {{ optionName }} </option> </select> - <i - aria-hidden="true" - class="fa fa-chevron-down" - > - </i> + <i aria-hidden="true" class="fa fa-chevron-down"> </i> </div> </div> </template> diff --git a/app/assets/javascripts/pages/projects/shared/permissions/components/project_setting_row.vue b/app/assets/javascripts/pages/projects/shared/permissions/components/project_setting_row.vue index 898d605463f..92d23772565 100644 --- a/app/assets/javascripts/pages/projects/shared/permissions/components/project_setting_row.vue +++ b/app/assets/javascripts/pages/projects/shared/permissions/components/project_setting_row.vue @@ -22,30 +22,12 @@ export default { <template> <div class="project-feature-row"> - <label - v-if="label" - class="label-bold" - > + <label v-if="label" class="label-bold"> {{ label }} - <a - v-if="helpPath" - :href="helpPath" - target="_blank" - > - <i - aria-hidden="true" - data-hidden="true" - class="fa fa-question-circle" - > - </i> + <a v-if="helpPath" :href="helpPath" target="_blank"> + <i aria-hidden="true" data-hidden="true" class="fa fa-question-circle"> </i> </a> </label> - <span - v-if="helpText" - class="form-text text-muted" - > - {{ helpText }} - </span> - <slot></slot> + <span v-if="helpText" class="form-text text-muted"> {{ helpText }} </span> <slot></slot> </div> </template> diff --git a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue index c0ec7a5dc94..08c7719dcf2 100644 --- a/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue +++ b/app/assets/javascripts/pages/projects/shared/permissions/components/settings_panel.vue @@ -200,10 +200,7 @@ export default { <template> <div> <div class="project-visibility-setting"> - <project-setting-row - :help-path="visibilityHelpPath" - label="Project visibility" - > + <project-setting-row :help-path="visibilityHelpPath" label="Project visibility"> <div class="project-feature-controls"> <div class="select-wrapper"> <select @@ -231,36 +228,21 @@ export default { Public </option> </select> - <i - aria-hidden="true" - data-hidden="true" - class="fa fa-chevron-down" - > - </i> + <i aria-hidden="true" data-hidden="true" class="fa fa-chevron-down"> </i> </div> </div> <span class="form-text text-muted">{{ visibilityLevelDescription }}</span> - <label - v-if="visibilityLevel !== visibilityOptions.PRIVATE" - class="request-access" - > + <label v-if="visibilityLevel !== visibilityOptions.PRIVATE" class="request-access"> <input :value="requestAccessEnabled" type="hidden" name="project[request_access_enabled]" /> - <input - v-model="requestAccessEnabled" - type="checkbox" - /> - Allow users to request access + <input v-model="requestAccessEnabled" type="checkbox" /> Allow users to request access </label> </project-setting-row> </div> - <div - :class="{ 'highlight-changes': highlightChangesClass }" - class="project-feature-settings" - > + <div :class="{ 'highlight-changes': highlightChangesClass }" class="project-feature-settings"> <project-setting-row label="Issues" help-text="Lightweight issue tracking system for this project" @@ -271,10 +253,7 @@ export default { name="project[project_feature_attributes][issues_access_level]" /> </project-setting-row> - <project-setting-row - label="Repository" - help-text="View and edit files in this project" - > + <project-setting-row label="Repository" help-text="View and edit files in this project"> <project-feature-setting v-model="repositoryAccessLevel" :options="featureAccessLevelOptions" @@ -293,10 +272,7 @@ export default { name="project[project_feature_attributes][merge_requests_access_level]" /> </project-setting-row> - <project-setting-row - label="Pipelines" - help-text="Build, test, and deploy your changes" - > + <project-setting-row label="Pipelines" help-text="Build, test, and deploy your changes"> <project-feature-setting v-model="buildsAccessLevel" :options="repoFeatureAccessLevelOptions" @@ -329,10 +305,7 @@ export default { /> </project-setting-row> </div> - <project-setting-row - label="Wiki" - help-text="Pages for project documentation" - > + <project-setting-row label="Wiki" help-text="Pages for project documentation"> <project-feature-setting v-model="wikiAccessLevel" :options="featureAccessLevelOptions" diff --git a/app/assets/javascripts/pages/projects/wikis/components/delete_wiki_modal.vue b/app/assets/javascripts/pages/projects/wikis/components/delete_wiki_modal.vue index cbe85eaa590..b0c9ca3ec0d 100644 --- a/app/assets/javascripts/pages/projects/wikis/components/delete_wiki_modal.vue +++ b/app/assets/javascripts/pages/projects/wikis/components/delete_wiki_modal.vue @@ -54,13 +54,7 @@ export default { <template> <div class="d-inline-block"> - <button - v-gl-modal="modalId" - type="button" - class="btn btn-danger" - > - {{ __('Delete') }} - </button> + <button v-gl-modal="modalId" type="button" class="btn btn-danger">{{ __('Delete') }}</button> <gl-modal :title="title" :ok-title="s__('WikiPageConfirmDelete|Delete page')" @@ -70,23 +64,9 @@ export default { @ok="onSubmit" > {{ message }} - <form - ref="form" - :action="deleteWikiUrl" - method="post" - class="js-requires-input" - > - <input - ref="method" - type="hidden" - name="_method" - value="delete" - /> - <input - :value="csrfToken" - type="hidden" - name="authenticity_token" - /> + <form ref="form" :action="deleteWikiUrl" method="post" class="js-requires-input"> + <input ref="method" type="hidden" name="_method" value="delete" /> + <input :value="csrfToken" type="hidden" name="authenticity_token" /> </form> </gl-modal> </div> diff --git a/app/assets/javascripts/pages/users/activity_calendar.js b/app/assets/javascripts/pages/users/activity_calendar.js index bf592ba7a3c..8a84ac37dab 100644 --- a/app/assets/javascripts/pages/users/activity_calendar.js +++ b/app/assets/javascripts/pages/users/activity_calendar.js @@ -181,9 +181,8 @@ export default class ActivityCalendar { .attr('y', stamp => this.dayYPos(stamp.day)) .attr('width', this.daySize) .attr('height', this.daySize) - .attr( - 'fill', - stamp => (stamp.count !== 0 ? this.color(Math.min(stamp.count, 40)) : '#ededed'), + .attr('fill', stamp => + stamp.count !== 0 ? this.color(Math.min(stamp.count, 40)) : '#ededed', ) .attr('title', stamp => formatTooltipText(stamp)) .attr('class', 'user-contrib-cell js-tooltip') diff --git a/app/assets/javascripts/pages/users/user_overview_block.js b/app/assets/javascripts/pages/users/user_overview_block.js index 2ed177be558..eec2b5ca8e5 100644 --- a/app/assets/javascripts/pages/users/user_overview_block.js +++ b/app/assets/javascripts/pages/users/user_overview_block.js @@ -10,6 +10,7 @@ export default class UserOverviewBlock { limit: DEFAULT_LIMIT, ...options.requestParams, }; + this.postRenderCallback = options.postRenderCallback; this.loadData(); } @@ -43,5 +44,9 @@ export default class UserOverviewBlock { } loadingEl.classList.add('hide'); + + if (this.postRenderCallback) { + this.postRenderCallback.call(this); + } } } diff --git a/app/assets/javascripts/pages/users/user_tabs.js b/app/assets/javascripts/pages/users/user_tabs.js index 04bcb16f036..aa537d4a43e 100644 --- a/app/assets/javascripts/pages/users/user_tabs.js +++ b/app/assets/javascripts/pages/users/user_tabs.js @@ -2,7 +2,8 @@ import $ from 'jquery'; import axios from '~/lib/utils/axios_utils'; import Activities from '~/activities'; import { localTimeAgo } from '~/lib/utils/datetime_utility'; -import { __, sprintf } from '~/locale'; +import AjaxCache from '~/lib/utils/ajax_cache'; +import { __ } from '~/locale'; import flash from '~/flash'; import ActivityCalendar from './activity_calendar'; import UserOverviewBlock from './user_overview_block'; @@ -62,23 +63,20 @@ import UserOverviewBlock from './user_overview_block'; * </div> */ -const CALENDAR_TEMPLATES = { - activity: ` - <div class="clearfix calendar"> - <div class="js-contrib-calendar"></div> - <div class="calendar-hint bottom-right"></div> - </div> - `, - overview: ` - <div class="clearfix calendar"> - <div class="calendar-hint"></div> - <div class="js-contrib-calendar prepend-top-20"></div> - </div> - `, -}; +const CALENDAR_TEMPLATE = ` + <div class="clearfix calendar"> + <div class="js-contrib-calendar"></div> + <div class="calendar-hint bottom-right"></div> + </div> +`; const CALENDAR_PERIOD_6_MONTHS = 6; const CALENDAR_PERIOD_12_MONTHS = 12; +/* computation based on + * width = (group + 1) * this.daySizeWithSpace + this.getExtraWidthPadding(group); + * (see activity_calendar.js) + */ +const OVERVIEW_CALENDAR_BREAKPOINT = 918; export default class UserTabs { constructor({ defaultAction, action, parentEl }) { @@ -105,6 +103,12 @@ export default class UserTabs { .off('shown.bs.tab', '.nav-links a[data-toggle="tab"]') .on('shown.bs.tab', '.nav-links a[data-toggle="tab"]', event => this.tabShown(event)) .on('click', '.gl-pagination a', event => this.changeProjectsPage(event)); + + window.addEventListener('resize', () => this.onResize()); + } + + onResize() { + this.loadActivityCalendar(); } changeProjectsPage(e) { @@ -167,8 +171,6 @@ export default class UserTabs { return; } - this.loadActivityCalendar('activity'); - // eslint-disable-next-line no-new new Activities('#activity'); @@ -180,10 +182,10 @@ export default class UserTabs { return; } - this.loadActivityCalendar('overview'); + this.loadActivityCalendar(); UserTabs.renderMostRecentBlocks('#js-overview .activities-block', { - requestParams: { limit: 5 }, + requestParams: { limit: 10 }, }); UserTabs.renderMostRecentBlocks('#js-overview .projects-block', { requestParams: { limit: 10, skip_pagination: true }, @@ -198,52 +200,39 @@ export default class UserTabs { container, url: $(`${container} .overview-content-list`).data('href'), ...options, + postRenderCallback: () => localTimeAgo($('.js-timeago', container)), }); } - loadActivityCalendar(action) { - const monthsAgo = action === 'overview' ? CALENDAR_PERIOD_6_MONTHS : CALENDAR_PERIOD_12_MONTHS; + loadActivityCalendar() { const $calendarWrap = this.$parentEl.find('.tab-pane.active .user-calendar'); const calendarPath = $calendarWrap.data('calendarPath'); + + AjaxCache.retrieve(calendarPath) + .then(data => UserTabs.renderActivityCalendar(data, $calendarWrap)) + .catch(() => flash(__('There was an error loading users activity calendar.'))); + } + + static renderActivityCalendar(data, $calendarWrap) { + const monthsAgo = UserTabs.getVisibleCalendarPeriod($calendarWrap); const calendarActivitiesPath = $calendarWrap.data('calendarActivitiesPath'); const utcOffset = $calendarWrap.data('utcOffset'); - let utcFormatted = 'UTC'; - if (utcOffset !== 0) { - utcFormatted = `UTC${utcOffset > 0 ? '+' : ''}${utcOffset / 3600}`; - } + const calendarHint = __('Issues, merge requests, pushes and comments.'); - axios - .get(calendarPath) - .then(({ data }) => { - $calendarWrap.html(CALENDAR_TEMPLATES[action]); - - let calendarHint = ''; - - if (action === 'activity') { - calendarHint = sprintf( - __( - 'Summary of issues, merge requests, push events, and comments (Timezone: %{utcFormatted})', - ), - { utcFormatted }, - ); - } else if (action === 'overview') { - calendarHint = __('Issues, merge requests, pushes and comments.'); - } - - $calendarWrap.find('.calendar-hint').text(calendarHint); - - // eslint-disable-next-line no-new - new ActivityCalendar( - '.tab-pane.active .js-contrib-calendar', - '.tab-pane.active .user-calendar-activities', - data, - calendarActivitiesPath, - utcOffset, - 0, - monthsAgo, - ); - }) - .catch(() => flash(__('There was an error loading users activity calendar.'))); + $calendarWrap.html(CALENDAR_TEMPLATE); + + $calendarWrap.find('.calendar-hint').text(calendarHint); + + // eslint-disable-next-line no-new + new ActivityCalendar( + '.tab-pane.active .js-contrib-calendar', + '.tab-pane.active .user-calendar-activities', + data, + calendarActivitiesPath, + utcOffset, + 0, + monthsAgo, + ); } toggleLoading(status) { @@ -267,4 +256,11 @@ export default class UserTabs { getCurrentAction() { return this.$parentEl.find('.nav-links a.active').data('action'); } + + static getVisibleCalendarPeriod($calendarWrap) { + const width = $calendarWrap.width(); + return width < OVERVIEW_CALENDAR_BREAKPOINT + ? CALENDAR_PERIOD_6_MONTHS + : CALENDAR_PERIOD_12_MONTHS; + } } diff --git a/app/assets/javascripts/pdf/index.vue b/app/assets/javascripts/pdf/index.vue index 7b079fe02d9..cdf1257b4e3 100644 --- a/app/assets/javascripts/pdf/index.vue +++ b/app/assets/javascripts/pdf/index.vue @@ -56,9 +56,7 @@ export default { </script> <template> - <div - v-if="hasPDF" - class="pdf-viewer"> + <div v-if="hasPDF" class="pdf-viewer"> <page v-for="(page, index) in pages" :key="index" diff --git a/app/assets/javascripts/pdf/page/index.vue b/app/assets/javascripts/pdf/page/index.vue index 96aadf41653..f16aaca6cd7 100644 --- a/app/assets/javascripts/pdf/page/index.vue +++ b/app/assets/javascripts/pdf/page/index.vue @@ -45,12 +45,7 @@ export default { </script> <template> - <canvas - ref="canvas" - :data-page="number" - class="pdf-page" - > - </canvas> + <canvas ref="canvas" :data-page="number" class="pdf-page"> </canvas> </template> <style> diff --git a/app/assets/javascripts/performance_bar/components/detailed_metric.vue b/app/assets/javascripts/performance_bar/components/detailed_metric.vue index dc7d6d29b8f..c729198c1d3 100644 --- a/app/assets/javascripts/performance_bar/components/detailed_metric.vue +++ b/app/assets/javascripts/performance_bar/components/detailed_metric.vue @@ -38,20 +38,14 @@ export default { }; </script> <template> - <div - v-if="currentRequest.details" - :id="`peek-view-${metric}`" - class="view" - > + <div v-if="currentRequest.details" :id="`peek-view-${metric}`" class="view"> <button :data-target="`#modal-peek-${metric}-details`" class="btn-blank btn-link bold" type="button" data-toggle="modal" > - {{ metricDetails.duration }} - / - {{ metricDetails.calls }} + {{ metricDetails.duration }} / {{ metricDetails.calls }} </button> <gl-modal :id="`modal-peek-${metric}-details`" @@ -59,35 +53,23 @@ export default { modal-size="xl" class="performance-bar-modal" > - <table - class="table" - > + <table class="table"> <template v-if="detailsList.length"> - <tr - v-for="(item, index) in detailsList" - :key="index" - > - <td><strong>{{ item.duration }}ms</strong></td> - <td - v-for="key in keys" - :key="key" - class="break-word" - > - {{ item[key] }} + <tr v-for="(item, index) in detailsList" :key="index"> + <td> + <strong>{{ item.duration }}ms</strong> </td> + <td v-for="key in keys" :key="key" class="break-word">{{ item[key] }}</td> </tr> </template> <template v-else> <tr> - <td> - No {{ header.toLowerCase() }} for this request. - </td> + <td>No {{ header.toLowerCase() }} for this request.</td> </tr> </template> </table> - <div slot="footer"> - </div> + <div slot="footer"></div> </gl-modal> {{ metric }} </div> diff --git a/app/assets/javascripts/performance_bar/components/performance_bar_app.vue b/app/assets/javascripts/performance_bar/components/performance_bar_app.vue index 300d453c174..74faa35358d 100644 --- a/app/assets/javascripts/performance_bar/components/performance_bar_app.vue +++ b/app/assets/javascripts/performance_bar/components/performance_bar_app.vue @@ -91,25 +91,15 @@ export default { }; </script> <template> - <div - id="js-peek" - :class="env" - > - <div - v-if="currentRequest" - class="d-flex container-fluid container-limited" - > - <div - id="peek-view-host" - class="view" - > + <div id="js-peek" :class="env"> + <div v-if="currentRequest" class="d-flex container-fluid container-limited"> + <div id="peek-view-host" class="view"> <span v-if="hasHost" class="current-host" - :class="{ 'canary' : currentRequest.details.host.canary }" + :class="{ canary: currentRequest.details.host.canary }" > - <span v-html="birdEmoji"></span> - {{ currentRequest.details.host.hostname }} + <span v-html="birdEmoji"></span> {{ currentRequest.details.host.hostname }} </span> </div> <detailed-metric @@ -121,11 +111,7 @@ export default { :details="metric.details" :keys="metric.keys" /> - <div - v-if="initialRequest" - id="peek-view-rblineprof" - class="view" - > + <div v-if="initialRequest" id="peek-view-rblineprof" class="view"> <button v-if="lineProfileModal.length" class="btn-link btn-blank" @@ -134,12 +120,7 @@ export default { > profile </button> - <a - v-else - :href="profileUrl" - > - profile - </a> + <a v-else :href="profileUrl"> profile </a> </div> <simple-metric v-for="metric in $options.simpleMetrics" @@ -147,18 +128,10 @@ export default { :current-request="currentRequest" :metric="metric" /> - <div - id="peek-view-gc" - class="view" - > - <span - v-if="currentRequest.details" - class="bold" - > - <span title="Invoke Time">{{ currentRequest.details.gc.gc_time }}</span>ms - / - <span title="Invoke Count">{{ currentRequest.details.gc.invokes }}</span> - gc + <div id="peek-view-gc" class="view"> + <span v-if="currentRequest.details" class="bold"> + <span title="Invoke Time">{{ currentRequest.details.gc.gc_time }}</span + >ms / <span title="Invoke Count">{{ currentRequest.details.gc.invokes }}</span> gc </span> </div> <request-selector diff --git a/app/assets/javascripts/performance_bar/components/request_selector.vue b/app/assets/javascripts/performance_bar/components/request_selector.vue index ad74f7b38f9..fdb5c0d6939 100644 --- a/app/assets/javascripts/performance_bar/components/request_selector.vue +++ b/app/assets/javascripts/performance_bar/components/request_selector.vue @@ -37,11 +37,7 @@ export default { <template> <div id="peek-request-selector"> <select v-model="currentRequestId"> - <option - v-for="request in requests" - :key="request.id" - :value="request.id" - > + <option v-for="request in requests" :key="request.id" :value="request.id"> {{ truncatedUrl(request.url) }} </option> </select> diff --git a/app/assets/javascripts/performance_bar/components/simple_metric.vue b/app/assets/javascripts/performance_bar/components/simple_metric.vue index 7a558558c4d..358a57d5bc5 100644 --- a/app/assets/javascripts/performance_bar/components/simple_metric.vue +++ b/app/assets/javascripts/performance_bar/components/simple_metric.vue @@ -26,18 +26,8 @@ export default { }; </script> <template> - <div - :id="`peek-view-${metric}`" - class="view" - > - <span - v-if="currentRequest.details" - class="bold" - > - {{ duration }} - / - {{ calls }} - </span> + <div :id="`peek-view-${metric}`" class="view"> + <span v-if="currentRequest.details" class="bold"> {{ duration }} / {{ calls }} </span> {{ metric }} </div> </template> diff --git a/app/assets/javascripts/pipelines/components/blank_state.vue b/app/assets/javascripts/pipelines/components/blank_state.vue index 34360105176..6c3a4a27606 100644 --- a/app/assets/javascripts/pipelines/components/blank_state.vue +++ b/app/assets/javascripts/pipelines/components/blank_state.vue @@ -18,9 +18,7 @@ export default { <template> <div class="row empty-state"> <div class="col-12"> - <div class="svg-content"> - <img :src="svgPath" /> - </div> + <div class="svg-content"><img :src="svgPath" /></div> </div> <div class="col-12 text-center"> diff --git a/app/assets/javascripts/pipelines/components/empty_state.vue b/app/assets/javascripts/pipelines/components/empty_state.vue index f756c651684..d16f49f981c 100644 --- a/app/assets/javascripts/pipelines/components/empty_state.vue +++ b/app/assets/javascripts/pipelines/components/empty_state.vue @@ -25,44 +25,33 @@ export default { <template> <div class="row empty-state js-empty-state"> <div class="col-12"> - <div class="svg-content svg-250"> - <img :src="emptyStateSvgPath" /> - </div> + <div class="svg-content svg-250"><img :src="emptyStateSvgPath" /></div> </div> <div class="col-12"> <div class="text-content"> - <template v-if="canSetCi"> - <h4 class="text-center"> - {{ s__('Pipelines|Build with confidence') }} - </h4> + <h4 class="text-center">{{ s__('Pipelines|Build with confidence') }}</h4> <p> - {{ s__(`Pipelines|Continuous Integration can help + {{ + s__(`Pipelines|Continuous Integration can help catch bugs by running your tests automatically, while Continuous Deployment can help you deliver - code to your product environment.`) }} + code to your product environment.`) + }} </p> <div class="text-center"> - <gl-button - :href="helpPagePath" - variant="primary" - class="js-get-started-pipelines" - > + <gl-button :href="helpPagePath" variant="primary" class="js-get-started-pipelines"> {{ s__('Pipelines|Get started with Pipelines') }} </gl-button> </div> </template> - <p - v-else - class="text-center" - > + <p v-else class="text-center"> {{ s__('Pipelines|This project is not currently set up to run pipelines.') }} </p> - </div> </div> </div> diff --git a/app/assets/javascripts/pipelines/components/graph/action_component.vue b/app/assets/javascripts/pipelines/components/graph/action_component.vue index 3a39dfe181d..8ca539351a7 100644 --- a/app/assets/javascripts/pipelines/components/graph/action_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/action_component.vue @@ -86,6 +86,6 @@ export default { btn-transparent ci-action-icon-container ci-action-icon-wrapper" @click="onClickAction" > - <icon :name="actionIcon"/> + <icon :name="actionIcon" /> </gl-button> </template> diff --git a/app/assets/javascripts/pipelines/components/graph/graph_component.vue b/app/assets/javascripts/pipelines/components/graph/graph_component.vue index 6c9a11c3829..6f008528db4 100644 --- a/app/assets/javascripts/pipelines/components/graph/graph_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/graph_component.vue @@ -58,16 +58,9 @@ export default { <template> <div class="build-content middle-block js-pipeline-graph"> <div class="pipeline-visualization pipeline-graph pipeline-tab-content"> - <div class="text-center"> - <gl-loading-icon - v-if="isLoading" - :size="3" - /> - </div> + <div class="text-center"><gl-loading-icon v-if="isLoading" :size="3" /></div> - <ul - v-if="!isLoading" - class="stage-column-list"> + <ul v-if="!isLoading" class="stage-column-list"> <stage-column-component v-for="(stage, index) in graph" :key="stage.name" diff --git a/app/assets/javascripts/pipelines/components/graph/job_group_dropdown.vue b/app/assets/javascripts/pipelines/components/graph/job_group_dropdown.vue index 2670ea29db6..482898b80c4 100644 --- a/app/assets/javascripts/pipelines/components/graph/job_group_dropdown.vue +++ b/app/assets/javascripts/pipelines/components/graph/job_group_dropdown.vue @@ -69,22 +69,15 @@ export default { > <ci-icon :status="group.status" /> - <span class="ci-status-text"> - {{ group.name }} - </span> + <span class="ci-status-text"> {{ group.name }} </span> - <span class="dropdown-counter-badge"> - {{ group.size }} - </span> + <span class="dropdown-counter-badge"> {{ group.size }} </span> </button> <ul class="dropdown-menu big-pipeline-graph-dropdown-menu js-grouped-pipeline-dropdown"> <li class="scrollable-menu"> <ul> - <li - v-for="job in group.jobs" - :key="job.id" - > + <li v-for="job in group.jobs" :key="job.id"> <job-item :dropdown-length="group.size" :job="job" diff --git a/app/assets/javascripts/pipelines/components/graph/job_item.vue b/app/assets/javascripts/pipelines/components/graph/job_item.vue index e6abf32decc..782494f72e4 100644 --- a/app/assets/javascripts/pipelines/components/graph/job_item.vue +++ b/app/assets/javascripts/pipelines/components/graph/job_item.vue @@ -114,10 +114,7 @@ export default { :class="cssClassJobName" class="js-pipeline-graph-job-link" > - <job-name-component - :name="job.name" - :status="job.status" - /> + <job-name-component :name="job.name" :status="job.status" /> </gl-link> <div @@ -127,11 +124,7 @@ export default { :class="cssClassJobName" class="js-job-component-tooltip non-details-job-component" > - - <job-name-component - :name="job.name" - :status="job.status" - /> + <job-name-component :name="job.name" :status="job.status" /> </div> <action-component diff --git a/app/assets/javascripts/pipelines/components/graph/job_name_component.vue b/app/assets/javascripts/pipelines/components/graph/job_name_component.vue index 6fdbcc1e049..1bfab2a7fc0 100644 --- a/app/assets/javascripts/pipelines/components/graph/job_name_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/job_name_component.vue @@ -28,8 +28,6 @@ export default { <span class="ci-job-name-component"> <ci-icon :status="status" /> - <span class="ci-status-text"> - {{ name }} - </span> + <span class="ci-status-text"> {{ name }} </span> </span> </template> diff --git a/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue b/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue index d5f931943d5..09a50d25020 100644 --- a/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue +++ b/app/assets/javascripts/pipelines/components/graph/stage_column_component.vue @@ -42,13 +42,8 @@ export default { }; </script> <template> - <li - :class="stageConnectorClass" - class="stage-column" - > - <div class="stage-name"> - {{ title }} - </div> + <li :class="stageConnectorClass" class="stage-column"> + <div class="stage-name">{{ title }}</div> <div class="builds-container"> <ul> <li @@ -58,7 +53,6 @@ export default { :class="buildConnnectorClass(index)" class="build" > - <div class="curve"></div> <job-item diff --git a/app/assets/javascripts/pipelines/components/header_component.vue b/app/assets/javascripts/pipelines/components/header_component.vue index ac7fa4b195e..b2e365e5cde 100644 --- a/app/assets/javascripts/pipelines/components/header_component.vue +++ b/app/assets/javascripts/pipelines/components/header_component.vue @@ -89,10 +89,6 @@ export default { item-name="Pipeline" @actionClicked="postAction" /> - <gl-loading-icon - v-if="isLoading" - :size="2" - class="prepend-top-default append-bottom-default" - /> + <gl-loading-icon v-if="isLoading" :size="2" class="prepend-top-default append-bottom-default" /> </div> </template> diff --git a/app/assets/javascripts/pipelines/components/nav_controls.vue b/app/assets/javascripts/pipelines/components/nav_controls.vue index 5104fe36b42..c6990683ec7 100644 --- a/app/assets/javascripts/pipelines/components/nav_controls.vue +++ b/app/assets/javascripts/pipelines/components/nav_controls.vue @@ -60,11 +60,7 @@ export default { @click="onClickResetCache" /> - <gl-button - v-if="ciLintPath" - :href="ciLintPath" - class="js-ci-lint" - > + <gl-button v-if="ciLintPath" :href="ciLintPath" class="js-ci-lint"> {{ s__('Pipelines|CI Lint') }} </gl-button> </div> diff --git a/app/assets/javascripts/pipelines/components/pipeline_url.vue b/app/assets/javascripts/pipelines/components/pipeline_url.vue index 249f7b9f368..e5924d3a77e 100644 --- a/app/assets/javascripts/pipelines/components/pipeline_url.vue +++ b/app/assets/javascripts/pipelines/components/pipeline_url.vue @@ -48,10 +48,7 @@ export default { </script> <template> <div class="table-section section-15 d-none d-sm-none d-md-block pipeline-tags"> - <gl-link - :href="pipeline.path" - class="js-pipeline-url-link" - > + <gl-link :href="pipeline.path" class="js-pipeline-url-link"> <span class="pipeline-id">#{{ pipeline.id }}</span> </gl-link> <span>by</span> @@ -62,11 +59,7 @@ export default { :tooltip-text="pipeline.user.name" class="js-pipeline-url-user" /> - <span - v-if="!user" - class="js-pipeline-url-api api"> - API - </span> + <span v-if="!user" class="js-pipeline-url-api api"> API </span> <div class="label-container"> <span v-if="pipeline.flags.latest" @@ -101,10 +94,7 @@ export default { > Auto DevOps </gl-link> - <span - v-if="pipeline.flags.stuck" - class="js-pipeline-url-stuck badge badge-warning" - > + <span v-if="pipeline.flags.stuck" class="js-pipeline-url-stuck badge badge-warning"> stuck </span> </div> diff --git a/app/assets/javascripts/pipelines/components/pipelines.vue b/app/assets/javascripts/pipelines/components/pipelines.vue index fcd8a54c9c1..9dcea557b32 100644 --- a/app/assets/javascripts/pipelines/components/pipelines.vue +++ b/app/assets/javascripts/pipelines/components/pipelines.vue @@ -247,20 +247,8 @@ export default { v-if="shouldRenderTabs || shouldRenderButtons" class="top-area scrolling-tabs-container inner-page-scroll-tabs" > - <div class="fade-left"> - <i - class="fa fa-angle-left" - aria-hidden="true" - > - </i> - </div> - <div class="fade-right"> - <i - class="fa fa-angle-right" - aria-hidden="true" - > - </i> - </div> + <div class="fade-left"><i class="fa fa-angle-left" aria-hidden="true"> </i></div> + <div class="fade-right"><i class="fa fa-angle-right" aria-hidden="true"> </i></div> <navigation-tabs v-if="shouldRenderTabs" @@ -280,7 +268,6 @@ export default { </div> <div class="content-list pipelines"> - <gl-loading-icon v-if="stateToRender === $options.stateMap.loading" :label="s__('Pipelines|Loading Pipelines')" @@ -298,8 +285,10 @@ export default { <svg-blank-state v-else-if="stateToRender === $options.stateMap.error" :svg-path="errorStateSvgPath" - :message="s__(`Pipelines|There was an error fetching the pipelines. - Try again in a few moments or contact your support team.`)" + :message=" + s__(`Pipelines|There was an error fetching the pipelines. + Try again in a few moments or contact your support team.`) + " /> <svg-blank-state @@ -308,11 +297,7 @@ export default { :message="emptyTabMessage" /> - <div - v-else-if="stateToRender === $options.stateMap.tableList" - class="table-holder" - > - + <div v-else-if="stateToRender === $options.stateMap.tableList" class="table-holder"> <pipelines-table-component :pipelines="state.pipelines" :update-graph-dropdown="updateGraphDropdown" diff --git a/app/assets/javascripts/pipelines/components/pipelines_actions.vue b/app/assets/javascripts/pipelines/components/pipelines_actions.vue index 112c1559f25..2e9f2519fcb 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_actions.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_actions.vue @@ -67,33 +67,20 @@ export default { data-toggle="dropdown" aria-label="Manual job" > - <icon - name="play" - class="icon-play" - /> - <i - class="fa fa-caret-down" - aria-hidden="true"> - </i> + <icon name="play" class="icon-play" /> <i class="fa fa-caret-down" aria-hidden="true"> </i> <gl-loading-icon v-if="isLoading" /> </gl-button> <ul class="dropdown-menu dropdown-menu-right"> - <li - v-for="action in actions" - :key="action.path" - > + <li v-for="action in actions" :key="action.path"> <gl-button :class="{ disabled: isActionDisabled(action) }" :disabled="isActionDisabled(action)" class="js-pipeline-action-link no-btn btn" - @click="onClickAction(action)" + @click="onClickAction(action);" > {{ action.name }} - <span - v-if="action.scheduled_at" - class="pull-right" - > + <span v-if="action.scheduled_at" class="pull-right"> <icon name="clock" /> <gl-countdown :end-date-string="action.scheduled_at" /> </span> diff --git a/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue b/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue index d7d9eb00faa..908b10afee6 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_artifacts.vue @@ -20,10 +20,7 @@ export default { }; </script> <template> - <div - class="btn-group" - role="group" - > + <div class="btn-group" role="group"> <gl-button v-gl-tooltip class="dropdown-toggle build-artifacts js-pipeline-dropdown-download" @@ -31,23 +28,11 @@ export default { data-toggle="dropdown" aria-label="Artifacts" > - <icon name="download" /> - <i - class="fa fa-caret-down" - aria-hidden="true" - > - </i> + <icon name="download" /> <i class="fa fa-caret-down" aria-hidden="true"> </i> </gl-button> <ul class="dropdown-menu dropdown-menu-right"> - <li - v-for="(artifact, i) in artifacts" - :key="i" - > - <gl-link - :href="artifact.path" - rel="nofollow" - download - > + <li v-for="(artifact, i) in artifacts" :key="i"> + <gl-link :href="artifact.path" rel="nofollow" download> Download {{ artifact.name }} artifacts </gl-link> </li> diff --git a/app/assets/javascripts/pipelines/components/pipelines_table.vue b/app/assets/javascripts/pipelines/components/pipelines_table.vue index 3339b5c13ed..1c60ae6a152 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_table.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_table.vue @@ -80,32 +80,17 @@ export default { </script> <template> <div class="ci-table"> - <div - class="gl-responsive-table-row table-row-header" - role="row" - > - <div - class="table-section section-10 js-pipeline-status pipeline-status" - role="rowheader" - > + <div class="gl-responsive-table-row table-row-header" role="row"> + <div class="table-section section-10 js-pipeline-status pipeline-status" role="rowheader"> {{ s__('Pipeline|Status') }} </div> - <div - class="table-section section-15 js-pipeline-info pipeline-info" - role="rowheader" - > + <div class="table-section section-15 js-pipeline-info pipeline-info" role="rowheader"> {{ s__('Pipeline|Pipeline') }} </div> - <div - class="table-section section-20 js-pipeline-commit pipeline-commit" - role="rowheader" - > + <div class="table-section section-20 js-pipeline-commit pipeline-commit" role="rowheader"> {{ s__('Pipeline|Commit') }} </div> - <div - class="table-section section-20 js-pipeline-stages pipeline-stages" - role="rowheader" - > + <div class="table-section section-20 js-pipeline-stages pipeline-stages" role="rowheader"> {{ s__('Pipeline|Stages') }} </div> </div> @@ -128,6 +113,5 @@ export default { > <span v-html="modalText"></span> </modal> - </div> </template> diff --git a/app/assets/javascripts/pipelines/components/pipelines_table_row.vue b/app/assets/javascripts/pipelines/components/pipelines_table_row.vue index fd674a8d447..da42698c255 100644 --- a/app/assets/javascripts/pipelines/components/pipelines_table_row.vue +++ b/app/assets/javascripts/pipelines/components/pipelines_table_row.vue @@ -257,32 +257,16 @@ export default { <template> <div class="commit gl-responsive-table-row"> <div class="table-section section-10 commit-link"> - <div - class="table-mobile-header" - role="rowheader" - > - {{ s__('Pipeline|Status') }} - </div> + <div class="table-mobile-header" role="rowheader">{{ s__('Pipeline|Status') }}</div> <div class="table-mobile-content"> - <ci-badge - :status="pipelineStatus" - :show-text="!isChildView" - /> + <ci-badge :status="pipelineStatus" :show-text="!isChildView" /> </div> </div> - <pipeline-url - :pipeline="pipeline" - :auto-devops-help-path="autoDevopsHelpPath" - /> + <pipeline-url :pipeline="pipeline" :auto-devops-help-path="autoDevopsHelpPath" /> <div class="table-section section-20"> - <div - class="table-mobile-header" - role="rowheader" - > - {{ s__('Pipeline|Commit') }} - </div> + <div class="table-mobile-header" role="rowheader">{{ s__('Pipeline|Commit') }}</div> <div class="table-mobile-content"> <commit-component :tag="commitTag" @@ -297,12 +281,7 @@ export default { </div> <div class="table-section section-wrap section-20 stage-cell"> - <div - class="table-mobile-header" - role="rowheader" - > - {{ s__('Pipeline|Stages') }} - </div> + <div class="table-mobile-header" role="rowheader">{{ s__('Pipeline|Stages') }}</div> <div class="table-mobile-content"> <template v-if="pipeline.details.stages.length > 0"> <div @@ -320,20 +299,14 @@ export default { </div> </div> - <pipelines-timeago - :duration="pipelineDuration" - :finished-time="pipelineFinishedAt" - /> + <pipelines-timeago :duration="pipelineDuration" :finished-time="pipelineFinishedAt" /> <div v-if="displayPipelineActions" class="table-section section-20 table-button-footer pipeline-actions" > <div class="btn-group table-action-buttons"> - <pipelines-actions-component - v-if="actions.length > 0" - :actions="actions" - /> + <pipelines-actions-component v-if="actions.length > 0" :actions="actions" /> <pipelines-artifacts-component v-if="pipeline.details.artifacts.length" diff --git a/app/assets/javascripts/pipelines/components/stage.vue b/app/assets/javascripts/pipelines/components/stage.vue index 1d62472671a..2d3f667e73e 100644 --- a/app/assets/javascripts/pipelines/components/stage.vue +++ b/app/assets/javascripts/pipelines/components/stage.vue @@ -169,35 +169,20 @@ export default { aria-expanded="false" @click="onClickStage" > - - <span - :aria-label="stage.title" - aria-hidden="true" - class="no-pointer-events" - > + <span :aria-label="stage.title" aria-hidden="true" class="no-pointer-events"> <icon :name="borderlessIcon" /> </span> - <i - class="fa fa-caret-down" - aria-hidden="true" - > - </i> + <i class="fa fa-caret-down" aria-hidden="true"> </i> </button> <div class="dropdown-menu mini-pipeline-graph-dropdown-menu js-builds-dropdown-container" aria-labelledby="stageDropdown" > - <gl-loading-icon v-if="isLoading"/> - <ul - v-else - class="js-builds-dropdown-list scrollable-menu" - > - <li - v-for="job in dropdownContent" - :key="job.id" - > + <gl-loading-icon v-if="isLoading" /> + <ul v-else class="js-builds-dropdown-list scrollable-menu"> + <li v-for="job in dropdownContent" :key="job.id"> <job-item :dropdown-length="dropdownContent.length" :job="job" diff --git a/app/assets/javascripts/pipelines/components/time_ago.vue b/app/assets/javascripts/pipelines/components/time_ago.vue index bed690200b8..2ed0c24825c 100644 --- a/app/assets/javascripts/pipelines/components/time_ago.vue +++ b/app/assets/javascripts/pipelines/components/time_ago.vue @@ -56,32 +56,14 @@ export default { </script> <template> <div class="table-section section-15 pipelines-time-ago"> - <div - class="table-mobile-header" - role="rowheader" - > - {{ s__('Pipeline|Duration') }} - </div> + <div class="table-mobile-header" role="rowheader">{{ s__('Pipeline|Duration') }}</div> <div class="table-mobile-content"> - <p - v-if="hasDuration" - class="duration" - > - <span v-html="iconTimerSvg"> - </span> - {{ durationFormated }} + <p v-if="hasDuration" class="duration"> + <span v-html="iconTimerSvg"> </span> {{ durationFormated }} </p> - <p - v-if="hasFinishedTime" - class="finished-at d-none d-sm-none d-md-block" - > - - <i - class="fa fa-calendar" - aria-hidden="true" - > - </i> + <p v-if="hasFinishedTime" class="finished-at d-none d-sm-none d-md-block"> + <i class="fa fa-calendar" aria-hidden="true"> </i> <time v-tooltip diff --git a/app/assets/javascripts/profile/account/components/delete_account_modal.vue b/app/assets/javascripts/profile/account/components/delete_account_modal.vue index 99b57f4c9d5..85c5c073a74 100644 --- a/app/assets/javascripts/profile/account/components/delete_account_modal.vue +++ b/app/assets/javascripts/profile/account/components/delete_account_modal.vue @@ -83,34 +83,16 @@ Once you confirm %{deleteAccount}, it cannot be undone or recovered.`), :primary-button-label="s__('Profiles|Delete account')" :submit-disabled="!canSubmit()" kind="danger" - @submit="onSubmit"> - - <template - slot="body" - slot-scope="props"> + @submit="onSubmit" + > + <template slot="body" slot-scope="props"> <p v-html="props.text"></p> - <form - ref="form" - :action="actionUrl" - method="post"> + <form ref="form" :action="actionUrl" method="post"> + <input type="hidden" name="_method" value="delete" /> + <input :value="csrfToken" type="hidden" name="authenticity_token" /> - <input - type="hidden" - name="_method" - value="delete" - /> - <input - :value="csrfToken" - type="hidden" - name="authenticity_token" - /> - - <p - id="input-label" - v-html="inputLabel" - > - </p> + <p id="input-label" v-html="inputLabel"></p> <input v-if="confirmWithPassword" @@ -130,6 +112,5 @@ Once you confirm %{deleteAccount}, it cannot be undone or recovered.`), /> </form> </template> - </deprecated-modal> </template> diff --git a/app/assets/javascripts/profile/account/components/update_username.vue b/app/assets/javascripts/profile/account/components/update_username.vue index ef484ddfd61..e1085c0a44d 100644 --- a/app/assets/javascripts/profile/account/components/update_username.vue +++ b/app/assets/javascripts/profile/account/components/update_username.vue @@ -87,9 +87,7 @@ Please update your Git repository remotes as soon as possible.`), <label :for="$options.inputId">{{ s__('Profiles|Path') }}</label> <div class="input-group"> <div class="input-group-prepend"> - <div class="input-group-text"> - {{ rootUrl }} - </div> + <div class="input-group-text">{{ rootUrl }}</div> </div> <input :id="$options.inputId" @@ -99,9 +97,7 @@ Please update your Git repository remotes as soon as possible.`), required="required" /> </div> - <p class="form-text text-muted"> - {{ path }} - </p> + <p class="form-text text-muted">{{ path }}</p> </div> <button :data-target="`#${$options.modalId}`" diff --git a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue index 2c02f436b69..78f085e5312 100644 --- a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue +++ b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_machine_type_dropdown.vue @@ -87,13 +87,8 @@ export default { <template> <div> - <div - class="js-gcp-machine-type-dropdown dropdown" - > - <dropdown-hidden-input - :name="fieldName" - :value="selectedMachineType" - /> + <div class="js-gcp-machine-type-dropdown dropdown"> + <dropdown-hidden-input :name="fieldName" :value="selectedMachineType" /> <dropdown-button :class="{ 'border-danger': hasErrors }" :is-disabled="isDisabled" @@ -112,29 +107,21 @@ export default { {{ s__('ClusterIntegration|No machine types matched your search') }} </span> </li> - <li - v-for="result in results" - :key="result.id" - > - <button - type="button" - @click.prevent="setItem(result.name)" - > + <li v-for="result in results" :key="result.id"> + <button type="button" @click.prevent="setItem(result.name);"> {{ result.name }} </button> </li> </ul> </div> - <div class="dropdown-loading"> - <gl-loading-icon /> - </div> + <div class="dropdown-loading"><gl-loading-icon /></div> </div> </div> <span v-if="hasErrors" :class="{ 'text-danger': hasErrors, - 'text-muted': !hasErrors + 'text-muted': !hasErrors, }" class="form-text" > diff --git a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue index fc17e2fab49..8e51dd352c7 100644 --- a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue +++ b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_project_id_dropdown.vue @@ -145,17 +145,12 @@ export default { <template> <div> - <div - class="js-gcp-project-id-dropdown dropdown" - > - <dropdown-hidden-input - :name="fieldName" - :value="selectedProject.projectId" - /> + <div class="js-gcp-project-id-dropdown dropdown"> + <dropdown-hidden-input :name="fieldName" :value="selectedProject.projectId" /> <dropdown-button :class="{ 'border-danger': hasErrors, - 'read-only': hasOneProject + 'read-only': hasOneProject, }" :is-disabled="isDisabled" :is-loading="isLoading" @@ -173,28 +168,18 @@ export default { {{ s__('ClusterIntegration|No projects matched your search') }} </span> </li> - <li - v-for="result in results" - :key="result.project_number" - > - <button - type="button" - @click.prevent="setItem(result)" - > - {{ result.name }} - </button> + <li v-for="result in results" :key="result.project_number"> + <button type="button" @click.prevent="setItem(result);">{{ result.name }}</button> </li> </ul> </div> - <div class="dropdown-loading"> - <gl-loading-icon /> - </div> + <div class="dropdown-loading"><gl-loading-icon /></div> </div> </div> <span :class="{ 'text-danger': hasErrors, - 'text-muted': !hasErrors + 'text-muted': !hasErrors, }" class="form-text" v-html="helpText" diff --git a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue index ca7c79f75f0..728616a441f 100644 --- a/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue +++ b/app/assets/javascripts/projects/gke_cluster_dropdowns/components/gke_zone_dropdown.vue @@ -61,13 +61,8 @@ export default { <template> <div> - <div - class="js-gcp-zone-dropdown dropdown" - > - <dropdown-hidden-input - :name="fieldName" - :value="selectedZone" - /> + <div class="js-gcp-zone-dropdown dropdown"> + <dropdown-hidden-input :name="fieldName" :value="selectedZone" /> <dropdown-button :class="{ 'border-danger': hasErrors }" :is-disabled="isDisabled" @@ -86,29 +81,21 @@ export default { {{ s__('ClusterIntegration|No zones matched your search') }} </span> </li> - <li - v-for="result in results" - :key="result.id" - > - <button - type="button" - @click.prevent="setItem(result.name)" - > + <li v-for="result in results" :key="result.id"> + <button type="button" @click.prevent="setItem(result.name);"> {{ result.name }} </button> </li> </ul> </div> - <div class="dropdown-loading"> - <gl-loading-icon /> - </div> + <div class="dropdown-loading"><gl-loading-icon /></div> </div> </div> <span v-if="hasErrors" :class="{ 'text-danger': hasErrors, - 'text-muted': !hasErrors + 'text-muted': !hasErrors, }" class="form-text" > diff --git a/app/assets/javascripts/projects/tree/components/commit_pipeline_status_component.vue b/app/assets/javascripts/projects/tree/components/commit_pipeline_status_component.vue index 7400b685c7e..bfc55013a71 100644 --- a/app/assets/javascripts/projects/tree/components/commit_pipeline_status_component.vue +++ b/app/assets/javascripts/projects/tree/components/commit_pipeline_status_component.vue @@ -100,15 +100,8 @@ export default { </script> <template> <div class="ci-status-link"> - <gl-loading-icon - v-if="isLoading" - :size="3" - label="Loading pipeline status" - /> - <a - v-else - :href="ciStatus.details_path" - > + <gl-loading-icon v-if="isLoading" :size="3" label="Loading pipeline status" /> + <a v-else :href="ciStatus.details_path"> <ci-icon v-tooltip :title="statusTitle" diff --git a/app/assets/javascripts/registry/components/app.vue b/app/assets/javascripts/registry/components/app.vue index 6f94f5d6d2a..6233fb169e9 100644 --- a/app/assets/javascripts/registry/components/app.vue +++ b/app/assets/javascripts/registry/components/app.vue @@ -35,10 +35,7 @@ export default { </script> <template> <div> - <gl-loading-icon - v-if="isLoading" - :size="3" - /> + <gl-loading-icon v-if="isLoading" :size="3" /> <collapsible-container v-for="(item, index) in repos" @@ -48,8 +45,10 @@ export default { /> <p v-else-if="!isLoading && !repos.length"> - {{ __(`No container images stored for this project. -Add one by following the instructions above.`) }} + {{ + __(`No container images stored for this project. +Add one by following the instructions above.`) + }} </p> </div> </template> diff --git a/app/assets/javascripts/registry/components/collapsible_container.vue b/app/assets/javascripts/registry/components/collapsible_container.vue index d85de973740..6514c05a9c7 100644 --- a/app/assets/javascripts/registry/components/collapsible_container.vue +++ b/app/assets/javascripts/registry/components/collapsible_container.vue @@ -61,11 +61,7 @@ export default { <template> <div class="container-image"> <div class="container-image-head"> - <button - type="button" - class="js-toggle-repo btn-link" - @click="toggleRepo" - > + <button type="button" class="js-toggle-repo btn-link" @click="toggleRepo"> <i :class="{ 'fa-chevron-right': !isOpen, @@ -95,36 +91,18 @@ export default { class="js-remove-repo btn btn-danger" @click="handleDeleteRepository" > - <i - class="fa fa-trash" - aria-hidden="true" - > - </i> + <i class="fa fa-trash" aria-hidden="true"> </i> </button> </div> </div> - <gl-loading-icon - v-if="repo.isLoading" - :size="2" - class="append-bottom-20" - /> + <gl-loading-icon v-if="repo.isLoading" :size="2" class="append-bottom-20" /> - <div - v-else-if="!repo.isLoading && isOpen" - class="container-image-tags" - > + <div v-else-if="!repo.isLoading && isOpen" class="container-image-tags"> + <table-registry v-if="repo.list.length" :repo="repo" /> - <table-registry - v-if="repo.list.length" - :repo="repo" - /> - - <div - v-else - class="nothing-here-block" - > - {{ s__("ContainerRegistry|No tags in Container Registry for this container image.") }} + <div v-else class="nothing-here-block"> + {{ s__('ContainerRegistry|No tags in Container Registry for this container image.') }} </div> </div> </div> diff --git a/app/assets/javascripts/registry/components/table_registry.vue b/app/assets/javascripts/registry/components/table_registry.vue index bb6c977fc63..6735c3ff7cf 100644 --- a/app/assets/javascripts/registry/components/table_registry.vue +++ b/app/assets/javascripts/registry/components/table_registry.vue @@ -65,17 +65,14 @@ export default { <tr> <th>{{ s__('ContainerRegistry|Tag') }}</th> <th>{{ s__('ContainerRegistry|Tag ID') }}</th> - <th>{{ s__("ContainerRegistry|Size") }}</th> - <th>{{ s__("ContainerRegistry|Created") }}</th> + <th>{{ s__('ContainerRegistry|Size') }}</th> + <th>{{ s__('ContainerRegistry|Created') }}</th> <th></th> </tr> </thead> <tbody> - <tr - v-for="(item, i) in repo.list" - :key="i"> + <tr v-for="(item, i) in repo.list" :key="i"> <td> - {{ item.tag }} <clipboard-button @@ -86,11 +83,7 @@ export default { /> </td> <td> - <span - v-tooltip - :title="item.revision" - data-placement="bottom" - > + <span v-tooltip :title="item.revision" data-placement="bottom"> {{ item.shortRevision }} </span> </td> @@ -103,11 +96,7 @@ export default { </td> <td> - <span - v-tooltip - :title="tooltipTitle(item.createdAt)" - data-placement="bottom" - > + <span v-tooltip :title="tooltipTitle(item.createdAt)" data-placement="bottom"> {{ timeFormated(item.createdAt) }} </span> </td> @@ -121,13 +110,9 @@ export default { type="button" class="js-delete-registry btn btn-danger d-none d-sm-block float-right" data-container="body" - @click="handleDeleteRegistry(item)" + @click="handleDeleteRegistry(item);" > - <i - class="fa fa-trash" - aria-hidden="true" - > - </i> + <i class="fa fa-trash" aria-hidden="true"> </i> </button> </td> </tr> diff --git a/app/assets/javascripts/reports/components/grouped_test_reports_app.vue b/app/assets/javascripts/reports/components/grouped_test_reports_app.vue index bd204503cc7..82601363aa4 100644 --- a/app/assets/javascripts/reports/components/grouped_test_reports_app.vue +++ b/app/assets/javascripts/reports/components/grouped_test_reports_app.vue @@ -77,13 +77,8 @@ export default { :has-issues="reports.length > 0" class="mr-widget-section grouped-security-reports mr-report" > - <div - slot="body" - class="mr-widget-grouped-section report-block" - > - <template - v-for="(report, i) in reports" - > + <div slot="body" class="mr-widget-grouped-section report-block"> + <template v-for="(report, i) in reports"> <summary-row :key="`summary-row-${i}`" :summary="reportText(report)" @@ -100,10 +95,7 @@ export default { /> </template> - <modal - :title="modalTitle" - :modal-data="modalData" - /> + <modal :title="modalTitle" :modal-data="modalData" /> </div> </report-section> </template> diff --git a/app/assets/javascripts/reports/components/issue_status_icon.vue b/app/assets/javascripts/reports/components/issue_status_icon.vue index 6e143c4f98c..2946fbc6a1f 100644 --- a/app/assets/javascripts/reports/components/issue_status_icon.vue +++ b/app/assets/javascripts/reports/components/issue_status_icon.vue @@ -45,9 +45,6 @@ export default { }" class="report-block-list-icon" > - <icon - :name="iconName" - :size="32" - /> + <icon :name="iconName" :size="32" /> </div> </template> diff --git a/app/assets/javascripts/reports/components/modal.vue b/app/assets/javascripts/reports/components/modal.vue index 5f9e4072b2d..162421b037f 100644 --- a/app/assets/javascripts/reports/components/modal.vue +++ b/app/assets/javascripts/reports/components/modal.vue @@ -36,23 +36,13 @@ export default { :key="index" class="row prepend-top-10 append-bottom-10" > - <strong class="col-sm-3 text-right"> - {{ field.text }}: - </strong> + <strong class="col-sm-3 text-right"> {{ field.text }}: </strong> <div class="col-sm-9 text-secondary"> - <code-block - v-if="field.type === $options.fieldTypes.codeBock" - :code="field.value" - /> + <code-block v-if="field.type === $options.fieldTypes.codeBock" :code="field.value" /> <template v-else-if="field.type === $options.fieldTypes.link"> - <a - :href="field.value" - target="_blank" - rel="noopener noreferrer" - class="js-modal-link" - > + <a :href="field.value" target="_blank" rel="noopener noreferrer" class="js-modal-link"> {{ field.value }} </a> </template> @@ -67,7 +57,6 @@ export default { </div> </div> </slot> - <div slot="footer"> - </div> + <div slot="footer"></div> </modal> </template> diff --git a/app/assets/javascripts/reports/components/modal_open_name.vue b/app/assets/javascripts/reports/components/modal_open_name.vue index 4f81cee2a38..118e4b02c46 100644 --- a/app/assets/javascripts/reports/components/modal_open_name.vue +++ b/app/assets/javascripts/reports/components/modal_open_name.vue @@ -26,7 +26,7 @@ export default { <button type="button" class="btn-link btn-blank text-left break-link vulnerability-name-button" - @click="handleIssueClick()" + @click="handleIssueClick();" > {{ issue.title }} </button> diff --git a/app/assets/javascripts/reports/components/report_item.vue b/app/assets/javascripts/reports/components/report_item.vue index 01e6d357a21..839e86bdf17 100644 --- a/app/assets/javascripts/reports/components/report_item.vue +++ b/app/assets/javascripts/reports/components/report_item.vue @@ -33,21 +33,9 @@ export default { }; </script> <template> - <li - :class="{ 'is-dismissed': issue.isDismissed }" - class="report-block-list-issue" - > - <issue-status-icon - :status="status" - class="append-right-5" - /> + <li :class="{ 'is-dismissed': issue.isDismissed }" class="report-block-list-issue"> + <issue-status-icon :status="status" class="append-right-5" /> - <component - :is="component" - v-if="component" - :issue="issue" - :status="status" - :is-new="isNew" - /> + <component :is="component" v-if="component" :issue="issue" :status="status" :is-new="isNew" /> </li> </template> diff --git a/app/assets/javascripts/reports/components/report_link.vue b/app/assets/javascripts/reports/components/report_link.vue index 74d68f9f439..052bc53d610 100644 --- a/app/assets/javascripts/reports/components/report_link.vue +++ b/app/assets/javascripts/reports/components/report_link.vue @@ -20,10 +20,16 @@ export default { rel="noopener noreferrer nofollow" class="break-link" > - {{ issue.path }}<template v-if="issue.line">:{{ issue.line }}</template> + {{ issue.path + }}<template v-if="issue.line" + >:{{ issue.line }}</template + > </a> <template v-else> - {{ issue.path }}<template v-if="issue.line">:{{ issue.line }}</template> + {{ issue.path + }}<template v-if="issue.line" + >:{{ issue.line }}</template + > </template> </div> </template> diff --git a/app/assets/javascripts/reports/components/report_section.vue b/app/assets/javascripts/reports/components/report_section.vue index d196f497362..d6483e95278 100644 --- a/app/assets/javascripts/reports/components/report_section.vue +++ b/app/assets/javascripts/reports/components/report_section.vue @@ -143,11 +143,7 @@ export default { <span class="js-code-text code-text"> {{ headerText }} - <popover - v-if="hasPopover" - :options="popoverOptions" - class="prepend-left-5" - /> + <popover v-if="hasPopover" :options="popoverOptions" class="prepend-left-5" /> </span> <slot name="actionButtons"></slot> @@ -163,11 +159,7 @@ export default { </div> </div> - <div - v-if="hasIssues" - v-show="isExpanded" - class="js-report-section-container" - > + <div v-if="hasIssues" v-show="isExpanded" class="js-report-section-container"> <slot name="body"> <issues-list :unresolved-issues="unresolvedIssues" diff --git a/app/assets/javascripts/reports/components/summary_row.vue b/app/assets/javascripts/reports/components/summary_row.vue index 7e73ccb6c28..97a68531d29 100644 --- a/app/assets/javascripts/reports/components/summary_row.vue +++ b/app/assets/javascripts/reports/components/summary_row.vue @@ -46,26 +46,14 @@ export default { <template> <div class="report-block-list-issue report-block-list-issue-parent"> <div class="report-block-list-icon append-right-10 prepend-left-5"> - <gl-loading-icon - v-if="statusIcon === 'loading'" - css-class="report-block-list-loading-icon" - /> - <ci-icon - v-else - :status="iconStatus" - /> + <gl-loading-icon v-if="statusIcon === 'loading'" css-class="report-block-list-loading-icon" /> + <ci-icon v-else :status="iconStatus" /> </div> <div class="report-block-list-issue-description"> - <div class="report-block-list-issue-description-text"> - {{ summary }} - </div> - - <popover - v-if="popoverOptions" - :options="popoverOptions" - /> + <div class="report-block-list-issue-description-text">{{ summary }}</div> + <popover v-if="popoverOptions" :options="popoverOptions" /> </div> </div> </template> diff --git a/app/assets/javascripts/reports/components/test_issue_body.vue b/app/assets/javascripts/reports/components/test_issue_body.vue index 1a87822fcc3..938e83de546 100644 --- a/app/assets/javascripts/reports/components/test_issue_body.vue +++ b/app/assets/javascripts/reports/components/test_issue_body.vue @@ -30,14 +30,10 @@ export default { <button type="button" class="btn-link btn-blank text-left break-link vulnerability-name-button" - @click="openModal({ issue })" + @click="openModal({ issue });" > - <div - v-if="isNew" - class="badge badge-danger append-right-5" - > - {{ s__('New') }} - </div>{{ issue.name }} + <div v-if="isNew" class="badge badge-danger append-right-5">{{ s__('New') }}</div> + {{ issue.name }} </button> </div> </div> diff --git a/app/assets/javascripts/set_status_modal/set_status_modal_trigger.vue b/app/assets/javascripts/set_status_modal/set_status_modal_trigger.vue index 48e5ede80f2..0e8b6d93f42 100644 --- a/app/assets/javascripts/set_status_modal/set_status_modal_trigger.vue +++ b/app/assets/javascripts/set_status_modal/set_status_modal_trigger.vue @@ -23,11 +23,5 @@ export default { </script> <template> - <button - type="button" - class="btn menu-item" - @click="openModal" - > - {{ buttonText }} - </button> + <button type="button" class="btn menu-item" @click="openModal">{{ buttonText }}</button> </template> diff --git a/app/assets/javascripts/set_status_modal/set_status_modal_wrapper.vue b/app/assets/javascripts/set_status_modal/set_status_modal_wrapper.vue index 8a48eea5c89..f04f7606976 100644 --- a/app/assets/javascripts/set_status_modal/set_status_modal_wrapper.vue +++ b/app/assets/javascripts/set_status_modal/set_status_modal_wrapper.vue @@ -176,10 +176,7 @@ export default { type="hidden" name="user[status][emoji]" /> - <div - ref="userStatusForm" - class="form-group position-relative m-0" - > + <div ref="userStatusForm" class="form-group position-relative m-0"> <div class="input-group"> <span class="input-group-btn"> <button @@ -197,18 +194,9 @@ export default { v-show="noEmoji" class="js-no-emoji-placeholder no-emoji-placeholder position-relative" > - <icon - name="emoji_slightly_smiling_face" - css-classes="award-control-icon-neutral" - /> - <icon - name="emoji_smiley" - css-classes="award-control-icon-positive" - /> - <icon - name="emoji_smile" - css-classes="award-control-icon-super-positive" - /> + <icon name="emoji_slightly_smiling_face" css-classes="award-control-icon-neutral" /> + <icon name="emoji_smiley" css-classes="award-control-icon-positive" /> + <icon name="emoji_smile" css-classes="award-control-icon-super-positive" /> </span> </button> </span> @@ -223,10 +211,7 @@ export default { @keyup.enter.prevent @click="hideEmojiMenu" /> - <span - v-show="isDirty" - class="input-group-btn" - > + <span v-show="isDirty" class="input-group-btn"> <button v-gl-tooltip.bottom :title="s__('SetStatusModal|Clear status')" @@ -234,7 +219,7 @@ export default { name="button" type="button" class="js-clear-user-status-button clear-user-status btn" - @click="clearStatusInputs()" + @click="clearStatusInputs();" > <icon name="close" /> </button> diff --git a/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue b/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue index 284a258d3c9..0ad2b3a73a2 100644 --- a/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue +++ b/app/assets/javascripts/sidebar/components/assignees/assignee_title.vue @@ -32,18 +32,8 @@ export default { <template> <div class="title hide-collapsed"> {{ assigneeTitle }} - <i - v-if="loading" - aria-hidden="true" - class="fa fa-spinner fa-spin block-loading" - > - - </i> - <a - v-if="editable" - class="js-sidebar-dropdown-toggle edit-link float-right" - href="#" - > + <i v-if="loading" aria-hidden="true" class="fa fa-spinner fa-spin block-loading"> </i> + <a v-if="editable" class="js-sidebar-dropdown-toggle edit-link float-right" href="#"> {{ __('Edit') }} </a> <a @@ -53,12 +43,7 @@ export default { href="#" role="button" > - <i - aria-hidden="true" - data-hidden="true" - class="fa fa-angle-double-right" - > - </i> + <i aria-hidden="true" data-hidden="true" class="fa fa-angle-double-right"> </i> </a> </div> </template> diff --git a/app/assets/javascripts/sidebar/components/assignees/assignees.vue b/app/assets/javascripts/sidebar/components/assignees/assignees.vue index f1ea6aacdb2..d1a396182b3 100644 --- a/app/assets/javascripts/sidebar/components/assignees/assignees.vue +++ b/app/assets/javascripts/sidebar/components/assignees/assignees.vue @@ -133,12 +133,7 @@ export default { data-placement="left" data-boundary="viewport" > - <i - v-if="hasNoUsers" - aria-label="No Assignee" - class="fa fa-user" - > - </i> + <i v-if="hasNoUsers" aria-label="No Assignee" class="fa fa-user"> </i> <button v-for="(user, index) in users" v-if="shouldRenderCollapsedAssignee(index)" @@ -152,20 +147,10 @@ export default { width="24" class="avatar avatar-inline s24" /> - <span class="author"> - {{ user.name }} - </span> + <span class="author"> {{ user.name }} </span> </button> - <button - v-if="hasMoreThanTwoAssignees" - class="btn-link" - type="button" - > - <span - class="avatar-counter sidebar-avatar-counter" - > - {{ sidebarAvatarCounter }} - </span> + <button v-if="hasMoreThanTwoAssignees" class="btn-link" type="button"> + <span class="avatar-counter sidebar-avatar-counter"> {{ sidebarAvatarCounter }} </span> </button> </div> <div class="value hide-collapsed"> @@ -173,34 +158,20 @@ export default { <span class="assign-yourself no-value"> No assignee <template v-if="editable"> - - - <button - type="button" - class="btn-link" - @click="assignSelf" - > - assign yourself - </button> + - <button type="button" class="btn-link" @click="assignSelf">assign yourself</button> </template> </span> </template> <template v-else-if="hasOneUser"> - <a - :href="assigneeUrl(firstUser)" - class="author-link bold" - > + <a :href="assigneeUrl(firstUser)" class="author-link bold"> <img :alt="assigneeAlt(firstUser)" :src="avatarUrl(firstUser)" width="32" class="avatar avatar-inline s32" /> - <span class="author"> - {{ firstUser.name }} - </span> - <span class="username"> - {{ assigneeUsername(firstUser) }} - </span> + <span class="author"> {{ firstUser.name }} </span> + <span class="username"> {{ assigneeUsername(firstUser) }} </span> </a> </template> <template v-else> @@ -227,15 +198,8 @@ export default { </a> </div> </div> - <div - v-if="renderShowMoreSection" - class="user-list-more" - > - <button - type="button" - class="btn-link" - @click="toggleShowLess" - > + <div v-if="renderShowMoreSection" class="user-list-more"> + <button type="button" class="btn-link" @click="toggleShowLess"> <template v-if="showLess"> {{ hiddenAssigneesLabel }} </template> diff --git a/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue b/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue index 439e8a69df0..597b723a9d9 100644 --- a/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue +++ b/app/assets/javascripts/sidebar/components/confidential/confidential_issue_sidebar.vue @@ -74,10 +74,7 @@ export default { data-boundary="viewport" @click="toggleForm" > - <icon - :name="confidentialityIcon" - aria-hidden="true" - /> + <icon :name="confidentialityIcon" aria-hidden="true" /> </div> <div class="title hide-collapsed"> {{ __('Confidentiality') }} @@ -96,20 +93,11 @@ export default { :is-confidential="isConfidential" :update-confidential-attribute="updateConfidentialAttribute" /> - <div - v-if="!isConfidential" - class="no-value sidebar-item-value"> - <icon - :size="16" - name="eye" - aria-hidden="true" - class="sidebar-item-icon inline" - /> + <div v-if="!isConfidential" class="no-value sidebar-item-value"> + <icon :size="16" name="eye" aria-hidden="true" class="sidebar-item-icon inline" /> {{ __('Not confidential') }} </div> - <div - v-else - class="value sidebar-item-value hide-collapsed"> + <div v-else class="value sidebar-item-value hide-collapsed"> <icon :size="16" name="eye-slash" diff --git a/app/assets/javascripts/sidebar/components/confidential/edit_form.vue b/app/assets/javascripts/sidebar/components/confidential/edit_form.vue index 4165aa19acf..0ecbf934c25 100644 --- a/app/assets/javascripts/sidebar/components/confidential/edit_form.vue +++ b/app/assets/javascripts/sidebar/components/confidential/edit_form.vue @@ -35,14 +35,8 @@ export default { <div class="dropdown show"> <div class="dropdown-menu sidebar-item-warning-message"> <div> - <p - v-if="!isConfidential" - v-html="confidentialityOnWarning"> - </p> - <p - v-else - v-html="confidentialityOffWarning"> - </p> + <p v-if="!isConfidential" v-html="confidentialityOnWarning"></p> + <p v-else v-html="confidentialityOffWarning"></p> <edit-form-buttons :is-confidential="isConfidential" :update-confidential-attribute="updateConfidentialAttribute" diff --git a/app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue b/app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue index 38b1ddbfd5b..4b9bb5c7b0e 100644 --- a/app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue +++ b/app/assets/javascripts/sidebar/components/confidential/edit_form_buttons.vue @@ -36,18 +36,10 @@ export default { <template> <div class="sidebar-item-warning-message-actions"> - <button - type="button" - class="btn btn-default append-right-10" - @click="closeForm" - > + <button type="button" class="btn btn-default append-right-10" @click="closeForm"> {{ __('Cancel') }} </button> - <button - type="button" - class="btn btn-close" - @click.prevent="submitForm" - > + <button type="button" class="btn btn-close" @click.prevent="submitForm"> {{ toggleButtonText }} </button> </div> diff --git a/app/assets/javascripts/sidebar/components/lock/edit_form.vue b/app/assets/javascripts/sidebar/components/lock/edit_form.vue index 4906dad22e1..630da751704 100644 --- a/app/assets/javascripts/sidebar/components/lock/edit_form.vue +++ b/app/assets/javascripts/sidebar/components/lock/edit_form.vue @@ -43,22 +43,11 @@ export default { <template> <div class="dropdown show"> <div class="dropdown-menu sidebar-item-warning-message"> - <p - v-if="isLocked" - class="text" - v-html="unlockWarning"> - </p> + <p v-if="isLocked" class="text" v-html="unlockWarning"></p> - <p - v-else - class="text" - v-html="lockWarning"> - </p> + <p v-else class="text" v-html="lockWarning"></p> - <edit-form-buttons - :is-locked="isLocked" - :update-locked-attribute="updateLockedAttribute" - /> + <edit-form-buttons :is-locked="isLocked" :update-locked-attribute="updateLockedAttribute" /> </div> </div> </template> diff --git a/app/assets/javascripts/sidebar/components/lock/edit_form_buttons.vue b/app/assets/javascripts/sidebar/components/lock/edit_form_buttons.vue index 63082654101..902aeb9b8e4 100644 --- a/app/assets/javascripts/sidebar/components/lock/edit_form_buttons.vue +++ b/app/assets/javascripts/sidebar/components/lock/edit_form_buttons.vue @@ -41,19 +41,11 @@ export default { <template> <div class="sidebar-item-warning-message-actions"> - <button - type="button" - class="btn btn-default append-right-10" - @click="closeForm" - > + <button type="button" class="btn btn-default append-right-10" @click="closeForm"> {{ __('Cancel') }} </button> - <button - type="button" - class="btn btn-close" - @click.prevent="submitForm" - > + <button type="button" class="btn btn-close" @click.prevent="submitForm"> {{ buttonText }} </button> </div> diff --git a/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue b/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue index 48a2b9194aa..faea64c9841 100644 --- a/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue +++ b/app/assets/javascripts/sidebar/components/lock/lock_issue_sidebar.vue @@ -100,14 +100,13 @@ export default { data-boundary="viewport" @click="toggleForm" > - <icon - :name="lockIcon" - class="sidebar-item-icon is-active" - /> + <icon :name="lockIcon" class="sidebar-item-icon is-active" /> </div> <div class="title hide-collapsed"> - {{ sprintf(__('Lock %{issuableDisplayName}'), { issuableDisplayName: issuableDisplayName }) }} + {{ + sprintf(__('Lock %{issuableDisplayName}'), { issuableDisplayName: issuableDisplayName }) + }} <button v-if="isEditable" class="float-right lock-edit" @@ -126,28 +125,13 @@ export default { :issuable-type="issuableType" /> - <div - v-if="isLocked" - class="value sidebar-item-value" - > - <icon - :size="16" - name="lock" - class="sidebar-item-icon inline is-active" - /> + <div v-if="isLocked" class="value sidebar-item-value"> + <icon :size="16" name="lock" class="sidebar-item-icon inline is-active" /> {{ __('Locked') }} </div> - <div - v-else - class="no-value sidebar-item-value hide-collapsed" - > - <icon - :size="16" - name="lock-open" - class="sidebar-item-icon inline" - /> - {{ __('Unlocked') }} + <div v-else class="no-value sidebar-item-value hide-collapsed"> + <icon :size="16" name="lock-open" class="sidebar-item-icon inline" /> {{ __('Unlocked') }} </div> </div> </div> diff --git a/app/assets/javascripts/sidebar/components/participants/participants.vue b/app/assets/javascripts/sidebar/components/participants/participants.vue index 43d2f754bac..4bfc8fa7eec 100644 --- a/app/assets/javascripts/sidebar/components/participants/participants.vue +++ b/app/assets/javascripts/sidebar/components/participants/participants.vue @@ -88,21 +88,9 @@ export default { data-boundary="viewport" @click="onClickCollapsedIcon" > - <i - class="fa fa-users" - aria-hidden="true" - > - </i> - <gl-loading-icon - v-if="loading" - class="js-participants-collapsed-loading-icon" - /> - <span - v-else - class="js-participants-collapsed-count" - > - {{ participantCount }} - </span> + <i class="fa fa-users" aria-hidden="true"> </i> + <gl-loading-icon v-if="loading" class="js-participants-collapsed-loading-icon" /> + <span v-else class="js-participants-collapsed-count"> {{ participantCount }} </span> </div> <div class="title hide-collapsed"> <gl-loading-icon @@ -118,10 +106,7 @@ export default { :key="participant.id" class="participants-author js-participants-author" > - <a - :href="participant.web_url" - class="author-link" - > + <a :href="participant.web_url" class="author-link"> <user-avatar-image :lazy="true" :img-src="participant.avatar_url" @@ -133,10 +118,7 @@ export default { </a> </div> </div> - <div - v-if="hasMoreParticipants" - class="participants-more hide-collapsed" - > + <div v-if="hasMoreParticipants" class="participants-more hide-collapsed"> <button type="button" class="btn-transparent btn-blank js-toggle-participants-button" diff --git a/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue b/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue index b6151aa6c64..a75daca156c 100644 --- a/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue +++ b/app/assets/javascripts/sidebar/components/subscriptions/subscriptions.vue @@ -73,10 +73,7 @@ export default { <template> <div> - <div - class="sidebar-collapsed-icon" - @click="onClickCollapsedIcon" - > + <div class="sidebar-collapsed-icon" @click="onClickCollapsedIcon"> <span v-tooltip :title="notificationTooltip" @@ -92,9 +89,7 @@ export default { /> </span> </div> - <span class="issuable-header-text hide-collapsed float-left"> - {{ __('Notifications') }} - </span> + <span class="issuable-header-text hide-collapsed float-left"> {{ __('Notifications') }} </span> <toggle-button ref="toggleButton" :is-loading="showLoadingState" diff --git a/app/assets/javascripts/sidebar/components/time_tracking/collapsed_state.vue b/app/assets/javascripts/sidebar/components/time_tracking/collapsed_state.vue index 259858e4b46..657ac837baf 100644 --- a/app/assets/javascripts/sidebar/components/time_tracking/collapsed_state.vue +++ b/app/assets/javascripts/sidebar/components/time_tracking/collapsed_state.vue @@ -120,9 +120,7 @@ export default { <icon name="timer" /> <div class="time-tracking-collapsed-summary"> <div :class="divClass"> - <span :class="spanClass"> - {{ text }} - </span> + <span :class="spanClass"> {{ text }} </span> </div> </div> </div> diff --git a/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue b/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue index 87780411c26..f4d926cd3ec 100644 --- a/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue +++ b/app/assets/javascripts/sidebar/components/time_tracking/comparison_pane.vue @@ -69,26 +69,15 @@ export default { data-placement="top" role="timeRemainingDisplay" > - <gl-progress-bar - :value="timeRemainingPercent" - :variant="progressBarVariant" - /> + <gl-progress-bar :value="timeRemainingPercent" :variant="progressBarVariant" /> <div class="compare-display-container"> <div class="compare-display float-left"> - <span class="compare-label"> - {{ s__('TimeTracking|Spent') }} - </span> - <span class="compare-value spent"> - {{ timeSpentHumanReadable }} - </span> + <span class="compare-label"> {{ s__('TimeTracking|Spent') }} </span> + <span class="compare-value spent"> {{ timeSpentHumanReadable }} </span> </div> <div class="compare-display estimated float-right"> - <span class="compare-label"> - {{ s__('TimeTrackingEstimated|Est') }} - </span> - <span class="compare-value"> - {{ timeEstimateHumanReadable }} - </span> + <span class="compare-label"> {{ s__('TimeTrackingEstimated|Est') }} </span> + <span class="compare-value"> {{ timeEstimateHumanReadable }} </span> </div> </div> </div> diff --git a/app/assets/javascripts/sidebar/components/time_tracking/estimate_only_pane.vue b/app/assets/javascripts/sidebar/components/time_tracking/estimate_only_pane.vue index 08fce597e50..305726d9725 100644 --- a/app/assets/javascripts/sidebar/components/time_tracking/estimate_only_pane.vue +++ b/app/assets/javascripts/sidebar/components/time_tracking/estimate_only_pane.vue @@ -12,9 +12,6 @@ export default { <template> <div class="time-tracking-estimate-only-pane"> - <span class="bold"> - {{ s__('TimeTracking|Estimated:') }} - </span> - {{ timeEstimateHumanReadable }} + <span class="bold"> {{ s__('TimeTracking|Estimated:') }} </span> {{ timeEstimateHumanReadable }} </div> </template> diff --git a/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue b/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue index 91909cd49b8..51cd5810ac0 100644 --- a/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue +++ b/app/assets/javascripts/sidebar/components/time_tracking/help_state.vue @@ -40,22 +40,11 @@ export default { <template> <div class="time-tracking-help-state"> <div class="time-tracking-info"> - <h4> - {{ __('Track time with quick actions') }} - </h4> - <p> - {{ __('Quick actions can be used in the issues description and comment boxes.') }} - </p> - <p v-html="estimateText"> - </p> - <p v-html="spendText"> - </p> - <a - :href="href" - class="btn btn-default learn-more-button" - > - {{ __('Learn more') }} - </a> + <h4>{{ __('Track time with quick actions') }}</h4> + <p>{{ __('Quick actions can be used in the issues description and comment boxes.') }}</p> + <p v-html="estimateText"></p> + <p v-html="spendText"></p> + <a :href="href" class="btn btn-default learn-more-button"> {{ __('Learn more') }} </a> </div> </div> </template> diff --git a/app/assets/javascripts/sidebar/components/time_tracking/no_tracking_pane.vue b/app/assets/javascripts/sidebar/components/time_tracking/no_tracking_pane.vue index 9228184df5b..45552589e50 100644 --- a/app/assets/javascripts/sidebar/components/time_tracking/no_tracking_pane.vue +++ b/app/assets/javascripts/sidebar/components/time_tracking/no_tracking_pane.vue @@ -6,8 +6,6 @@ export default { <template> <div class="time-tracking-no-tracking-pane"> - <span class="no-value"> - {{ __('No estimate or time spent') }} - </span> + <span class="no-value"> {{ __('No estimate or time spent') }} </span> </div> </template> diff --git a/app/assets/javascripts/sidebar/components/time_tracking/spent_only_pane.vue b/app/assets/javascripts/sidebar/components/time_tracking/spent_only_pane.vue index 59cd99f8f14..7c7356e2afa 100644 --- a/app/assets/javascripts/sidebar/components/time_tracking/spent_only_pane.vue +++ b/app/assets/javascripts/sidebar/components/time_tracking/spent_only_pane.vue @@ -12,7 +12,6 @@ export default { <template> <div class="time-tracking-spend-only-pane"> - <span class="bold">Spent:</span> - {{ timeSpentHumanReadable }} + <span class="bold">Spent:</span> {{ timeSpentHumanReadable }} </div> </template> diff --git a/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue b/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue index ef76dc13ce9..d3a4f9c81e0 100644 --- a/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue +++ b/app/assets/javascripts/sidebar/components/time_tracking/time_tracker.vue @@ -90,10 +90,7 @@ export default { </script> <template> - <div - v-cloak - class="time_tracker time-tracking-component-wrap" - > + <div v-cloak class="time_tracker time-tracking-component-wrap"> <time-tracking-collapsed-state :show-comparison-state="showComparisonState" :show-no-time-tracking-state="showNoTimeTrackingState" @@ -105,27 +102,15 @@ export default { /> <div class="title hide-collapsed"> {{ __('Time tracking') }} - <div - v-if="!showHelpState" - class="help-button float-right" - @click="toggleHelpState(true)" - > - <i - class="fa fa-question-circle" - aria-hidden="true" - > - </i> + <div v-if="!showHelpState" class="help-button float-right" @click="toggleHelpState(true);"> + <i class="fa fa-question-circle" aria-hidden="true"> </i> </div> <div v-if="showHelpState" class="close-help-button float-right" - @click="toggleHelpState(false)" + @click="toggleHelpState(false);" > - <i - class="fa fa-close" - aria-hidden="true" - > - </i> + <i class="fa fa-close" aria-hidden="true"> </i> </div> </div> <div class="time-tracking-content hide-collapsed"> @@ -137,9 +122,7 @@ export default { v-if="showSpentOnlyState" :time-spent-human-readable="humanTimeSpent" /> - <time-tracking-no-tracking-pane - v-if="showNoTimeTrackingState" - /> + <time-tracking-no-tracking-pane v-if="showNoTimeTrackingState" /> <time-tracking-comparison-pane v-if="showComparisonState" :time-estimate="timeEstimate" @@ -148,10 +131,7 @@ export default { :time-estimate-human-readable="humanTimeEstimate" /> <transition name="help-state-toggle"> - <time-tracking-help-state - v-if="showHelpState" - :root-path="rootPath" - /> + <time-tracking-help-state v-if="showHelpState" :root-path="rootPath" /> </transition> </div> </div> diff --git a/app/assets/javascripts/sidebar/components/todo_toggle/todo.vue b/app/assets/javascripts/sidebar/components/todo_toggle/todo.vue index 7edef35461a..706e6ca19c3 100644 --- a/app/assets/javascripts/sidebar/components/todo_toggle/todo.vue +++ b/app/assets/javascripts/sidebar/components/todo_toggle/todo.vue @@ -84,15 +84,7 @@ export default { :css-classes="collapsedButtonIconClasses" :name="collapsedButtonIcon" /> - <span - v-show="!collapsed" - class="issuable-todo-inner" - > - {{ buttonLabel }} - </span> - <gl-loading-icon - v-show="isActionActive" - :inline="true" - /> + <span v-show="!collapsed" class="issuable-todo-inner"> {{ buttonLabel }} </span> + <gl-loading-icon v-show="isActionActive" :inline="true" /> </button> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue b/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue index fe741dc60cb..1c5b5d02e20 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/deployment.vue @@ -116,9 +116,7 @@ export default { <div class="deploy-body"> <div class="js-deployment-info deployment-info"> <template v-if="hasDeploymentMeta"> - <span> - {{ deployedText }} - </span> + <span> {{ deployedText }} </span> <tooltip-on-truncate :title="deployment.name" truncate-target="child" @@ -157,20 +155,14 @@ export default { :main-action-link="deployment.external_url" filter-key="path" > - <template - slot="mainAction" - slot-scope="slotProps" - > + <template slot="mainAction" slot-scope="slotProps"> <review-app-link :link="deployment.external_url" :css-class="`deploy-link js-deploy-url inline ${slotProps.className}`" /> </template> - <template - slot="result" - slot-scope="slotProps" - > + <template slot="result" slot-scope="slotProps"> <a :href="slotProps.result.external_url" target="_blank" @@ -193,11 +185,11 @@ export default { css-class="js-deploy-url js-deploy-url-feature-flag deploy-link btn btn-default btn-sm inlin" /> </template> - <span + <span v-if="deployment.stop_url" - v-tooltip + v-tooltip :title="deployInProgressTooltip" - class="d-inline-block" + class="d-inline-block" tabindex="0" > <loading-button diff --git a/app/assets/javascripts/vue_merge_request_widget/components/memory_usage.vue b/app/assets/javascripts/vue_merge_request_widget/components/memory_usage.vue index 41dbc5c9cbb..7ce454b7338 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/memory_usage.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/memory_usage.vue @@ -154,27 +154,19 @@ export default { <template> <div class="mr-info-list clearfix mr-memory-usage js-mr-memory-usage"> - <p - v-if="shouldShowLoading" - class="usage-info js-usage-info usage-info-loading"> - <i - class="fa fa-spinner fa-spin usage-info-load-spinner" - aria-hidden="true"> - </i>{{ s__('mrWidget|Loading deployment statistics') }} + <p v-if="shouldShowLoading" class="usage-info js-usage-info usage-info-loading"> + <i class="fa fa-spinner fa-spin usage-info-load-spinner" aria-hidden="true"> </i + >{{ s__('mrWidget|Loading deployment statistics') }} </p> <p v-if="shouldShowMemoryGraph" class="usage-info js-usage-info" - v-html="memoryChangeMessage"> - </p> - <p - v-if="shouldShowLoadFailure" - class="usage-info js-usage-info usage-info-failed"> + v-html="memoryChangeMessage" + ></p> + <p v-if="shouldShowLoadFailure" class="usage-info js-usage-info usage-info-failed"> {{ s__('mrWidget|Failed to load deployment statistics') }} </p> - <p - v-if="shouldShowMetricsUnavailable" - class="usage-info js-usage-info usage-info-unavailable"> + <p v-if="shouldShowMetricsUnavailable" class="usage-info js-usage-info usage-info-unavailable"> {{ s__('mrWidget|Deployment statistics are not available currently') }} </p> <memory-graph diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue index 2ad9e8be655..84937aa9510 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author.vue @@ -39,15 +39,7 @@ export default { :title="author.name" class="author-link inline" > - <img - :src="avatarUrl" - class="avatar avatar-inline s16" - /> - <span - v-if="showAuthorName" - class="author" - > - {{ author.name }} - </span> + <img :src="avatarUrl" class="avatar avatar-inline s16" /> + <span v-if="showAuthorName" class="author"> {{ author.name }} </span> </a> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author_time.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author_time.vue index 1d902131f49..6b3007fce51 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author_time.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_author_time.vue @@ -34,12 +34,6 @@ export default { <h4 class="js-mr-widget-author"> {{ actionText }} <mr-widget-author :author="author" /> - <time - v-tooltip - :title="dateTitle" - data-container="body" - > - {{ dateReadable }} - </time> + <time v-tooltip :title="dateTitle" data-container="body"> {{ dateReadable }} </time> </h4> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue index acfdab3a015..6f422ea3f27 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_header.vue @@ -76,13 +76,11 @@ export default { </script> <template> <div class="mr-source-target append-bottom-default"> - <div class="git-merge-icon-container append-right-default"> - <icon name="git-merge" /> - </div> + <div class="git-merge-icon-container append-right-default"><icon name="git-merge" /></div> <div class="git-merge-container d-flex"> <div class="normal"> <strong> - {{ s__("mrWidget|Request to merge") }} + {{ s__('mrWidget|Request to merge') }} <tooltip-on-truncate :title="mr.sourceBranch" truncate-target="child" @@ -93,32 +91,23 @@ export default { :title="__('Copy branch name to clipboard')" css-class="btn-default btn-transparent btn-clipboard" /> - {{ s__("mrWidget|into") }} + {{ s__('mrWidget|into') }} <tooltip-on-truncate :title="mr.targetBranch" truncate-target="child" class="label-branch label-truncate" > - <a - :href="mr.targetBranchTreePath" - class="js-target-branch" - > - {{ mr.targetBranch }} - </a> + <a :href="mr.targetBranchTreePath" class="js-target-branch"> {{ mr.targetBranch }} </a> </tooltip-on-truncate> </strong> <div v-if="shouldShowCommitsBehindText" class="diverged-commits-count" v-html="commitsBehindText" - > - </div> + ></div> </div> - <div - v-if="mr.isOpen" - class="branch-actions d-flex" - > + <div v-if="mr.isOpen" class="branch-actions d-flex"> <a v-if="!mr.sourceBranchRemoved" v-tooltip @@ -130,7 +119,7 @@ export default { tabindex="0" role="button" > - {{ s__("mrWidget|Open in Web IDE") }} + {{ s__('mrWidget|Open in Web IDE') }} </a> <button :disabled="mr.sourceBranchRemoved" @@ -139,7 +128,7 @@ export default { class="btn btn-default js-check-out-branch append-right-default" type="button" > - {{ s__("mrWidget|Check out branch") }} + {{ s__('mrWidget|Check out branch') }} </button> <span class="dropdown"> <button @@ -150,29 +139,17 @@ export default { aria-haspopup="true" aria-expanded="false" > - <icon name="download" /> - <i - class="fa fa-caret-down" - aria-hidden="true"> - </i> + <icon name="download" /> <i class="fa fa-caret-down" aria-hidden="true"> </i> </button> <ul class="dropdown-menu dropdown-menu-right"> <li> - <a - :href="mr.emailPatchesPath" - class="js-download-email-patches" - download - > - {{ s__("mrWidget|Email patches") }} + <a :href="mr.emailPatchesPath" class="js-download-email-patches" download> + {{ s__('mrWidget|Email patches') }} </a> </li> <li> - <a - :href="mr.plainDiffPath" - class="js-download-plain-diff" - download - > - {{ s__("mrWidget|Plain diff") }} + <a :href="mr.plainDiffPath" class="js-download-plain-diff" download> + {{ s__('mrWidget|Plain diff') }} </a> </li> </ul> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_merge_help.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_merge_help.vue index 37c6af13c03..a347269c916 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_merge_help.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_merge_help.vue @@ -28,7 +28,7 @@ export default { {{ missingBranchInfo }} </template> <template v-else> - {{ s__("mrWidget|You can merge this merge request manually using the") }} + {{ s__('mrWidget|You can merge this merge request manually using the') }} </template> <button @@ -37,7 +37,7 @@ export default { data-toggle="modal" data-target="#modal_merge_info" > - {{ s__("mrWidget|command line") }} + {{ s__('mrWidget|command line') }} </button> </section> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue index 53608838f2f..71571ba9cab 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_pipeline.vue @@ -79,48 +79,29 @@ export default { </script> <template> - <div - v-if="hasPipeline || hasCIError" - class="mr-widget-heading append-bottom-default" - > + <div v-if="hasPipeline || hasCIError" class="mr-widget-heading append-bottom-default"> <div class="ci-widget media"> <template v-if="hasCIError"> <div class="add-border ci-status-icon ci-status-icon-failed ci-error js-ci-error append-right-default" > - <icon - :size="32" - name="status_failed_borderless" - /> - </div> - <div - class="media-body" - v-html="errorText" - > + <icon :size="32" name="status_failed_borderless" /> </div> + <div class="media-body" v-html="errorText"></div> </template> <template v-else-if="hasPipeline"> - <a - :href="status.details_path" - class="align-self-start append-right-default" - > - <ci-icon - :status="status" - :size="32" - :borderless="true" - class="add-border" - /> + <a :href="status.details_path" class="align-self-start append-right-default"> + <ci-icon :status="status" :size="32" :borderless="true" class="add-border" /> </a> <div class="ci-widget-container d-flex"> <div class="ci-widget-content"> <div class="media-body"> <div class="font-weight-bold"> Pipeline - <a - :href="pipeline.path" - class="pipeline-id font-weight-normal pipeline-number" - >#{{ pipeline.id }}</a> + <a :href="pipeline.path" class="pipeline-id font-weight-normal pipeline-number" + >#{{ pipeline.id }}</a + > {{ pipeline.details.status.label }} @@ -130,7 +111,8 @@ export default { :href="pipeline.commit.commit_path" class="commit-sha js-commit-link font-weight-normal" > - {{ pipeline.commit.short_id }}</a> + {{ pipeline.commit.short_id }}</a + > on <tooltip-on-truncate :title="sourceBranch" @@ -140,20 +122,12 @@ export default { /> </template> </div> - <div - v-if="pipeline.coverage" - class="coverage" - > - Coverage {{ pipeline.coverage }}% - </div> + <div v-if="pipeline.coverage" class="coverage">Coverage {{ pipeline.coverage }}%</div> </div> </div> <div> <span class="mr-widget-pipeline-graph"> - <span - v-if="hasStages" - class="stage-cell" - > + <span v-if="hasStages" class="stage-cell"> <div v-for="(stage, i) in pipeline.details.stages" :key="i" diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_related_links.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_related_links.vue index cc77b96a589..1b3b589c32f 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_related_links.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_related_links.vue @@ -30,14 +30,10 @@ export default { </script> <template> <section class="mr-info-list mr-links"> - <p v-if="relatedLinks.closing"> - {{ closesText }} <span v-html="relatedLinks.closing"></span> - </p> + <p v-if="relatedLinks.closing">{{ closesText }} <span v-html="relatedLinks.closing"></span></p> <p v-if="relatedLinks.mentioned"> - {{ s__("mrWidget|Mentions") }} <span v-html="relatedLinks.mentioned"></span> - </p> - <p v-if="relatedLinks.assignToMe"> - <span v-html="relatedLinks.assignToMe"></span> + {{ s__('mrWidget|Mentions') }} <span v-html="relatedLinks.mentioned"></span> </p> + <p v-if="relatedLinks.assignToMe"><span v-html="relatedLinks.assignToMe"></span></p> </section> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_status_icon.vue b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_status_icon.vue index 060361a6516..780ced4d382 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_status_icon.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/mr_widget_status_icon.vue @@ -33,18 +33,9 @@ export default { </script> <template> <div class="space-children d-flex append-right-10 widget-status-icon"> - <div - v-if="isLoading" - class="mr-widget-icon" - > - <gl-loading-icon /> - </div> + <div v-if="isLoading" class="mr-widget-icon"><gl-loading-icon /></div> - <ci-icon - v-else - :status="statusObj" - :size="24" - /> + <ci-icon v-else :status="statusObj" :size="24" /> <button v-if="showDisabledButton" @@ -52,7 +43,7 @@ export default { class="js-disabled-merge-button btn btn-success btn-sm" disabled="true" > - {{ s__("mrWidget|Merge") }} + {{ s__('mrWidget|Merge') }} </button> </div> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/review_app_link.vue b/app/assets/javascripts/vue_merge_request_widget/components/review_app_link.vue index b007d4f4dcb..de9c122f268 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/review_app_link.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/review_app_link.vue @@ -18,13 +18,7 @@ export default { }; </script> <template> - <a - :href="link" - target="_blank" - rel="noopener noreferrer nofollow" - :class="cssClass" - > - {{ __('View app') }} - <icon name="external-link" /> + <a :href="link" target="_blank" rel="noopener noreferrer nofollow" :class="cssClass"> + {{ __('View app') }} <icon name="external-link" /> </a> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue b/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue index 01f707163d4..dd940548e30 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/source_branch_removal_status.vue @@ -14,21 +14,9 @@ export default { </script> <template> - <p - v-once - class="mr-info-list mr-links source-branch-removal-status append-bottom-0" - > - <span - class="status-text" - v-html="removesBranchText" - > - </span> - <i - v-tooltip - :title="tooltipTitle" - :aria-label="tooltipTitle" - class="fa fa-question-circle" - > + <p v-once class="mr-info-list mr-links source-branch-removal-status append-bottom-0"> + <span class="status-text" v-html="removesBranchText"> </span> + <i v-tooltip :title="tooltipTitle" :aria-label="tooltipTitle" class="fa fa-question-circle"> </i> </p> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_archived.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_archived.vue index 2a76a878448..7ddcdd49df5 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_archived.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_archived.vue @@ -11,20 +11,14 @@ export default { <template> <div class="mr-widget-body media"> <div class="space-children"> - <status-icon - status="warning" - /> - <button - type="button" - class="btn btn-success btn-sm" - disabled="true" - > - {{ s__("mrWidget|Merge") }} + <status-icon status="warning" /> + <button type="button" class="btn btn-success btn-sm" disabled="true"> + {{ s__('mrWidget|Merge') }} </button> </div> <div class="media-body"> <span class="bold"> - {{ s__("mrWidget|This project is archived, write access has been disabled") }} + {{ s__('mrWidget|This project is archived, write access has been disabled') }} </span> </div> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue index 409fc2f2db4..a3a44dd8e99 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_auto_merge_failed.vue @@ -35,8 +35,10 @@ export default { <status-icon status="warning" /> <div class="media-body space-children"> <span class="bold"> - <template v-if="mr.mergeError">{{ mr.mergeError }}.</template> - {{ s__("mrWidget|This merge request failed to be merged automatically") }} + <template v-if="mr.mergeError" + >{{ mr.mergeError }}.</template + > + {{ s__('mrWidget|This merge request failed to be merged automatically') }} </span> <button :disabled="isRefreshing" @@ -44,11 +46,8 @@ export default { class="btn btn-sm btn-default" @click="refreshWidget" > - <gl-loading-icon - v-if="isRefreshing" - :inline="true" - /> - {{ s__("mrWidget|Refresh") }} + <gl-loading-icon v-if="isRefreshing" :inline="true" /> + {{ s__('mrWidget|Refresh') }} </button> </div> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_checking.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_checking.vue index fdf0a9fd994..cf26003d038 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_checking.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_checking.vue @@ -10,14 +10,9 @@ export default { </script> <template> <div class="mr-widget-body media"> - <status-icon - :show-disabled-button="true" - status="loading" - /> + <status-icon :show-disabled-button="true" status="loading" /> <div class="media-body space-children"> - <span class="bold"> - {{ s__("mrWidget|Checking ability to merge automatically") }} - </span> + <span class="bold"> {{ s__('mrWidget|Checking ability to merge automatically') }} </span> </div> </div> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_closed.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_closed.vue index f06eab95c7e..a5c75369fa1 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_closed.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_closed.vue @@ -21,9 +21,7 @@ export default { </script> <template> <div class="mr-widget-body media"> - <status-icon - status="warning" - /> + <status-icon status="warning" /> <div class="media-body"> <mr-widget-author-time :action-text="s__('mrWidget|Closed by')" @@ -34,13 +32,8 @@ export default { <section class="mr-info-list"> <p> - {{ s__("mrWidget|The changes were not merged into") }} - <a - :href="mr.targetBranchPath" - class="label-branch" - > - {{ mr.targetBranch }} - </a> + {{ s__('mrWidget|The changes were not merged into') }} + <a :href="mr.targetBranchPath" class="label-branch"> {{ mr.targetBranch }} </a> </p> </section> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.vue index 8c808296178..27352e0b2b1 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_conflicts.vue @@ -19,25 +19,23 @@ export default { </script> <template> <div class="mr-widget-body media"> - <status-icon - :show-disabled-button="true" - status="warning" - /> + <status-icon :show-disabled-button="true" status="warning" /> <div class="media-body space-children"> - <span - v-if="mr.shouldBeRebased" - class="bold" - > - {{ s__(`mrWidget|Fast-forward merge is not possible. -To merge this request, first rebase locally.`) }} + <span v-if="mr.shouldBeRebased" class="bold"> + {{ + s__(`mrWidget|Fast-forward merge is not possible. +To merge this request, first rebase locally.`) + }} </span> <template v-else> <span class="bold"> - {{ s__("mrWidget|There are merge conflicts") }}<span v-if="!mr.canMerge">.</span> + {{ s__('mrWidget|There are merge conflicts') }}<span v-if="!mr.canMerge">.</span> <span v-if="!mr.canMerge"> - {{ s__(`mrWidget|Resolve these conflicts or ask someone - with write access to this repository to merge it locally`) }} + {{ + s__(`mrWidget|Resolve these conflicts or ask someone + with write access to this repository to merge it locally`) + }} </span> </span> <a @@ -45,7 +43,7 @@ To merge this request, first rebase locally.`) }} :href="mr.conflictResolutionPath" class="js-resolve-conflicts-button btn btn-default btn-sm" > - {{ s__("mrWidget|Resolve conflicts") }} + {{ s__('mrWidget|Resolve conflicts') }} </a> <button v-if="mr.canMerge" @@ -53,7 +51,7 @@ To merge this request, first rebase locally.`) }} data-toggle="modal" data-target="#modal_merge_info" > - {{ s__("mrWidget|Merge locally") }} + {{ s__('mrWidget|Merge locally') }} </button> </template> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue index c302960f16e..2a4dff71d9b 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_failed_to_merge.vue @@ -74,38 +74,18 @@ export default { <div class="mr-widget-body media"> <template v-if="isRefreshing"> <status-icon status="loading" /> - <span class="media-body bold js-refresh-label"> - {{ s__("mrWidget|Refreshing now") }} - </span> + <span class="media-body bold js-refresh-label"> {{ s__('mrWidget|Refreshing now') }} </span> </template> <template v-else> - <status-icon - :show-disabled-button="true" - status="warning" - /> + <status-icon :show-disabled-button="true" status="warning" /> <div class="media-body space-children"> <span class="bold"> - <span - v-if="mr.mergeError" - class="has-error-message" - > - {{ mergeError }}. - </span> - <span v-else> - {{ s__("mrWidget|Merge failed.") }} - </span> - <span - :class="{ 'has-custom-error': mr.mergeError }" - > - {{ timerText }} - </span> + <span v-if="mr.mergeError" class="has-error-message"> {{ mergeError }}. </span> + <span v-else> {{ s__('mrWidget|Merge failed.') }} </span> + <span :class="{ 'has-custom-error': mr.mergeError }"> {{ timerText }} </span> </span> - <button - class="btn btn-default btn-sm js-refresh-button" - type="button" - @click="refresh" - > - {{ s__("mrWidget|Refresh now") }} + <button class="btn btn-default btn-sm js-refresh-button" type="button" @click="refresh"> + {{ s__('mrWidget|Refresh now') }} </button> </div> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.vue index 484b5600d63..02c76db4a50 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merge_when_pipeline_succeeds.vue @@ -84,9 +84,9 @@ export default { <div class="media-body"> <h4 class="d-flex align-items-start"> <span class="append-right-10"> - {{ s__("mrWidget|Set by") }} + {{ s__('mrWidget|Set by') }} <mr-widget-author :author="mr.setToMWPSBy" /> - {{ s__("mrWidget|to be merged automatically when the pipeline succeeds") }} + {{ s__('mrWidget|to be merged automatically when the pipeline succeeds') }} </span> <a v-if="mr.canCancelAutomaticMerge" @@ -94,35 +94,23 @@ export default { role="button" href="#" class="btn btn-sm btn-default js-cancel-auto-merge" - @click.prevent="cancelAutomaticMerge"> - <i - v-if="isCancellingAutoMerge" - class="fa fa-spinner fa-spin" - aria-hidden="true" - > - </i> - {{ s__("mrWidget|Cancel automatic merge") }} + @click.prevent="cancelAutomaticMerge" + > + <i v-if="isCancellingAutoMerge" class="fa fa-spinner fa-spin" aria-hidden="true"> </i> + {{ s__('mrWidget|Cancel automatic merge') }} </a> </h4> <section class="mr-info-list"> <p> - {{ s__("mrWidget|The changes will be merged into") }} - <a - :href="mr.targetBranchPath" - class="label-branch" - > - {{ mr.targetBranch }} - </a> + {{ s__('mrWidget|The changes will be merged into') }} + <a :href="mr.targetBranchPath" class="label-branch"> {{ mr.targetBranch }} </a> </p> <p v-if="mr.shouldRemoveSourceBranch"> - {{ s__("mrWidget|The source branch will be removed") }} + {{ s__('mrWidget|The source branch will be removed') }} </p> - <p - v-else - class="d-flex align-items-start" - > + <p v-else class="d-flex align-items-start"> <span class="append-right-10"> - {{ s__("mrWidget|The source branch will not be removed") }} + {{ s__('mrWidget|The source branch will not be removed') }} </span> <a v-if="canRemoveSourceBranch" @@ -132,13 +120,8 @@ export default { href="#" @click.prevent="removeSourceBranch" > - <i - v-if="isRemovingSourceBranch" - class="fa fa-spinner fa-spin" - aria-hidden="true" - > - </i> - {{ s__("mrWidget|Remove source branch") }} + <i v-if="isRemovingSourceBranch" class="fa fa-spinner fa-spin" aria-hidden="true"> </i> + {{ s__('mrWidget|Remove source branch') }} </a> </p> </section> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue index fb9ca897844..fe83fe58b67 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merged.vue @@ -154,7 +154,7 @@ export default { </div> <section class="mr-info-list"> <p> - {{ s__("mrWidget|The changes were merged into") }} + {{ s__('mrWidget|The changes were merged into') }} <span class="label-branch"> <a :href="mr.targetBranchPath">{{ mr.targetBranch }}</a> </span> @@ -174,27 +174,22 @@ export default { </template> </p> <p v-if="mr.sourceBranchRemoved"> - {{ s__("mrWidget|The source branch has been removed") }} + {{ s__('mrWidget|The source branch has been removed') }} </p> - <p - v-if="shouldShowRemoveSourceBranch" - class="space-children" - > - <span>{{ s__("mrWidget|You can remove source branch now") }}</span> + <p v-if="shouldShowRemoveSourceBranch" class="space-children"> + <span>{{ s__('mrWidget|You can remove source branch now') }}</span> <button :disabled="isMakingRequest" type="button" class="btn btn-sm btn-default js-remove-branch-button" @click="removeSourceBranch" > - {{ s__("mrWidget|Remove Source Branch") }} + {{ s__('mrWidget|Remove Source Branch') }} </button> </p> <p v-if="shouldShowSourceBranchRemoving"> <gl-loading-icon :inline="true" /> - <span> - {{ s__("mrWidget|The source branch is being removed") }} - </span> + <span> {{ s__('mrWidget|The source branch is being removed') }} </span> </p> </section> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merging.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merging.vue index 139e64d1878..0655eef6504 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merging.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_merging.vue @@ -19,12 +19,10 @@ export default { <div class="mr-widget-body mr-state-locked media"> <status-icon status="loading" /> <div class="media-body"> - <h4> - {{ s__("mrWidget|This merge request is in the process of being merged") }} - </h4> + <h4>{{ s__('mrWidget|This merge request is in the process of being merged') }}</h4> <section class="mr-info-list"> <p> - {{ s__("mrWidget|The changes will be merged into") }} + {{ s__('mrWidget|The changes will be merged into') }} <span class="label-branch"> <a :href="mr.targetBranchPath">{{ mr.targetBranch }}</a> </span> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.vue index 227e9b85f9d..e9aac8b385c 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_missing_branch.vue @@ -46,24 +46,13 @@ export default { </script> <template> <div class="mr-widget-body media"> - <status-icon - :show-disabled-button="true" - status="warning" - /> + <status-icon :show-disabled-button="true" status="warning" /> <div class="media-body space-children"> <span class="bold js-branch-text"> - <span class="capitalize"> - {{ missingBranchName }} - </span> {{ s__("mrWidget|branch does not exist.") }} - {{ missingBranchNameMessage }} - <i - v-tooltip - :title="message" - :aria-label="message" - class="fa fa-question-circle" - > - </i> + <span class="capitalize"> {{ missingBranchName }} </span> + {{ s__('mrWidget|branch does not exist.') }} {{ missingBranchNameMessage }} + <i v-tooltip :title="message" :aria-label="message" class="fa fa-question-circle"> </i> </span> </div> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_not_allowed.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_not_allowed.vue index 360559ae0f0..c203d2824fa 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_not_allowed.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_not_allowed.vue @@ -11,14 +11,13 @@ export default { <template> <div class="mr-widget-body media"> - <status-icon - :show-disabled-button="true" - status="success" - /> + <status-icon :show-disabled-button="true" status="success" /> <div class="media-body space-children"> <span class="bold"> - {{ s__(`mrWidget|Ready to be merged automatically. -Ask someone with write access to this repository to merge this request`) }} + {{ + s__(`mrWidget|Ready to be merged automatically. +Ask someone with write access to this repository to merge this request`) + }} </span> </div> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue index a4eb5afb21c..6331a7d8388 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_pipeline_blocked.vue @@ -10,14 +10,13 @@ export default { </script> <template> <div class="mr-widget-body media"> - <status-icon - :show-disabled-button="true" - status="warning" - /> + <status-icon :show-disabled-button="true" status="warning" /> <div class="media-body space-children"> <span class="bold"> - {{ s__(`mrWidget|Pipeline blocked. -The pipeline for this merge request requires a manual action to proceed`) }} + {{ + s__(`mrWidget|Pipeline blocked. +The pipeline for this merge request requires a manual action to proceed`) + }} </span> </div> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue index 5a7f6cc36fa..adfbcd18588 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/mr_widget_rebase.vue @@ -87,23 +87,17 @@ export default { </script> <template> <div class="mr-widget-body media"> - <status-icon - :status="status" - :show-disabled-button="showDisabledButton" - /> + <status-icon :status="status" :show-disabled-button="showDisabledButton" /> <div class="rebase-state-find-class-convention media media-body space-children"> <template v-if="mr.rebaseInProgress || isMakingRequest"> - <span class="bold"> - Rebase in progress - </span> + <span class="bold"> Rebase in progress </span> </template> <template v-if="!mr.rebaseInProgress && !mr.canPushToSourceBranch"> <span class="bold"> - Fast-forward merge is not possible. - Rebase the source branch onto - <span class="label-branch">{{ mr.targetBranch }}</span> - to allow this merge request to be merged. + Fast-forward merge is not possible. Rebase the source branch onto + <span class="label-branch">{{ mr.targetBranch }}</span> to allow this merge request to be + merged. </span> </template> <template v-if="!mr.rebaseInProgress && mr.canPushToSourceBranch && !isMakingRequest"> @@ -120,19 +114,11 @@ js-toggle-container accept-action media space-children" <gl-loading-icon v-if="isMakingRequest" /> Rebase </button> - <span - v-if="!rebasingError" - class="bold" - > - Fast-forward merge is not possible. - Rebase the source branch onto the target branch or merge target - branch into source branch to allow this merge request to be merged. - </span> - <span - v-else - class="bold danger"> - {{ rebasingError }} + <span v-if="!rebasingError" class="bold"> + Fast-forward merge is not possible. Rebase the source branch onto the target branch or + merge target branch into source branch to allow this merge request to be merged. </span> + <span v-else class="bold danger"> {{ rebasingError }} </span> </div> </template> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/nothing_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/nothing_to_merge.vue index e73b7e410d5..a38495bb4cc 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/nothing_to_merge.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/nothing_to_merge.vue @@ -23,21 +23,16 @@ export default { </div> <div class="text col-md-7 order-md-first col-12"> <span> - Merge requests are a place to propose changes you have made to a project - and discuss those changes with others. + Merge requests are a place to propose changes you have made to a project and discuss those + changes with others. </span> + <p>Interested parties can even contribute by pushing commits if they want to.</p> <p> - Interested parties can even contribute by pushing commits if they want to. - </p> - <p> - Currently there are no changes in this merge request's source branch. - Please push new commits or use a different branch. + Currently there are no changes in this merge request's source branch. Please push new + commits or use a different branch. </p> <div> - <a - v-if="mr.newBlobPath" - :href="mr.newBlobPath" - class="btn btn-inverted btn-success"> + <a v-if="mr.newBlobPath" :href="mr.newBlobPath" class="btn btn-inverted btn-success"> Create file </a> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/pipeline_failed.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/pipeline_failed.vue index 2bb1a34412e..5f56157cb89 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/pipeline_failed.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/pipeline_failed.vue @@ -11,14 +11,13 @@ export default { <template> <div class="mr-widget-body media"> - <status-icon - :show-disabled-button="true" - status="warning" - /> + <status-icon :show-disabled-button="true" status="warning" /> <div class="media-body space-children"> <span class="bold"> - {{ s__(`mrWidget|The pipeline for this merge request failed. -Please retry the job or push a new commit to fix the failure`) }} + {{ + s__(`mrWidget|The pipeline for this merge request failed. +Please retry the job or push a new commit to fix the failure`) + }} </span> </div> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue index e7baecbcde4..84c8a3464a5 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/ready_to_merge.vue @@ -249,12 +249,9 @@ export default { :class="mergeButtonClass" type="button" class="qa-merge-button" - @click="handleMergeButtonClick()"> - <i - v-if="isMakingRequest" - class="fa fa-spinner fa-spin" - aria-hidden="true" - ></i> + @click="handleMergeButtonClick();" + > + <i v-if="isMakingRequest" class="fa fa-spinner fa-spin" aria-hidden="true"></i> {{ mergeButtonText }} </button> <button @@ -263,26 +260,23 @@ export default { type="button" class="btn btn-sm btn-info dropdown-toggle js-merge-moment" data-toggle="dropdown" - aria-label="Select merge moment"> - <i - class="fa fa-chevron-down qa-merge-moment-dropdown" - aria-hidden="true" - ></i> + aria-label="Select merge moment" + > + <i class="fa fa-chevron-down qa-merge-moment-dropdown" aria-hidden="true"></i> </button> <ul v-if="shouldShowMergeOptionsDropdown" class="dropdown-menu dropdown-menu-right" - role="menu"> + role="menu" + > <li> <a class="merge_when_pipeline_succeeds qa-merge-when-pipeline-succeeds-option" href="#" - @click.prevent="handleMergeButtonClick(true)"> + @click.prevent="handleMergeButtonClick(true);" + > <span class="media"> - <span - class="merge-opt-icon" - aria-hidden="true" - v-html="successSvg"></span> + <span class="merge-opt-icon" aria-hidden="true" v-html="successSvg"></span> <span class="media-body merge-opt-title">Merge when pipeline succeeds</span> </span> </a> @@ -291,12 +285,10 @@ export default { <a class="accept-merge-request qa-merge-immediately-option" href="#" - @click.prevent="handleMergeButtonClick(false, true)"> + @click.prevent="handleMergeButtonClick(false, true);" + > <span class="media"> - <span - class="merge-opt-icon" - aria-hidden="true" - v-html="warningSvg"></span> + <span class="merge-opt-icon" aria-hidden="true" v-html="warningSvg"></span> <span class="media-body merge-opt-title">Merge immediately</span> </span> </a> @@ -311,18 +303,19 @@ export default { v-model="removeSourceBranch" :disabled="isRemoveSourceBranchButtonDisabled" class="js-remove-source-branch-checkbox" - type="checkbox"/> Remove source branch + type="checkbox" + /> + Remove source branch </label> <!-- Placeholder for EE extension of this component --> <squash-before-merge v-if="shouldShowSquashBeforeMerge" :mr="mr" - :is-merge-button-disabled="isMergeButtonDisabled" /> + :is-merge-button-disabled="isMergeButtonDisabled" + /> - <span - v-if="mr.ffOnlyEnabled" - class="js-fast-forward-message"> + <span v-if="mr.ffOnlyEnabled" class="js-fast-forward-message"> Fast-forward merge without a merge commit </span> <button @@ -330,7 +323,8 @@ export default { :disabled="isMergeButtonDisabled" class="js-modify-commit-message-button btn btn-default btn-sm" type="button" - @click="toggleCommitMessageEditor"> + @click="toggleCommitMessageEditor" + > Modify commit message </button> </template> @@ -341,15 +335,9 @@ export default { </template> </div> </div> - <div - v-if="showCommitMessageEditor" - class="prepend-top-default commit-message-editor"> + <div v-if="showCommitMessageEditor" class="prepend-top-default commit-message-editor"> <div class="form-group clearfix"> - <label - class="col-form-label" - for="commit-message"> - Commit message - </label> + <label class="col-form-label" for="commit-message"> Commit message </label> <div class="col-sm-10"> <div class="commit-message-container"> <div class="max-width-marker"></div> @@ -359,18 +347,14 @@ export default { class="form-control js-commit-message" required="required" rows="14" - name="Commit message"></textarea> + name="Commit message" + ></textarea> </div> <p class="hint"> Try to keep the first line under 52 characters and the others under 72 </p> <div class="hint"> - <a - href="#" - @click.prevent="updateCommitMessage" - > - {{ commitMessageLinkTitle }} - </a> + <a href="#" @click.prevent="updateCommitMessage"> {{ commitMessageLinkTitle }} </a> </div> </div> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue index 16c903c923f..8acca0d6481 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/sha_mismatch.vue @@ -11,14 +11,13 @@ export default { <template> <div class="mr-widget-body media"> - <status-icon - :show-disabled-button="true" - status="warning" - /> + <status-icon :show-disabled-button="true" status="warning" /> <div class="media-body space-children"> <span class="bold"> - {{ s__(`mrWidget|The source branch HEAD has recently changed. -Please reload the page and review the changes before merging`) }} + {{ + s__(`mrWidget|The source branch HEAD has recently changed. +Please reload the page and review the changes before merging`) + }} </span> </div> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue index 25ad329e196..e71acf0d7dd 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/squash_before_merge.vue @@ -55,9 +55,7 @@ export default { rel="noopener noreferrer nofollow" data-container="body" > - <icon - name="question-o" - /> + <icon name="question-o" /> </a> </div> </template> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/unresolved_discussions.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/unresolved_discussions.vue index 5eb2058a03b..a9fb40a4949 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/unresolved_discussions.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/unresolved_discussions.vue @@ -17,20 +17,17 @@ export default { <template> <div class="mr-widget-body media"> - <status-icon - :show-disabled-button="true" - status="warning" - /> + <status-icon :show-disabled-button="true" status="warning" /> <div class="media-body space-children"> <span class="bold"> - {{ s__("mrWidget|There are unresolved discussions. Please resolve these discussions") }} + {{ s__('mrWidget|There are unresolved discussions. Please resolve these discussions') }} </span> <a v-if="mr.createIssueToResolveDiscussionsPath" :href="mr.createIssueToResolveDiscussionsPath" class="btn btn-default btn-sm js-create-issue" > - {{ s__("mrWidget|Create an issue to resolve them later") }} + {{ s__('mrWidget|Create an issue to resolve them later') }} </a> </div> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue b/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue index 9129fcbb918..7c322388d30 100644 --- a/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue +++ b/app/assets/javascripts/vue_merge_request_widget/components/states/work_in_progress.vue @@ -43,10 +43,7 @@ export default { <template> <div class="mr-widget-body media"> - <status-icon - :show-disabled-button="Boolean(mr.removeWIPPath)" - status="warning" - /> + <status-icon :show-disabled-button="Boolean(mr.removeWIPPath)" status="warning" /> <div class="media-body space-children"> <span class="bold"> This is a Work in Progress @@ -56,7 +53,8 @@ export default { title="When this merge request is ready, remove the WIP: prefix from the title to allow it to be merged" aria-label="When this merge request is ready, - remove the WIP: prefix from the title to allow it to be merged"> + remove the WIP: prefix from the title to allow it to be merged" + > </i> </span> <button @@ -64,13 +62,10 @@ export default { :disabled="isMakingRequest" type="button" class="btn btn-default btn-sm js-remove-wip" - @click="removeWIP"> - <i - v-if="isMakingRequest" - class="fa fa-spinner fa-spin" - aria-hidden="true"> - </i> - Resolve WIP status + @click="removeWIP" + > + <i v-if="isMakingRequest" class="fa fa-spinner fa-spin" aria-hidden="true"> </i> Resolve WIP + status </button> </div> </div> diff --git a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue index 3b840540657..a269c0a4e87 100644 --- a/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue +++ b/app/assets/javascripts/vue_merge_request_widget/mr_widget_options.vue @@ -295,9 +295,7 @@ export default { </script> <template> <div class="mr-state-widget prepend-top-default"> - <mr-widget-header - :mr="mr" - /> + <mr-widget-header :mr="mr" /> <mr-widget-pipeline v-if="shouldRenderPipelines" :pipeline="mr.pipeline" @@ -322,17 +320,10 @@ export default { /> <div class="mr-widget-section"> - <component - :is="componentName" - :mr="mr" - :service="service" - /> + <component :is="componentName" :mr="mr" :service="service" /> - <section - v-if="mr.allowCollaboration" - class="mr-info-list mr-links" - > - {{ s__("mrWidget|Allows commits from members who can merge to the target branch") }} + <section v-if="mr.allowCollaboration" class="mr-info-list mr-links"> + {{ s__('mrWidget|Allows commits from members who can merge to the target branch') }} </section> <mr-widget-related-links @@ -341,16 +332,9 @@ export default { :related-links="mr.relatedLinks" /> - <source-branch-removal-status - v-if="shouldRenderSourceBranchRemovalStatus" - /> - </div> - <div - v-if="shouldRenderMergeHelp" - class="mr-widget-footer" - > - <mr-widget-merge-help /> + <source-branch-removal-status v-if="shouldRenderSourceBranchRemovalStatus" /> </div> + <div v-if="shouldRenderMergeHelp" class="mr-widget-footer"><mr-widget-merge-help /></div> </div> <template v-if="shouldRenderMergedPipeline"> diff --git a/app/assets/javascripts/vue_shared/components/bar_chart.vue b/app/assets/javascripts/vue_shared/components/bar_chart.vue index 690dd794ba4..4abf795f7bd 100644 --- a/app/assets/javascripts/vue_shared/components/bar_chart.vue +++ b/app/assets/javascripts/vue_shared/components/bar_chart.vue @@ -271,25 +271,17 @@ export default { }; </script> <template> - <div - ref="svgContainer" - :class="activateGrabCursor" - class="svg-graph-container" - > + <div ref="svgContainer" :class="activateGrabCursor" class="svg-graph-container"> <svg ref="baseSvg" :width="vpWidth" :height="vpHeight" :viewBox="svgViewBox" - :preserveAspectRatio="preserveAspectRatioType"> - <g - ref="xAxis" - :transform="xAxisLocation" - class="x-axis" - /> + :preserveAspectRatio="preserveAspectRatioType" + > + <g ref="xAxis" :transform="xAxisLocation" class="x-axis" /> <g v-if="!isLoading"> - <template - v-for="(data, index) in graphData"> + <template v-for="(data, index) in graphData"> <rect :key="index" v-tooltip @@ -301,43 +293,24 @@ export default { :title="setTooltipTitle(data)" class="bar-rect" data-placement="top" - @mouseover="barHoveredIn(index)" - @mouseout="barHoveredOut(index)" + @mouseover="barHoveredIn(index);" + @mouseout="barHoveredOut(index);" /> </template> </g> - <rect - :height="vbHeight + 100" - transform="translate(-100, -5)" - width="100" - fill="#fff" - /> + <rect :height="vbHeight + 100" transform="translate(-100, -5)" width="100" fill="#fff" /> <g class="y-axis-label"> - <line - :x1="0" - :x2="0" - :y1="0" - :y2="vbHeight" - transform="translate(-35, 0)" - stroke="black" - /> - <!--Get text length and change the height of this rect accordingly--> + <line :x1="0" :x2="0" :y1="0" :y2="vbHeight" transform="translate(-35, 0)" stroke="black" /> + <!-- Get text length and change the height of this rect accordingly --> <rect :height="rectYAxisLabelDims.height" :transform="yAxisLabelRectTransform" :width="30" fill="#fff" /> - <text - ref="yAxisLabel" - :transform="yAxisLabelTextTransform" - > - {{ yAxisLabel }} - </text> + <text ref="yAxisLabel" :transform="yAxisLabelTextTransform">{{ yAxisLabel }}</text> </g> - <g - class="y-axis" - /> + <g class="y-axis" /> <g v-if="showScrollIndicator"> <rect :height="vbHeight + 100" @@ -354,38 +327,24 @@ export default { class="animate-flicker" /> </g> - <!--The line that shows up when the data elements surpass the available width --> - <g - v-if="showScrollIndicator" - :transform="scrollIndicatorTransform"> - <rect - :height="vbHeight" - x="0" - y="0" - width="20" - fill="url(#shadow-gradient)" - /> + <!-- The line that shows up when the data elements surpass the available width --> + <g v-if="showScrollIndicator" :transform="scrollIndicatorTransform"> + <rect :height="vbHeight" x="0" y="0" width="20" fill="url(#shadow-gradient)" /> </g> - <!--Left scroll indicator--> - <g - v-if="showLeftScrollIndicator" - transform="translate(0, 0)"> - <rect - :height="vbHeight" - x="0" - y="0" - width="20" - fill="url(#left-shadow-gradient)" - /> + <!-- Left scroll indicator --> + <g v-if="showLeftScrollIndicator" transform="translate(0, 0)"> + <rect :height="vbHeight" x="0" y="0" width="20" fill="url(#left-shadow-gradient)" /> </g> <svg-gradient :colors="gradientColors" :opacity="gradientOpacity" - identifier-name="shadow-gradient"/> + identifier-name="shadow-gradient" + /> <svg-gradient :colors="inverseGradientColors" :opacity="inverseGradientOpacity" - identifier-name="left-shadow-gradient"/> + identifier-name="left-shadow-gradient" + /> </svg> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/callout.vue b/app/assets/javascripts/vue_shared/components/callout.vue index ccf802c456c..ddbb14ae812 100644 --- a/app/assets/javascripts/vue_shared/components/callout.vue +++ b/app/assets/javascripts/vue_shared/components/callout.vue @@ -17,11 +17,7 @@ export default { }; </script> <template> - <div - :class="`bs-callout bs-callout-${category}`" - role="alert" - aria-live="assertive" - > + <div :class="`bs-callout bs-callout-${category}`" role="alert" aria-live="assertive"> {{ message }} </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/changed_file_icon.vue b/app/assets/javascripts/vue_shared/components/changed_file_icon.vue index c5fbaf87b00..bb7710f708e 100644 --- a/app/assets/javascripts/vue_shared/components/changed_file_icon.vue +++ b/app/assets/javascripts/vue_shared/components/changed_file_icon.vue @@ -78,17 +78,8 @@ export default { </script> <template> - <span - v-gl-tooltip.right - :title="tooltipTitle" - class="file-changed-icon ml-auto" - > - <icon - v-if="showIcon" - :name="changedIcon" - :size="size" - :css-classes="changedIconClass" - /> + <span v-gl-tooltip.right :title="tooltipTitle" class="file-changed-icon ml-auto"> + <icon v-if="showIcon" :name="changedIcon" :size="size" :css-classes="changedIconClass" /> </span> </template> diff --git a/app/assets/javascripts/vue_shared/components/ci_icon.vue b/app/assets/javascripts/vue_shared/components/ci_icon.vue index 03f924ba99d..b8eb555106f 100644 --- a/app/assets/javascripts/vue_shared/components/ci_icon.vue +++ b/app/assets/javascripts/vue_shared/components/ci_icon.vue @@ -59,10 +59,5 @@ export default { }; </script> <template> - <span :class="cssClass"> - <icon - :name="icon" - :size="size" - /> - </span> + <span :class="cssClass"> <icon :name="icon" :size="size" /> </span> </template> diff --git a/app/assets/javascripts/vue_shared/components/commit.vue b/app/assets/javascripts/vue_shared/components/commit.vue index 420bd25b496..ee685a4b8cd 100644 --- a/app/assets/javascripts/vue_shared/components/commit.vue +++ b/app/assets/javascripts/vue_shared/components/commit.vue @@ -111,44 +111,19 @@ export default { <div class="branch-commit"> <template v-if="hasCommitRef && showBranch"> <div class="icon-container"> - <i - v-if="tag" - class="fa fa-tag" - aria-hidden="true" - > - </i> - <icon - v-if="!tag" - name="fork" - /> + <i v-if="tag" class="fa fa-tag" aria-hidden="true"> </i> <icon v-if="!tag" name="fork" /> </div> - <a - v-gl-tooltip - :href="commitRef.ref_url" - :title="commitRef.name" - class="ref-name" - > + <a v-gl-tooltip :href="commitRef.ref_url" :title="commitRef.name" class="ref-name"> {{ commitRef.name }} </a> </template> - <icon - name="commit" - class="commit-icon js-commit-icon" - /> + <icon name="commit" class="commit-icon js-commit-icon" /> - <a - :href="commitUrl" - class="commit-sha" - > - {{ shortSha }} - </a> + <a :href="commitUrl" class="commit-sha"> {{ shortSha }} </a> <div class="commit-title flex-truncate-parent"> - <span - v-if="title" - class="flex-truncate-child" - > + <span v-if="title" class="flex-truncate-child"> <user-avatar-link v-if="hasAuthor" :link-href="author.path" @@ -157,16 +132,9 @@ export default { :tooltip-text="author.username" class="avatar-image-container" /> - <a - :href="commitUrl" - class="commit-row-message" - > - {{ title }} - </a> - </span> - <span v-else> - Can't find HEAD commit for this branch + <a :href="commitUrl" class="commit-row-message"> {{ title }} </a> </span> + <span v-else> Can't find HEAD commit for this branch </span> </div> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/download_viewer.vue b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/download_viewer.vue index 97bdd9915c5..c6d61d6ee62 100644 --- a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/download_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/download_viewer.vue @@ -39,17 +39,8 @@ export default { ({{ fileSizeReadable }}) </template> </p> - <gl-link - :href="path" - class="btn btn-default" - rel="nofollow" - download - target="_blank"> - <icon - :size="16" - name="download" - css-classes="float-left append-right-8" - /> + <gl-link :href="path" class="btn btn-default" rel="nofollow" download target="_blank"> + <icon :size="16" name="download" css-classes="float-left append-right-8" /> {{ __('Download') }} </gl-link> </div> diff --git a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue index 6f2f0f98690..2ca933a37d2 100644 --- a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/image_viewer.vue @@ -34,14 +34,7 @@ export default { fileSizeReadable() { return numberToHumanSize(this.fileSize); }, - dimensionStyles() { - if (!this.isLoaded) return {}; - return { - width: `${this.width}px`, - height: `${this.height}px`, - }; - }, hasFileSize() { return this.fileSize > 0; }, @@ -87,22 +80,10 @@ export default { <template> <div> - <div - :class="innerCssClasses" - :style="dimensionStyles" - class="position-relative" - > - <img - ref="contentImg" - :src="path" - @load="onImgLoad" - /> - <slot name="image-overlay"></slot> + <div :class="innerCssClasses" class="position-relative"> + <img ref="contentImg" :src="path" @load="onImgLoad" /> <slot name="image-overlay"></slot> </div> - <p - v-if="renderInfo" - class="image-info" - > + <p v-if="renderInfo" class="image-info"> <template v-if="hasFileSize"> {{ fileSizeReadable }} </template> diff --git a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/markdown_viewer.vue b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/markdown_viewer.vue index a084cfdf612..c9915f7d685 100644 --- a/app/assets/javascripts/vue_shared/components/content_viewer/viewers/markdown_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/content_viewer/viewers/markdown_viewer.vue @@ -78,13 +78,8 @@ export default { </script> <template> - <div - ref="markdown-preview" - class="md md-previewer"> + <div ref="markdown-preview" class="md md-previewer"> <gl-skeleton-loading v-if="isLoading" /> - <div - v-else - v-html="previewContent"> - </div> + <div v-else v-html="previewContent"></div> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/deprecated_modal.vue b/app/assets/javascripts/vue_shared/components/deprecated_modal.vue index 4d63296e332..2129f90d497 100644 --- a/app/assets/javascripts/vue_shared/components/deprecated_modal.vue +++ b/app/assets/javascripts/vue_shared/components/deprecated_modal.vue @@ -84,67 +84,41 @@ export default { <template> <div class="modal-open"> - <div - :id="id" - :class="id ? '' : 'd-block'" - class="modal" - role="dialog" - tabindex="-1" - > - <div - :class="modalDialogClass" - class="modal-dialog" - role="document" - > + <div :id="id" :class="id ? '' : 'd-block'" class="modal" role="dialog" tabindex="-1"> + <div :class="modalDialogClass" class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <slot name="header"> - <h4 class="modal-title float-left"> - {{ title }} - </h4> + <h4 class="modal-title float-left">{{ title }}</h4> <button type="button" class="close float-right" data-dismiss="modal" aria-label="Close" - @click="emitCancel($event)" + @click="emitCancel($event);" > <span aria-hidden="true">×</span> </button> </slot> </div> <div class="modal-body"> - <slot - :text="text" - name="body" - > + <slot :text="text" name="body"> <p>{{ text }}</p> </slot> </div> - <div - v-if="!hideFooter" - class="modal-footer" - > + <div v-if="!hideFooter" class="modal-footer"> <button :class="btnCancelKindClass" type="button" class="btn" data-dismiss="modal" - @click="emitCancel($event)" + @click="emitCancel($event);" > {{ closeButtonLabel }} </button> - <slot - v-if="secondaryButtonLabel" - name="secondary-button" - > - <button - v-if="secondaryButtonLabel" - type="button" - class="btn" - data-dismiss="modal" - > + <slot v-if="secondaryButtonLabel" name="secondary-button"> + <button v-if="secondaryButtonLabel" type="button" class="btn" data-dismiss="modal"> {{ secondaryButtonLabel }} </button> </slot> @@ -156,7 +130,7 @@ export default { type="button" class="btn js-primary-button" data-dismiss="modal" - @click="emitSubmit($event)" + @click="emitSubmit($event);" > {{ primaryButtonLabel }} </button> @@ -164,10 +138,6 @@ export default { </div> </div> </div> - <div - v-if="!id" - class="modal-backdrop fade show" - > - </div> + <div v-if="!id" class="modal-backdrop fade show"></div> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue index 9c3f3e7f7a9..bb2e0e12c11 100644 --- a/app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/diff_viewer/diff_viewer.vue @@ -60,9 +60,7 @@ export default { </script> <template> - <div - v-if="viewer" - class="diff-file preview-container"> + <div v-if="viewer" class="diff-file preview-container"> <component :is="viewer" :diff-mode="diffMode" @@ -70,11 +68,7 @@ export default { :old-path="fullOldPath" :project-path="projectPath" > - <slot - slot="image-overlay" - name="image-overlay" - > - </slot> + <slot slot="image-overlay" name="image-overlay"> </slot> </component> <slot></slot> </div> diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/download_diff_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/download_diff_viewer.vue index 50389b6ae63..40ae9ed6c02 100644 --- a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/download_diff_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/download_diff_viewer.vue @@ -32,37 +32,19 @@ export default { <template> <div class="diff-file-container"> <div class="diff-viewer"> - <div - v-if="diffMode === $options.diffModes.replaced" - class="two-up view row"> + <div v-if="diffMode === $options.diffModes.replaced" class="two-up view row"> <div class="col-sm-6 deleted"> - <download-viewer - :path="oldPath" - :project-path="projectPath" - /> + <download-viewer :path="oldPath" :project-path="projectPath" /> </div> <div class="col-sm-6 added"> - <download-viewer - :path="newPath" - :project-path="projectPath" - /> + <download-viewer :path="newPath" :project-path="projectPath" /> </div> </div> - <div - v-else-if="diffMode === $options.diffModes.new" - class="added"> - <download-viewer - :path="newPath" - :project-path="projectPath" - /> + <div v-else-if="diffMode === $options.diffModes.new" class="added"> + <download-viewer :path="newPath" :project-path="projectPath" /> </div> - <div - v-else - class="deleted"> - <download-viewer - :path="oldPath" - :project-path="projectPath" - /> + <div v-else class="deleted"> + <download-viewer :path="oldPath" :project-path="projectPath" /> </div> </div> </div> diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/onion_skin_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/onion_skin_viewer.vue index cd0c1e850af..f085ef35ccc 100644 --- a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/onion_skin_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/onion_skin_viewer.vue @@ -100,17 +100,19 @@ export default { <div class="onion-skin view"> <div :style="{ - 'width': onionMaxPixelWidth, - 'height': onionMaxPixelHeight, + width: onionMaxPixelWidth, + height: onionMaxPixelHeight, 'user-select': dragging === true ? 'none' : '', }" - class="onion-skin-frame"> + class="onion-skin-frame" + > <div :style="{ - 'width': onionMaxPixelWidth, - 'height': onionMaxPixelHeight, + width: onionMaxPixelWidth, + height: onionMaxPixelHeight, }" - class="frame deleted"> + class="frame deleted" + > <image-viewer key="onionOldImg" :render-info="false" @@ -121,36 +123,25 @@ export default { <div ref="addedFrame" :style="{ - 'opacity': onionOpacity, - 'width': onionMaxPixelWidth, - 'height': onionMaxPixelHeight, + opacity: onionOpacity, + width: onionMaxPixelWidth, + height: onionMaxPixelHeight, }" - class="added frame"> + class="added frame" + > <image-viewer key="onionNewImg" :render-info="false" :path="newPath" @imgLoaded="onionNewImgLoaded" > - <slot - slot="image-overlay" - name="image-overlay" - > - </slot> + <slot slot="image-overlay" name="image-overlay"> </slot> </image-viewer> </div> <div class="controls"> <div class="transparent"></div> - <div - ref="dragTrack" - class="drag-track" - @mousedown="startDrag" - @mouseup="stopDrag"> - <div - ref="dragger" - :style="{ 'left': onionDraggerPixelPos }" - class="dragger"> - </div> + <div ref="dragTrack" class="drag-track" @mousedown="startDrag" @mouseup="stopDrag"> + <div ref="dragger" :style="{ left: onionDraggerPixelPos }" class="dragger"></div> </div> <div class="opaque"></div> </div> diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/swipe_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/swipe_viewer.vue index c3cfe54eb4d..1c970b72a66 100644 --- a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/swipe_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/swipe_viewer.vue @@ -25,7 +25,7 @@ export default { swipeMaxWidth: undefined, swipeMaxHeight: undefined, swipeBarPos: 1, - swipeWrapWidth: undefined, + swipeWrapWidth: 0, }; }, computed: { @@ -63,7 +63,7 @@ export default { leftValue = clientWidth - spaceLeft; } - this.swipeWrapWidth = this.swipeMaxWidth - leftValue; + this.swipeWrapWidth = (leftValue / clientWidth) * 100; this.swipeBarPos = leftValue; }, startDrag() { @@ -81,7 +81,6 @@ export default { // Add 2 for border width this.swipeMaxWidth = Math.max(this.swipeOldImgInfo.renderedWidth, this.swipeNewImgInfo.renderedWidth) + 2; - this.swipeWrapWidth = this.swipeMaxWidth; this.swipeMaxHeight = Math.max(this.swipeOldImgInfo.renderedHeight, this.swipeNewImgInfo.renderedHeight) + 2; @@ -105,13 +104,7 @@ export default { <template> <div class="swipe view"> - <div - ref="swipeFrame" - :style="{ - 'width': swipeMaxPixelWidth, - 'height': swipeMaxPixelHeight, - }" - class="swipe-frame"> + <div ref="swipeFrame" class="swipe-frame"> <image-viewer key="swipeOldImg" ref="swipeOldImg" @@ -123,32 +116,31 @@ export default { <div ref="swipeWrap" :style="{ - 'width': swipeWrapPixelWidth, - 'height': swipeMaxPixelHeight, + width: `${swipeWrapWidth}%`, }" - class="swipe-wrap"> + class="swipe-wrap" + > <image-viewer key="swipeNewImg" :render-info="false" :path="newPath" + :style="{ + width: swipeMaxPixelWidth, + }" class="frame added" @imgLoaded="swipeNewImgLoaded" > - <slot - slot="image-overlay" - name="image-overlay" - > - </slot> + <slot slot="image-overlay" name="image-overlay"> </slot> </image-viewer> </div> <span ref="swipeBar" - :style="{ 'left': swipeBarPixelPos }" + :style="{ left: swipeBarPixelPos }" class="swipe-bar" @mousedown="startDrag" - @mouseup="stopDrag"> - <span class="top-handle"></span> - <span class="bottom-handle"></span> + @mouseup="stopDrag" + > + <span class="top-handle"></span> <span class="bottom-handle"></span> </span> </div> </div> diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/two_up_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/two_up_viewer.vue index 9806d65e940..a17fc022195 100644 --- a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/two_up_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff/two_up_viewer.vue @@ -19,24 +19,20 @@ export default { </script> <template> - <div class="two-up view"> + <div class="two-up view d-flex"> <image-viewer :path="oldPath" :render-info="true" inner-css-classes="frame deleted" - class="wrap" + class="wrap w-50" /> <image-viewer :path="newPath" :render-info="true" :inner-css-classes="['frame', 'added']" - class="wrap" + class="wrap w-50" > - <slot - slot="image-overlay" - name="image-overlay" - > - </slot> + <slot slot="image-overlay" name="image-overlay"> </slot> </image-viewer> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue index d7f24c1afc5..d5fda7e4ed3 100644 --- a/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue +++ b/app/assets/javascripts/vue_shared/components/diff_viewer/viewers/image_diff_viewer.vue @@ -63,65 +63,54 @@ export default { <template> <div class="diff-file-container"> - <div - v-if="diffMode === $options.diffModes.replaced" - class="diff-viewer"> + <div v-if="diffMode === $options.diffModes.replaced" class="diff-viewer"> <div class="image js-replaced-image"> - <component - :is="imageViewComponent" - v-bind="$props" - > - <slot - slot="image-overlay" - name="image-overlay" - > - </slot> + <component :is="imageViewComponent" v-bind="$props"> + <slot slot="image-overlay" name="image-overlay"> </slot> </component> </div> <div class="view-modes"> <ul class="view-modes-menu"> <li :class="{ - active: mode === $options.imageViewMode.twoup + active: mode === $options.imageViewMode.twoup, }" - @click="changeMode($options.imageViewMode.twoup)"> + @click="changeMode($options.imageViewMode.twoup);" + > {{ s__('ImageDiffViewer|2-up') }} </li> <li :class="{ - active: mode === $options.imageViewMode.swipe + active: mode === $options.imageViewMode.swipe, }" - @click="changeMode($options.imageViewMode.swipe)"> + @click="changeMode($options.imageViewMode.swipe);" + > {{ s__('ImageDiffViewer|Swipe') }} </li> <li :class="{ - active: mode === $options.imageViewMode.onion + active: mode === $options.imageViewMode.onion, }" - @click="changeMode($options.imageViewMode.onion)"> + @click="changeMode($options.imageViewMode.onion);" + > {{ s__('ImageDiffViewer|Onion skin') }} </li> </ul> </div> </div> - <div - v-else - class="diff-viewer" - > + <div v-else class="diff-viewer"> <div class="image"> <image-viewer :path="imagePath" - :inner-css-classes="['frame', { - 'added': isNew, - 'deleted': diffMode === $options.diffModes.deleted - }]" + :inner-css-classes="[ + 'frame', + { + added: isNew, + deleted: diffMode === $options.diffModes.deleted, + }, + ]" > - <slot - v-if="isNew || isRenamed" - slot="image-overlay" - name="image-overlay" - > - </slot> + <slot v-if="isNew || isRenamed" slot="image-overlay" name="image-overlay"> </slot> </image-viewer> </div> </div> diff --git a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_button.vue b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_button.vue index 0f4effda79f..22f370c4bca 100644 --- a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_button.vue +++ b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_button.vue @@ -34,30 +34,13 @@ export default { data-toggle="dropdown" aria-expanded="false" > - <gl-loading-icon - v-show="isLoading" - :inline="true" - /> + <gl-loading-icon v-show="isLoading" :inline="true" /> <template> - <slot - v-if="$slots.default" - ></slot> - <span - v-else - class="dropdown-toggle-text" - > - {{ toggleText }} - </span> + <slot v-if="$slots.default"></slot> + <span v-else class="dropdown-toggle-text"> {{ toggleText }} </span> </template> - <span - v-show="!isLoading" - class="dropdown-toggle-icon" - > - <i - class="fa fa-chevron-down" - aria-hidden="true" - data-hidden="true" - ></i> + <span v-show="!isLoading" class="dropdown-toggle-icon"> + <i class="fa fa-chevron-down" aria-hidden="true" data-hidden="true"></i> </span> </button> </template> diff --git a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_hidden_input.vue b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_hidden_input.vue index b7a4613bdd2..afde0c81580 100644 --- a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_hidden_input.vue +++ b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_hidden_input.vue @@ -14,9 +14,5 @@ export default { </script> <template> - <input - :name="name" - :value="value" - type="hidden" - /> + <input :name="name" :value="value" type="hidden" /> </template> diff --git a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_search_input.vue b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_search_input.vue index 7f1912f6405..c01c7cc4ccc 100644 --- a/app/assets/javascripts/vue_shared/components/dropdown/dropdown_search_input.vue +++ b/app/assets/javascripts/vue_shared/components/dropdown/dropdown_search_input.vue @@ -29,12 +29,7 @@ export default { type="search" autocomplete="off" /> - <i - class="fa fa-search dropdown-input-search" - aria-hidden="true" - data-hidden="true" - > - </i> + <i class="fa fa-search dropdown-input-search" aria-hidden="true" data-hidden="true"> </i> <i class="fa fa-times dropdown-input-clear js-dropdown-input-clear" aria-hidden="true" diff --git a/app/assets/javascripts/vue_shared/components/expand_button.vue b/app/assets/javascripts/vue_shared/components/expand_button.vue index e6e92594b65..d64ab774431 100644 --- a/app/assets/javascripts/vue_shared/components/expand_button.vue +++ b/app/assets/javascripts/vue_shared/components/expand_button.vue @@ -44,14 +44,10 @@ export default { :aria-label="ariaLabel" type="button" class="text-expander btn-blank" - @click="onClick"> - <icon - :size="12" - name="ellipsis_h" - /> + @click="onClick" + > + <icon :size="12" name="ellipsis_h" /> </button> - <span v-if="!isCollapsed"> - <slot name="expanded"></slot> - </span> + <span v-if="!isCollapsed"> <slot name="expanded"></slot> </span> </span> </template> diff --git a/app/assets/javascripts/vue_shared/components/file_icon.vue b/app/assets/javascripts/vue_shared/components/file_icon.vue index 545be568ad3..b69ecc1dce6 100644 --- a/app/assets/javascripts/vue_shared/components/file_icon.vue +++ b/app/assets/javascripts/vue_shared/components/file_icon.vue @@ -72,21 +72,10 @@ export default { </script> <template> <span> - <svg - v-if="!loading && !folder" - :class="[iconSizeClass, cssClasses]" - > - <use v-bind="{ 'xlink:href':spriteHref }" /> + <svg v-if="!loading && !folder" :class="[iconSizeClass, cssClasses]"> + <use v-bind="{ 'xlink:href': spriteHref }" /> </svg> - <icon - v-if="!loading && folder" - :name="folderIconName" - :size="size" - css-classes="folder-icon" - /> - <gl-loading-icon - v-if="loading" - :inline="true" - /> + <icon v-if="!loading && folder" :name="folderIconName" :size="size" css-classes="folder-icon" /> + <gl-loading-icon v-if="loading" :inline="true" /> </span> </template> diff --git a/app/assets/javascripts/vue_shared/components/file_row.vue b/app/assets/javascripts/vue_shared/components/file_row.vue index 2d89a156117..9e713673678 100644 --- a/app/assets/javascripts/vue_shared/components/file_row.vue +++ b/app/assets/javascripts/vue_shared/components/file_row.vue @@ -161,17 +161,11 @@ export default { class="file-row" role="button" @click="clickFile" - @mouseover="toggleHover(true)" - @mouseout="toggleHover(false)" + @mouseover="toggleHover(true);" + @mouseout="toggleHover(false);" > - <div - class="file-row-name-container" - > - <span - ref="textOutput" - :style="levelIndentation" - class="file-row-name str-truncated" - > + <div class="file-row-name-container"> + <span ref="textOutput" :style="levelIndentation" class="file-row-name str-truncated"> <file-icon v-if="!showChangedIcon || file.type === 'tree'" :file-name="file.name" @@ -180,12 +174,7 @@ export default { :opened="file.opened" :size="16" /> - <changed-file-icon - v-else - :file="file" - :size="16" - class="append-right-5" - /> + <changed-file-icon v-else :file="file" :size="16" class="append-right-5" /> {{ outputText }} </span> <component diff --git a/app/assets/javascripts/vue_shared/components/filtered_search_dropdown.vue b/app/assets/javascripts/vue_shared/components/filtered_search_dropdown.vue index 388a2f4ca36..834c39a5ee0 100644 --- a/app/assets/javascripts/vue_shared/components/filtered_search_dropdown.vue +++ b/app/assets/javascripts/vue_shared/components/filtered_search_dropdown.vue @@ -82,16 +82,8 @@ export default { <template> <div class="dropdown"> <div class="btn-group"> - <slot - name="mainAction" - :class-name="className" - > - <button - type="button" - :class="className" - > - {{ title }} - </button> + <slot name="mainAction" :class-name="className"> + <button type="button" :class="className">{{ title }}</button> </slot> <button @@ -103,10 +95,7 @@ export default { aria-expanded="false" aria-label="Expand dropdown" > - <icon - name="angle-down" - :size="12" - /> + <icon name="angle-down" :size="12" /> </button> <div class="dropdown-menu dropdown-menu-right"> <div class="dropdown-input"> @@ -117,25 +106,13 @@ export default { placeholder="Filter" class="js-filtered-dropdown-input dropdown-input-field" /> - <icon - class="dropdown-input-search" - name="search" - /> + <icon class="dropdown-input-search" name="search" /> </div> <div class="dropdown-content"> <ul> - <li - v-for="(result, i) in filteredResults" - :key="i" - class="js-filtered-dropdown-result" - > - <slot - name="result" - :result="result" - > - {{ result[filterKey] }} - </slot> + <li v-for="(result, i) in filteredResults" :key="i" class="js-filtered-dropdown-result"> + <slot name="result" :result="result"> {{ result[filterKey] }} </slot> </li> </ul> </div> diff --git a/app/assets/javascripts/vue_shared/components/gl_countdown.vue b/app/assets/javascripts/vue_shared/components/gl_countdown.vue index 97f7998f461..c1aace31fb2 100644 --- a/app/assets/javascripts/vue_shared/components/gl_countdown.vue +++ b/app/assets/javascripts/vue_shared/components/gl_countdown.vue @@ -43,11 +43,5 @@ export default { </script> <template> - <time - v-gl-tooltip - :datetime="endDateString" - :title="endDateString" - > - {{ remainingTime }} - </time> + <time v-gl-tooltip :datetime="endDateString" :title="endDateString"> {{ remainingTime }} </time> </template> diff --git a/app/assets/javascripts/vue_shared/components/gl_modal.vue b/app/assets/javascripts/vue_shared/components/gl_modal.vue index b5444d43ded..faf4181bbaf 100644 --- a/app/assets/javascripts/vue_shared/components/gl_modal.vue +++ b/app/assets/javascripts/vue_shared/components/gl_modal.vue @@ -68,40 +68,27 @@ export default { </script> <template> - <div - :id="id" - class="modal fade" - tabindex="-1" - role="dialog" - > - <div - :class="modalSizeClass" - class="modal-dialog" - role="document" - > + <div :id="id" class="modal fade" tabindex="-1" role="dialog"> + <div :class="modalSizeClass" class="modal-dialog" role="document"> <div class="modal-content"> <div class="modal-header"> <slot name="header"> <h4 class="modal-title"> - <slot name="title"> - {{ headerTitleText }} - </slot> + <slot name="title"> {{ headerTitleText }} </slot> </h4> <button :aria-label="s__('Modal|Close')" type="button" class="close js-modal-close-action" data-dismiss="modal" - @click="emitCancel($event)" + @click="emitCancel($event);" > <span aria-hidden="true">×</span> </button> </slot> </div> - <div class="modal-body"> - <slot></slot> - </div> + <div class="modal-body"><slot></slot></div> <div class="modal-footer"> <slot name="footer"> @@ -109,7 +96,7 @@ export default { type="button" class="btn js-modal-cancel-action qa-modal-cancel-button" data-dismiss="modal" - @click="emitCancel($event)" + @click="emitCancel($event);" > {{ s__('Modal|Cancel') }} </button> @@ -118,7 +105,7 @@ export default { type="button" class="btn js-modal-primary-action qa-modal-primary-button" data-dismiss="modal" - @click="emitSubmit($event)" + @click="emitSubmit($event);" > {{ footerPrimaryButtonText }} </button> diff --git a/app/assets/javascripts/vue_shared/components/header_ci_component.vue b/app/assets/javascripts/vue_shared/components/header_ci_component.vue index 1a91a8b81e3..c830f5b49b6 100644 --- a/app/assets/javascripts/vue_shared/components/header_ci_component.vue +++ b/app/assets/javascripts/vue_shared/components/header_ci_component.vue @@ -83,12 +83,9 @@ export default { <template> <header class="page-content-header ci-header-container"> <section class="header-main-content"> - <ci-icon-badge :status="status" /> - <strong> - {{ itemName }} #{{ itemId }} - </strong> + <strong> {{ itemName }} #{{ itemId }} </strong> <template v-if="shouldRenderTriggeredLabel"> triggered @@ -108,7 +105,6 @@ export default { :title="user.email" class="js-user-link commit-committer-link" > - <user-avatar-image :img-src="user.avatar_url" :img-alt="userAvatarAltText" @@ -118,19 +114,12 @@ export default { {{ user.name }} </gl-link> - <span - v-if="user.status_tooltip_html" - v-html="user.status_tooltip_html"></span> + <span v-if="user.status_tooltip_html" v-html="user.status_tooltip_html"></span> </template> </section> - <section - v-if="actions.length" - class="header-action-buttons" - > - <template - v-for="(action, i) in actions" - > + <section v-if="actions.length" class="header-action-buttons"> + <template v-for="(action, i) in actions"> <gl-link v-if="action.type === 'link'" :key="i" @@ -159,7 +148,7 @@ export default { :class="action.cssClass" container-class="d-inline" :label="action.label" - @click="onClickAction(action)" + @click="onClickAction(action);" /> </template> </section> @@ -170,12 +159,7 @@ export default { sidebar-toggle-btn js-sidebar-build-toggle js-sidebar-build-toggle-header" @click="onClickSidebarButton" > - <i - class="fa fa-angle-double-left" - aria-hidden="true" - aria-labelledby="toggleSidebar" - > - </i> + <i class="fa fa-angle-double-left" aria-hidden="true" aria-labelledby="toggleSidebar"> </i> </gl-button> </header> </template> diff --git a/app/assets/javascripts/vue_shared/components/help_popover.vue b/app/assets/javascripts/vue_shared/components/help_popover.vue index 540df392e4e..a57fa09f753 100644 --- a/app/assets/javascripts/vue_shared/components/help_popover.vue +++ b/app/assets/javascripts/vue_shared/components/help_popover.vue @@ -43,11 +43,7 @@ export default { }; </script> <template> - <button - type="button" - class="btn btn-blank btn-transparent btn-help" - tabindex="0" - > + <button type="button" class="btn btn-blank btn-transparent btn-help" tabindex="0"> <icon name="question" /> </button> </template> diff --git a/app/assets/javascripts/vue_shared/components/icon.vue b/app/assets/javascripts/vue_shared/components/icon.vue index a25841fc02f..41c4c861566 100644 --- a/app/assets/javascripts/vue_shared/components/icon.vue +++ b/app/assets/javascripts/vue_shared/components/icon.vue @@ -106,6 +106,6 @@ export default { :tabindex="tabIndex" aria-hidden="true" > - <use v-bind="{ 'xlink:href':spriteHref }"/> + <use v-bind="{ 'xlink:href': spriteHref }" /> </svg> </template> diff --git a/app/assets/javascripts/vue_shared/components/identicon.vue b/app/assets/javascripts/vue_shared/components/identicon.vue index 0862f2c0cff..d42f0d8192c 100644 --- a/app/assets/javascripts/vue_shared/components/identicon.vue +++ b/app/assets/javascripts/vue_shared/components/identicon.vue @@ -29,9 +29,7 @@ export default { </script> <template> - <div - :class="[sizeClass, identiconBackgroundClass]" - class="avatar identicon"> + <div :class="[sizeClass, identiconBackgroundClass]" class="avatar identicon"> {{ identiconTitle }} </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue b/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue index dc88749c18f..e92babc499b 100644 --- a/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue +++ b/app/assets/javascripts/vue_shared/components/issue/issue_warning.vue @@ -32,17 +32,14 @@ export default { </script> <template> <div class="issuable-note-warning"> - <icon - v-if="!isLockedAndConfidential" - :name="warningIcon" - :size="16" - class="icon inline" - /> + <icon v-if="!isLockedAndConfidential" :name="warningIcon" :size="16" class="icon inline" /> <span v-if="isLockedAndConfidential"> {{ __('This issue is confidential and locked.') }} - {{ __(`People without permission will never -get a notification and won't be able to comment.`) }} + {{ + __(`People without permission will never +get a notification and won't be able to comment.`) + }} </span> <span v-else-if="isConfidential"> @@ -51,8 +48,7 @@ get a notification and won't be able to comment.`) }} </span> <span v-else-if="isLocked"> - {{ __('This issue is locked.') }} - {{ __('Only project members can comment.') }} + {{ __('This issue is locked.') }} {{ __('Only project members can comment.') }} </span> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/loading_button.vue b/app/assets/javascripts/vue_shared/components/loading_button.vue index 9bae8a32a8c..7a53d053eec 100644 --- a/app/assets/javascripts/vue_shared/components/loading_button.vue +++ b/app/assets/javascripts/vue_shared/components/loading_button.vue @@ -52,30 +52,20 @@ export default { </script> <template> - <button - :class="containerClass" - :disabled="loading || disabled" - type="button" - @click="onClick" - > + <button :class="containerClass" :disabled="loading || disabled" type="button" @click="onClick"> <transition name="fade"> <gl-loading-icon v-if="loading" :inline="true" :class="{ - 'append-right-5': label + 'append-right-5': label, }" class="js-loading-button-icon" /> </transition> <transition name="fade"> <slot> - <span - v-if="label" - class="js-loading-button-label" - > - {{ label }} - </span> + <span v-if="label" class="js-loading-button-label"> {{ label }} </span> </slot> </transition> </button> diff --git a/app/assets/javascripts/vue_shared/components/markdown/field.vue b/app/assets/javascripts/vue_shared/components/markdown/field.vue index 4687de62614..21d6519191f 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/field.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/field.vue @@ -142,27 +142,18 @@ export default { <div ref="gl-form" :class="{ 'prepend-top-default append-bottom-default': addSpacingClasses }" - class="md-area js-vue-markdown-field"> + class="md-area js-vue-markdown-field" + > <markdown-header :preview-markdown="previewMarkdown" @preview-markdown="showPreviewTab" @write-markdown="showWriteTab" /> - <div - v-show="!previewMarkdown" - class="md-write-holder" - > + <div v-show="!previewMarkdown" class="md-write-holder"> <div class="zen-backdrop"> <slot name="textarea"></slot> - <a - class="zen-control zen-control-leave js-zen-leave" - href="#" - aria-label="Enter zen mode" - > - <icon - :size="32" - name="screen-normal" - /> + <a class="zen-control zen-control-leave js-zen-leave" href="#" aria-label="Enter zen mode"> + <icon :size="32" name="screen-normal" /> </a> <markdown-toolbar :markdown-docs-path="markdownDocsPath" @@ -171,42 +162,19 @@ export default { /> </div> </div> - <div - v-show="previewMarkdown" - class="md md-preview-holder md-preview js-vue-md-preview" - > - <div - ref="markdown-preview" - v-html="markdownPreview" - > - </div> - <span v-if="markdownPreviewLoading"> - Loading... - </span> + <div v-show="previewMarkdown" class="md md-preview-holder md-preview js-vue-md-preview"> + <div ref="markdown-preview" v-html="markdownPreview"></div> + <span v-if="markdownPreviewLoading"> Loading... </span> </div> <template v-if="previewMarkdown && !markdownPreviewLoading"> - <div - v-if="referencedCommands" - class="referenced-commands" - v-html="referencedCommands" - > - </div> - <div - v-if="shouldShowReferencedUsers" - class="referenced-users" - > + <div v-if="referencedCommands" class="referenced-commands" v-html="referencedCommands"></div> + <div v-if="shouldShowReferencedUsers" class="referenced-users"> <span> - <i - class="fa fa-exclamation-triangle" - aria-hidden="true" - > - </i> - You are about to add + <i class="fa fa-exclamation-triangle" aria-hidden="true"> </i> You are about to add <strong> - <span class="js-referenced-users-count"> - {{ referencedUsers.length }} - </span> - </strong> people to the discussion. Proceed with caution. + <span class="js-referenced-users-count"> {{ referencedUsers.length }} </span> + </strong> + people to the discussion. Proceed with caution. </span> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/markdown/header.vue b/app/assets/javascripts/vue_shared/components/markdown/header.vue index ca9e57a9b00..4c4ba537065 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/header.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/header.vue @@ -64,58 +64,31 @@ export default { <template> <div class="md-header"> <ul class="nav-links clearfix"> - <li - :class="{ active: !previewMarkdown }" - class="md-header-tab" - > + <li :class="{ active: !previewMarkdown }" class="md-header-tab"> <button class="js-write-link" tabindex="-1" type="button" - @click="writeMarkdownTab($event)" + @click="writeMarkdownTab($event);" > Write </button> </li> - <li - :class="{ active: previewMarkdown }" - class="md-header-tab" - > + <li :class="{ active: previewMarkdown }" class="md-header-tab"> <button class="js-preview-link js-md-preview-button" tabindex="-1" type="button" - @click="previewMarkdownTab($event)" + @click="previewMarkdownTab($event);" > Preview </button> </li> - <li - :class="{ active: !previewMarkdown }" - class="md-header-toolbar" - > - <toolbar-button - tag="**" - button-title="Add bold text" - icon="bold" - /> - <toolbar-button - tag="*" - button-title="Add italic text" - icon="italic" - /> - <toolbar-button - :prepend="true" - tag="> " - button-title="Insert a quote" - icon="quote" - /> - <toolbar-button - tag="`" - tag-block="```" - button-title="Insert code" - icon="code" - /> + <li :class="{ active: !previewMarkdown }" class="md-header-toolbar"> + <toolbar-button tag="**" button-title="Add bold text" icon="bold" /> + <toolbar-button tag="*" button-title="Add italic text" icon="italic" /> + <toolbar-button :prepend="true" tag="> " button-title="Insert a quote" icon="quote" /> + <toolbar-button tag="`" tag-block="```" button-title="Insert code" icon="code" /> <toolbar-button tag="[{text}](url)" tag-select="url" @@ -155,9 +128,7 @@ export default { title="Go full screen" type="button" > - <icon - name="screen-full" - /> + <icon name="screen-full" /> </button> </li> </ul> diff --git a/app/assets/javascripts/vue_shared/components/markdown/toolbar.vue b/app/assets/javascripts/vue_shared/components/markdown/toolbar.vue index 3cb48023002..3b57b5e8da4 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/toolbar.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/toolbar.vue @@ -33,92 +33,39 @@ export default { <div class="comment-toolbar clearfix"> <div class="toolbar-text"> <template v-if="!hasQuickActionsDocsPath && markdownDocsPath"> - <gl-link - :href="markdownDocsPath" - target="_blank" - tabindex="-1" - > + <gl-link :href="markdownDocsPath" target="_blank" tabindex="-1"> Markdown is supported </gl-link> </template> <template v-if="hasQuickActionsDocsPath && markdownDocsPath"> - <gl-link - :href="markdownDocsPath" - target="_blank" - tabindex="-1" - > - Markdown - </gl-link> + <gl-link :href="markdownDocsPath" target="_blank" tabindex="-1"> Markdown </gl-link> and - <gl-link - :href="quickActionsDocsPath" - target="_blank" - tabindex="-1" - > + <gl-link :href="quickActionsDocsPath" target="_blank" tabindex="-1"> quick actions </gl-link> are supported </template> </div> - <span - v-if="canAttachFile" - class="uploading-container" - > + <span v-if="canAttachFile" class="uploading-container"> <span class="uploading-progress-container hide"> - <i - class="fa fa-file-image-o toolbar-button-icon" - aria-hidden="true" - > - </i> - <span class="attaching-file-message"></span> - <span class="uploading-progress">0%</span> + <i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"> </i> + <span class="attaching-file-message"></span> <span class="uploading-progress">0%</span> <span class="uploading-spinner"> - <i - class="fa fa-spinner fa-spin toolbar-button-icon" - aria-hidden="true" - > - </i> + <i class="fa fa-spinner fa-spin toolbar-button-icon" aria-hidden="true"> </i> </span> </span> <span class="uploading-error-container hide"> <span class="uploading-error-icon"> - <i - class="fa fa-file-image-o toolbar-button-icon" - aria-hidden="true" - > - </i> + <i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"> </i> </span> <span class="uploading-error-message"></span> - <button - class="retry-uploading-link" - type="button" - > - Try again - </button> - or - <button - class="attach-new-file markdown-selector" - type="button" - > - attach a new file - </button> + <button class="retry-uploading-link" type="button">Try again</button> or + <button class="attach-new-file markdown-selector" type="button">attach a new file</button> </span> - <button - class="markdown-selector button-attach-file" - tabindex="-1" - type="button" - > - <i - class="fa fa-file-image-o toolbar-button-icon" - aria-hidden="true" - > - </i> - Attach a file + <button class="markdown-selector button-attach-file" tabindex="-1" type="button"> + <i class="fa fa-file-image-o toolbar-button-icon" aria-hidden="true"> </i> Attach a file </button> - <button - class="btn btn-default btn-sm hide button-cancel-uploading-files" - type="button" - > + <button class="btn btn-default btn-sm hide button-cancel-uploading-files" type="button"> Cancel </button> </span> diff --git a/app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue b/app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue index 13af4b627de..a6d2cecdf7e 100644 --- a/app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue +++ b/app/assets/javascripts/vue_shared/components/markdown/toolbar_button.vue @@ -55,8 +55,6 @@ export default { tabindex="-1" data-container="body" > - <icon - :name="icon" - /> + <icon :name="icon" /> </button> </template> diff --git a/app/assets/javascripts/vue_shared/components/memory_graph.vue b/app/assets/javascripts/vue_shared/components/memory_graph.vue index 964dedb38c4..16f4ff068f6 100644 --- a/app/assets/javascripts/vue_shared/components/memory_graph.vue +++ b/app/assets/javascripts/vue_shared/components/memory_graph.vue @@ -118,17 +118,10 @@ export default { :width="width" :height="height" class="has-tooltip" - xmlns="http://www.w3.org/2000/svg"> - <path - :d="pathD" - :viewBox="pathViewBox" - /> - <circle - :cx="dotX" - :cy="dotY" - r="1.5" - transform="translate(0 -1)" - /> + xmlns="http://www.w3.org/2000/svg" + > + <path :d="pathD" :viewBox="pathViewBox" /> + <circle :cx="dotX" :cy="dotY" r="1.5" transform="translate(0 -1)" /> </svg> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/navigation_tabs.vue b/app/assets/javascripts/vue_shared/components/navigation_tabs.vue index 99d61b5639d..09a64502819 100644 --- a/app/assets/javascripts/vue_shared/components/navigation_tabs.vue +++ b/app/assets/javascripts/vue_shared/components/navigation_tabs.vue @@ -58,19 +58,10 @@ export default { active: tab.isActive, }" > - <a - :class="`js-${scope}-tab-${tab.scope}`" - role="button" - @click="onTabClick(tab)" - > + <a :class="`js-${scope}-tab-${tab.scope}`" role="button" @click="onTabClick(tab);"> {{ tab.name }} - <span - v-if="shouldRenderBadge(tab.count)" - class="badge badge-pill" - > - {{ tab.count }} - </span> + <span v-if="shouldRenderBadge(tab.count)" class="badge badge-pill"> {{ tab.count }} </span> </a> </li> </ul> diff --git a/app/assets/javascripts/vue_shared/components/notes/placeholder_note.vue b/app/assets/javascripts/vue_shared/components/notes/placeholder_note.vue index dcad79e521d..b1faebf409b 100644 --- a/app/assets/javascripts/vue_shared/components/notes/placeholder_note.vue +++ b/app/assets/javascripts/vue_shared/components/notes/placeholder_note.vue @@ -46,9 +46,7 @@ export default { :img-size="40" /> </div> - <div - :class="{ discussion: !note.individual_note }" - class="timeline-content"> + <div :class="{ discussion: !note.individual_note }" class="timeline-content"> <div class="note-header"> <div class="note-header-info"> <a :href="getUserData.path"> diff --git a/app/assets/javascripts/vue_shared/components/notes/skeleton_note.vue b/app/assets/javascripts/vue_shared/components/notes/skeleton_note.vue index 2dcd161b4fb..c6cf4661222 100644 --- a/app/assets/javascripts/vue_shared/components/notes/skeleton_note.vue +++ b/app/assets/javascripts/vue_shared/components/notes/skeleton_note.vue @@ -12,13 +12,10 @@ export default { <template> <li class="timeline-entry note note-wrapper"> <div class="timeline-entry-inner"> - <div class="timeline-icon"> - </div> + <div class="timeline-icon"></div> <div class="timeline-content"> <div class="note-header"></div> - <div class="note-body"> - <gl-skeleton-loading /> - </div> + <div class="note-body"><gl-skeleton-loading /></div> </div> </div> </li> diff --git a/app/assets/javascripts/vue_shared/components/notes/system_note.vue b/app/assets/javascripts/vue_shared/components/notes/system_note.vue index 6a44e6a29ed..fb86262d0b4 100644 --- a/app/assets/javascripts/vue_shared/components/notes/system_note.vue +++ b/app/assets/javascripts/vue_shared/components/notes/system_note.vue @@ -76,19 +76,13 @@ export default { <li :id="noteAnchorId" :class="{ target: isTargetNote }" - class="note system-note timeline-entry note-wrapper"> + class="note system-note timeline-entry note-wrapper" + > <div class="timeline-entry-inner"> - <div - class="timeline-icon" - v-html="iconHtml"> - </div> + <div class="timeline-icon" v-html="iconHtml"></div> <div class="timeline-content"> <div class="note-header"> - <note-header - :author="note.author" - :created-at="note.created_at" - :note-id="note.id" - > + <note-header :author="note.author" :created-at="note.created_at" :note-id="note.id"> <span v-html="actionTextHtml"></span> </note-header> </div> @@ -96,24 +90,14 @@ export default { <div :class="{ 'system-note-commit-list': hasMoreCommits, - 'hide-shade': expanded + 'hide-shade': expanded, }" class="note-text" v-html="note.note_html" ></div> - <div - v-if="hasMoreCommits" - class="flex-list" - > - <div - class="system-note-commit-list-toggler flex-row" - @click="expanded = !expanded" - > - <icon - :name="toggleIcon" - :size="8" - class="append-right-5" - /> + <div v-if="hasMoreCommits" class="flex-list"> + <div class="system-note-commit-list-toggler flex-row" @click="expanded = !expanded;"> + <icon :name="toggleIcon" :size="8" class="append-right-5" /> <span>Toggle commit list</span> </div> </div> diff --git a/app/assets/javascripts/vue_shared/components/pikaday.vue b/app/assets/javascripts/vue_shared/components/pikaday.vue index 26c99aecae4..8bdb5bf22c2 100644 --- a/app/assets/javascripts/vue_shared/components/pikaday.vue +++ b/app/assets/javascripts/vue_shared/components/pikaday.vue @@ -62,20 +62,9 @@ export default { <template> <div class="pikaday-container"> <div class="dropdown open"> - <button - type="button" - class="dropdown-menu-toggle" - data-toggle="dropdown" - @click="toggled" - > - <span class="dropdown-toggle-text"> - {{ label }} - </span> - <i - class="fa fa-chevron-down" - aria-hidden="true" - > - </i> + <button type="button" class="dropdown-menu-toggle" data-toggle="dropdown" @click="toggled"> + <span class="dropdown-toggle-text"> {{ label }} </span> + <i class="fa fa-chevron-down" aria-hidden="true"> </i> </button> </div> </div> diff --git a/app/assets/javascripts/vue_shared/components/project_avatar/default.vue b/app/assets/javascripts/vue_shared/components/project_avatar/default.vue index 17927fabbcc..b399c232937 100644 --- a/app/assets/javascripts/vue_shared/components/project_avatar/default.vue +++ b/app/assets/javascripts/vue_shared/components/project_avatar/default.vue @@ -26,10 +26,7 @@ export default { </script> <template> - <span - :class="sizeClass" - class="avatar-container project-avatar" - > + <span :class="sizeClass" class="avatar-container project-avatar"> <project-avatar-image v-if="project.avatar_url" :link-href="project.path" @@ -37,11 +34,6 @@ export default { :img-alt="project.name" :img-size="size" /> - <identicon - v-else - :entity-id="project.id" - :entity-name="project.name" - :size-class="sizeClass" - /> + <identicon v-else :entity-id="project.id" :entity-name="project.name" :size-class="sizeClass" /> </span> </template> diff --git a/app/assets/javascripts/vue_shared/components/project_avatar/image.vue b/app/assets/javascripts/vue_shared/components/project_avatar/image.vue index 1a2fd2ad985..e77b9ddc7ba 100644 --- a/app/assets/javascripts/vue_shared/components/project_avatar/image.vue +++ b/app/assets/javascripts/vue_shared/components/project_avatar/image.vue @@ -87,7 +87,7 @@ export default { :class="{ lazy: lazy, [avatarSizeClass]: true, - [cssClasses]: true + [cssClasses]: true, }" :src="resultantSrcAttribute" :width="size" diff --git a/app/assets/javascripts/vue_shared/components/recaptcha_modal.vue b/app/assets/javascripts/vue_shared/components/recaptcha_modal.vue index 09394847b10..1c6c3fc4734 100644 --- a/app/assets/javascripts/vue_shared/components/recaptcha_modal.vue +++ b/app/assets/javascripts/vue_shared/components/recaptcha_modal.vue @@ -73,14 +73,8 @@ export default { @cancel="close" > <div slot="body"> - <p> - {{ __('We want to be sure it is you, please confirm you are not a robot.') }} - </p> - <div - ref="recaptcha" - v-html="html" - > - </div> + <p>{{ __('We want to be sure it is you, please confirm you are not a robot.') }}</p> + <div ref="recaptcha" v-html="html"></div> </div> </deprecated-modal> </template> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/collapsed_calendar_icon.vue b/app/assets/javascripts/vue_shared/components/sidebar/collapsed_calendar_icon.vue index 5841db52704..cc24fedceed 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/collapsed_calendar_icon.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/collapsed_calendar_icon.vue @@ -47,16 +47,9 @@ export default { data-boundary="viewport" @click="click" > - <i - v-if="showIcon" - class="fa fa-calendar" - aria-hidden="true" - > - </i> + <i v-if="showIcon" class="fa fa-calendar" aria-hidden="true"> </i> <slot> - <span> - {{ text }} - </span> + <span> {{ text }} </span> </slot> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue b/app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue index 174c29809ac..b5e43da401e 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/collapsed_grouped_date_picker.vue @@ -85,16 +85,10 @@ export default { @click="toggleSidebar" > <span class="sidebar-collapsed-value"> - <span v-if="showFromText">From</span> - <span>{{ dateText('min') }}</span> + <span v-if="showFromText">From</span> <span>{{ dateText('min') }}</span> </span> </collapsed-calendar-icon> - <div - v-if="hasMinAndMaxDates" - class="text-center sidebar-collapsed-divider" - > - - - </div> + <div v-if="hasMinAndMaxDates" class="text-center sidebar-collapsed-divider">-</div> <collapsed-calendar-icon v-if="maxDate" :container-class="iconClass" @@ -102,8 +96,7 @@ export default { @click="toggleSidebar" > <span class="sidebar-collapsed-value"> - <span v-if="!minDate">Until</span> - <span>{{ dateText('max') }}</span> + <span v-if="!minDate">Until</span> <span>{{ dateText('max') }}</span> </span> </collapsed-calendar-icon> </div> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue b/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue index 6aa880603b9..82067129c57 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/date_picker.vue @@ -96,26 +96,14 @@ export default { </script> <template> - <div - :class="blockClass" - class="block" - > + <div :class="blockClass" class="block"> <div class="issuable-sidebar-header"> - <toggle-sidebar - :collapsed="collapsed" - @toggle="toggleSidebar" - /> + <toggle-sidebar :collapsed="collapsed" @toggle="toggleSidebar" /> </div> - <collapsed-calendar-icon - :text="collapsedText" - class="sidebar-collapsed-icon" - /> + <collapsed-calendar-icon :text="collapsedText" class="sidebar-collapsed-icon" /> <div class="title"> {{ label }} - <gl-loading-icon - v-if="isLoading" - :inline="true" - /> + <gl-loading-icon v-if="isLoading" :inline="true" /> <div class="float-right"> <button v-if="editable && !editing" @@ -125,11 +113,7 @@ export default { > Edit </button> - <toggle-sidebar - v-if="showToggleSidebar" - :collapsed="collapsed" - @toggle="toggleSidebar" - /> + <toggle-sidebar v-if="showToggleSidebar" :collapsed="collapsed" @toggle="toggleSidebar" /> </div> </div> <div class="value"> @@ -142,32 +126,21 @@ export default { @newDateSelected="newDateSelected" @hidePicker="stopEditing" /> - <span - v-else - class="value-content" - > + <span v-else class="value-content"> <template v-if="selectedDate"> <strong>{{ selectedDateWords }}</strong> - <span - v-if="selectedAndEditable" - class="no-value" - > + <span v-if="selectedAndEditable" class="no-value"> - <button type="button" class="btn-blank btn-link btn-secondary-hover-link" - @click="newDateSelected(null)" + @click="newDateSelected(null);" > remove </button> </span> </template> - <span - v-else - class="no-value" - > - None - </span> + <span v-else class="no-value"> None </span> </span> </div> </div> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue index 98b8b6460fe..f66e81b1e08 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/base.vue @@ -122,30 +122,18 @@ export default { :labels="context.labels" @onValueClick="handleCollapsedValueClick" /> - <dropdown-title - :can-edit="canEdit" - /> - <dropdown-value - :labels="context.labels" - :label-filter-base-path="labelFilterBasePath" - > + <dropdown-title :can-edit="canEdit" /> + <dropdown-value :labels="context.labels" :label-filter-base-path="labelFilterBasePath"> <slot></slot> </dropdown-value> - <div - v-if="canEdit" - class="selectbox js-selectbox" - style="display: none;" - > + <div v-if="canEdit" class="selectbox js-selectbox" style="display: none;"> <dropdown-hidden-input v-for="label in context.labels" :key="label.id" :name="hiddenInputName" :value="label.id" /> - <div - ref="dropdown" - class="dropdown" - > + <div ref="dropdown" class="dropdown"> <dropdown-button :ability-name="abilityName" :field-name="hiddenInputName" @@ -161,11 +149,9 @@ dropdown-menu-labels dropdown-menu-selectable" > <div class="dropdown-page-one"> <dropdown-header v-if="showCreate" /> - <dropdown-search-input/> + <dropdown-search-input /> <div class="dropdown-content"></div> - <div class="dropdown-loading"> - <gl-loading-icon /> - </div> + <div class="dropdown-loading"><gl-loading-icon /></div> <dropdown-footer v-if="showCreate" :labels-web-url="labelsWebUrl" diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue index 48d2f16f554..498b507d11d 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_button.vue @@ -65,14 +65,7 @@ export default { class="dropdown-menu-toggle wide js-label-select js-multiselect js-context-config-modal" data-toggle="dropdown" > - <span class="dropdown-toggle-text"> - {{ dropdownToggleText }} - </span> - <i - aria-hidden="true" - class="fa fa-chevron-down" - data-hidden="true" - > - </i> + <span class="dropdown-toggle-text"> {{ dropdownToggleText }} </span> + <i aria-hidden="true" class="fa fa-chevron-down" data-hidden="true"> </i> </button> </template> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue index fe895136ccc..74c5e063c3d 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_create_label.vue @@ -23,12 +23,7 @@ export default { type="button" class="dropdown-title-button dropdown-menu-back" > - <i - aria-hidden="true" - class="fa fa-arrow-left" - data-hidden="true" - > - </i> + <i aria-hidden="true" class="fa fa-arrow-left" data-hidden="true"> </i> </button> {{ headerTitle }} <button @@ -36,12 +31,7 @@ export default { type="button" class="dropdown-title-button dropdown-menu-close" > - <i - aria-hidden="true" - class="fa fa-times dropdown-menu-close-icon" - data-hidden="true" - > - </i> + <i aria-hidden="true" class="fa fa-times dropdown-menu-close-icon" data-hidden="true"> </i> </button> </div> <div class="dropdown-content"> @@ -75,16 +65,10 @@ export default { /> </div> <div class="clearfix"> - <button - type="button" - class="btn btn-primary float-left js-new-label-btn disabled" - > + <button type="button" class="btn btn-primary float-left js-new-label-btn disabled"> {{ __('Create') }} </button> - <button - type="button" - class="btn btn-default float-right js-cancel-label-btn" - > + <button type="button" class="btn btn-default float-right js-cancel-label-btn"> {{ __('Cancel') }} </button> </div> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue index d64ad016f9b..ebbd8d119b5 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_footer.vue @@ -25,19 +25,10 @@ export default { <div class="dropdown-footer"> <ul class="dropdown-footer-list"> <li> - <a - href="#" - class="dropdown-toggle-page" - > - {{ createLabelTitle }} - </a> + <a href="#" class="dropdown-toggle-page"> {{ createLabelTitle }} </a> </li> <li> - <a - :href="labelsWebUrl" - data-is-link="true" - class="dropdown-external-link" - > + <a :href="labelsWebUrl" data-is-link="true" class="dropdown-external-link"> {{ manageLabelsTitle }} </a> </li> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue index e98b6392827..eb837be165b 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_header.vue @@ -10,12 +10,7 @@ export default {}; type="button" class="dropdown-title-button dropdown-menu-close" > - <i - aria-hidden="true" - class="fa fa-times dropdown-menu-close-icon" - data-hidden="true" - > - </i> + <i aria-hidden="true" class="fa fa-times dropdown-menu-close-icon" data-hidden="true"> </i> </button> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue index 80d65a2a534..bf51fa3dc38 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_search_input.vue @@ -10,12 +10,7 @@ export default {}; class="dropdown-input-field" type="search" /> - <i - aria-hidden="true" - class="fa fa-search dropdown-input-search" - data-hidden="true" - > - </i> + <i aria-hidden="true" class="fa fa-search dropdown-input-search" data-hidden="true"> </i> <i aria-hidden="true" class="fa fa-times dropdown-input-clear js-dropdown-input-clear" diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_title.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_title.vue index 9ac32ff13c6..cb53273c786 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_title.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_title.vue @@ -13,16 +13,8 @@ export default { <div class="title hide-collapsed append-bottom-10"> {{ __('Labels') }} <template v-if="canEdit"> - <i - aria-hidden="true" - class="fa fa-spinner fa-spin block-loading" - data-hidden="true" - > - </i> - <button - type="button" - class="edit-link btn btn-blank float-right js-sidebar-dropdown-toggle" - > + <i aria-hidden="true" class="fa fa-spinner fa-spin block-loading" data-hidden="true"> </i> + <button type="button" class="edit-link btn btn-blank float-right js-sidebar-dropdown-toggle"> {{ __('Edit') }} </button> </template> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue index 10e990f8a80..6faf3fafad1 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value.vue @@ -37,22 +37,14 @@ export default { <template> <div :class="{ - 'has-labels':!isEmpty, + 'has-labels': !isEmpty, }" class="hide-collapsed value issuable-show-labels js-value" > - <span - v-if="isEmpty" - class="text-secondary" - > + <span v-if="isEmpty" class="text-secondary"> <slot>{{ __('None') }}</slot> </span> - <a - v-for="label in labels" - v-else - :key="label.id" - :href="labelFilterUrl(label)" - > + <a v-for="label in labels" v-else :key="label.id" :href="labelFilterUrl(label)"> <span v-tooltip :style="labelStyle(label)" diff --git a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue index 0d5fc07e6e3..e742900dbcb 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/labels_select/dropdown_value_collapsed.vue @@ -46,12 +46,7 @@ export default { data-container="body" @click="handleClick" > - <i - aria-hidden="true" - data-hidden="true" - class="fa fa-tags" - > - </i> + <i aria-hidden="true" data-hidden="true" class="fa fa-tags"> </i> <span>{{ labels.length }}</span> </div> </template> diff --git a/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue b/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue index 80dc7d3557c..3b5ce0e9910 100644 --- a/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue +++ b/app/assets/javascripts/vue_shared/components/sidebar/toggle_sidebar.vue @@ -46,7 +46,7 @@ export default { <i :class="{ 'fa-angle-double-right': !collapsed, - 'fa-angle-double-left': collapsed + 'fa-angle-double-left': collapsed, }" aria-label="toggle collapse" class="fa" diff --git a/app/assets/javascripts/vue_shared/components/smart_virtual_list.vue b/app/assets/javascripts/vue_shared/components/smart_virtual_list.vue index 63034a45f77..49f987bb619 100644 --- a/app/assets/javascripts/vue_shared/components/smart_virtual_list.vue +++ b/app/assets/javascripts/vue_shared/components/smart_virtual_list.vue @@ -27,16 +27,7 @@ export default { > <slot></slot> </virtual-list> - <component - :is="rtag" - v-else - class="js-plain-element" - > - <component - :is="wtag" - :class="wclass" - > - <slot></slot> - </component> + <component :is="rtag" v-else class="js-plain-element"> + <component :is="wtag" :class="wclass"> <slot></slot> </component> </component> </template> diff --git a/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue b/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue index cd3ee544344..8ba6b73f928 100644 --- a/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue +++ b/app/assets/javascripts/vue_shared/components/stacked_progress_bar.vue @@ -88,16 +88,8 @@ export default { </script> <template> - <div - :class="cssClass" - class="stacked-progress-bar" - > - <span - v-if="!totalCount" - class="status-unavailable" - > - {{ __("Not available") }} - </span> + <div :class="cssClass" class="stacked-progress-bar"> + <span v-if="!totalCount" class="status-unavailable"> {{ __('Not available') }} </span> <span v-if="successPercent" v-tooltip diff --git a/app/assets/javascripts/vue_shared/components/svg_gradient.vue b/app/assets/javascripts/vue_shared/components/svg_gradient.vue index b61a1befcd6..cca90af275e 100644 --- a/app/assets/javascripts/vue_shared/components/svg_gradient.vue +++ b/app/assets/javascripts/vue_shared/components/svg_gradient.vue @@ -17,20 +17,11 @@ export default { }; </script> <template> - <svg - height="0" - width="0"> + <svg height="0" width="0"> <defs> - <linearGradient - :id="identifierName"> - <stop - :stop-color="colors[0]" - :stop-opacity="opacity[0]" - offset="0%" /> - <stop - :stop-color="colors[1]" - :stop-opacity="opacity[1]" - offset="100%" /> + <linearGradient :id="identifierName"> + <stop :stop-color="colors[0]" :stop-opacity="opacity[0]" offset="0%" /> + <stop :stop-color="colors[1]" :stop-opacity="opacity[1]" offset="100%" /> </linearGradient> </defs> </svg> diff --git a/app/assets/javascripts/vue_shared/components/table_pagination.vue b/app/assets/javascripts/vue_shared/components/table_pagination.vue index 03a5a078879..01e655d27e5 100644 --- a/app/assets/javascripts/vue_shared/components/table_pagination.vue +++ b/app/assets/javascripts/vue_shared/components/table_pagination.vue @@ -131,10 +131,7 @@ export default { }; </script> <template> - <div - v-if="showPagination" - class="gl-pagination prepend-top-default" - > + <div v-if="showPagination" class="gl-pagination prepend-top-default"> <ul class="pagination justify-content-center"> <li v-for="(item, index) in getItems" @@ -148,14 +145,11 @@ export default { 'd-none d-md-block': hideOnSmallScreen(item), separator: item.separator, active: item.active, - disabled: item.disabled || item.separator + disabled: item.disabled || item.separator, }" class="page-item" > - <a - class="page-link" - @click.prevent="changePage(item.title, item.disabled)" - > + <a class="page-link" @click.prevent="changePage(item.title, item.disabled);"> {{ item.title }} </a> </li> diff --git a/app/assets/javascripts/vue_shared/components/tabs/tab.vue b/app/assets/javascripts/vue_shared/components/tabs/tab.vue index 1c6011dcfd0..d24c27cfcc3 100644 --- a/app/assets/javascripts/vue_shared/components/tabs/tab.vue +++ b/app/assets/javascripts/vue_shared/components/tabs/tab.vue @@ -37,7 +37,7 @@ export default { <template> <div :class="{ - active: localActive + active: localActive, }" class="tab-pane" role="tabpanel" diff --git a/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue b/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue index d760263929a..a01c5be98e3 100644 --- a/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue +++ b/app/assets/javascripts/vue_shared/components/time_ago_tooltip.vue @@ -39,6 +39,7 @@ export default { :title="tooltipTitle(time)" :data-placement="tooltipPlacement" data-container="body" - v-text="timeFormated(time)"> + v-text="timeFormated(time)" + > </time> </template> diff --git a/app/assets/javascripts/vue_shared/components/toggle_button.vue b/app/assets/javascripts/vue_shared/components/toggle_button.vue index 5d1c92c3b3d..de70fa2182b 100644 --- a/app/assets/javascripts/vue_shared/components/toggle_button.vue +++ b/app/assets/javascripts/vue_shared/components/toggle_button.vue @@ -61,29 +61,20 @@ export default { <template> <label class="toggle-wrapper"> - <input - v-if="name" - :name="name" - :value="value" - type="hidden" - /> + <input v-if="name" :name="name" :value="value" type="hidden" /> <button :aria-label="ariaLabel" :class="{ 'is-checked': value, 'is-disabled': disabledInput, - 'is-loading': isLoading + 'is-loading': isLoading, }" type="button" class="project-feature-toggle" @click="toggleFeature" > <gl-loading-icon class="loading-icon" /> - <span class="toggle-icon"> - <icon - :name="toggleIcon" - css-classes="toggle-icon-svg"/> - </span> + <span class="toggle-icon"> <icon :name="toggleIcon" css-classes="toggle-icon-svg" /> </span> </button> </label> </template> diff --git a/app/assets/javascripts/vue_shared/components/tooltip_on_truncate.vue b/app/assets/javascripts/vue_shared/components/tooltip_on_truncate.vue index d5b58574123..69eb791d195 100644 --- a/app/assets/javascripts/vue_shared/components/tooltip_on_truncate.vue +++ b/app/assets/javascripts/vue_shared/components/tooltip_on_truncate.vue @@ -59,9 +59,5 @@ export default { > <slot></slot> </span> - <span - v-else - > - <slot></slot> - </span> + <span v-else> <slot></slot> </span> </template> diff --git a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue index c78d98ccd9e..01b8b94f9e3 100644 --- a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue +++ b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_image.vue @@ -87,7 +87,7 @@ export default { :class="{ lazy: lazy, [avatarSizeClass]: true, - [cssClasses]: true + [cssClasses]: true, }" :src="resultantSrcAttribute" :width="size" @@ -102,9 +102,7 @@ export default { boundary="window" class="js-user-avatar-image-toolip" > - <slot> - {{ tooltipText }} - </slot> + <slot> {{ tooltipText }} </slot> </gl-tooltip> </span> </template> diff --git a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_link.vue b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_link.vue index 6dd519ea56d..55e2a786c8f 100644 --- a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_link.vue +++ b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_link.vue @@ -83,9 +83,7 @@ export default { </script> <template> - <gl-link - :href="linkHref" - class="user-avatar-link"> + <gl-link :href="linkHref" class="user-avatar-link"> <user-avatar-image :img-src="imgSrc" :img-alt="imgAlt" @@ -94,13 +92,14 @@ export default { :tooltip-text="avatarTooltipText" :tooltip-placement="tooltipPlacement" > - <slot></slot> - </user-avatar-image><span + <slot></slot> </user-avatar-image + ><span v-if="shouldShowUsername" v-gl-tooltip :title="tooltipText" :tooltip-placement="tooltipPlacement" class="js-user-avatar-link-username" - >{{ username }}</span><slot name="avatar-badge"></slot> + >{{ username }}</span + ><slot name="avatar-badge"></slot> </gl-link> </template> diff --git a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_svg.vue b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_svg.vue index 8e460566d09..7ed4da84120 100644 --- a/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_svg.vue +++ b/app/assets/javascripts/vue_shared/components/user_avatar/user_avatar_svg.vue @@ -34,10 +34,5 @@ export default { </script> <template> - <svg - :class="avatarSizeClass" - :height="size" - :width="size" - v-html="svg" - /> + <svg :class="avatarSizeClass" :height="size" :width="size" v-html="svg" /> </template> diff --git a/app/assets/stylesheets/framework/issue_box.scss b/app/assets/stylesheets/framework/issue_box.scss index 2d672e62e08..a66604e56ff 100644 --- a/app/assets/stylesheets/framework/issue_box.scss +++ b/app/assets/stylesheets/framework/issue_box.scss @@ -22,7 +22,7 @@ margin-right: 10px; color: $white-light; font-size: $gl-font-size; - line-height: 25px; + line-height: $gl-line-height-24; &.status-box-closed, &.status-box-mr-closed { diff --git a/app/assets/stylesheets/framework/typography.scss b/app/assets/stylesheets/framework/typography.scss index e261bd7c0ca..b3b99df5790 100644 --- a/app/assets/stylesheets/framework/typography.scss +++ b/app/assets/stylesheets/framework/typography.scss @@ -360,10 +360,6 @@ code { font-size: 95%; } -.git-revision-dropdown-toggle { - @extend .monospace; -} - .git-revision-dropdown .dropdown-content ul li a { @extend .ref-name; } diff --git a/app/assets/stylesheets/framework/variables.scss b/app/assets/stylesheets/framework/variables.scss index f4540146a25..b43bb3feef5 100644 --- a/app/assets/stylesheets/framework/variables.scss +++ b/app/assets/stylesheets/framework/variables.scss @@ -271,6 +271,7 @@ $context-header-height: 60px; $breadcrumb-min-height: 48px; $project-title-row-height: 24px; $gl-line-height: 16px; +$gl-line-height-24: 24px; /* * Common component specific colors diff --git a/app/assets/stylesheets/pages/diff.scss b/app/assets/stylesheets/pages/diff.scss index 3c7bf0b0e46..0163c795074 100644 --- a/app/assets/stylesheets/pages/diff.scss +++ b/app/assets/stylesheets/pages/diff.scss @@ -253,19 +253,6 @@ right: 7px; } - .frame { - top: 0; - right: 0; - position: absolute; - - &.deleted { - margin: 0; - display: block; - top: 13px; - right: 7px; - } - } - .swipe-bar { display: block; height: 100%; @@ -435,7 +422,7 @@ .onion-skin.view { .swipe-wrap { top: 0; - right: 0; + left: 0; } .frame.deleted { diff --git a/app/assets/stylesheets/pages/editor.scss b/app/assets/stylesheets/pages/editor.scss index 04570c057d1..f46ff360496 100644 --- a/app/assets/stylesheets/pages/editor.scss +++ b/app/assets/stylesheets/pages/editor.scss @@ -32,7 +32,6 @@ .file-title { @extend .monospace; - line-height: 35px; padding-top: 7px; padding-bottom: 7px; @@ -48,13 +47,6 @@ margin-right: 10px; } - .editor-file-name { - @extend .monospace; - - float: left; - margin-right: 10px; - } - .new-file-name { display: inline-block; max-width: 420px; diff --git a/app/assets/stylesheets/pages/issuable.scss b/app/assets/stylesheets/pages/issuable.scss index 38851de6401..415583cc1c7 100644 --- a/app/assets/stylesheets/pages/issuable.scss +++ b/app/assets/stylesheets/pages/issuable.scss @@ -6,19 +6,16 @@ .issuable-warning-icon { background-color: $orange-100; border-radius: $border-radius-default; - margin: 0 $btn-side-margin 0 0; width: $issuable-warning-size; height: $issuable-warning-size; text-align: center; + margin-right: $issuable-warning-icon-margin; + line-height: $gl-line-height-24; .icon { fill: $orange-600; vertical-align: text-bottom; } - - &:first-of-type { - margin-right: $issuable-warning-icon-margin; - } } .limit-container-width { @@ -689,7 +686,6 @@ flex: 1; display: inline-block; font-size: 14px; - line-height: 24px; align-self: center; overflow: hidden; text-overflow: ellipsis; diff --git a/app/assets/stylesheets/pages/pipelines.scss b/app/assets/stylesheets/pages/pipelines.scss index 14395cc59b0..fdd17af35fb 100644 --- a/app/assets/stylesheets/pages/pipelines.scss +++ b/app/assets/stylesheets/pages/pipelines.scss @@ -141,10 +141,6 @@ float: none; } - .api { - @extend .monospace; - } - .branch-commit { .ref-name { font-weight: $gl-font-weight-bold; diff --git a/app/assets/stylesheets/pages/projects.scss b/app/assets/stylesheets/pages/projects.scss index da3d8aa53ad..80ec390d18e 100644 --- a/app/assets/stylesheets/pages/projects.scss +++ b/app/assets/stylesheets/pages/projects.scss @@ -352,10 +352,6 @@ .mobile-git-clone { margin-top: $gl-padding-8; - - .dropdown-menu-inner-content { - @extend .monospace; - } } } @@ -1223,3 +1219,27 @@ pre.light-well { opacity: 1; } } + +.project-mirror-settings { + .btn-show-advanced { + min-width: 135px; + + .label-show { + display: none; + } + + .label-hide { + display: inline; + } + + &.show-advanced { + .label-show { + display: inline; + } + + .label-hide { + display: none; + } + } + } +} diff --git a/app/controllers/application_controller.rb b/app/controllers/application_controller.rb index 7f4aa8244ac..b839da7770d 100644 --- a/app/controllers/application_controller.rb +++ b/app/controllers/application_controller.rb @@ -181,11 +181,11 @@ class ApplicationController < ActionController::Base Ability.allowed?(object, action, subject) end - def access_denied!(message = nil) + def access_denied!(message = nil, status = nil) # If we display a custom access denied message to the user, we don't want to # hide existence of the resource, rather tell them they cannot access it using # the provided message - status = message.present? ? :forbidden : :not_found + status ||= message.present? ? :forbidden : :not_found respond_to do |format| format.any { head status } diff --git a/app/controllers/projects/mirrors_controller.rb b/app/controllers/projects/mirrors_controller.rb index 53176978416..ab7ab13657a 100644 --- a/app/controllers/projects/mirrors_controller.rb +++ b/app/controllers/projects/mirrors_controller.rb @@ -77,6 +77,10 @@ class Projects::MirrorsController < Projects::ApplicationController id enabled only_protected_branches + auth_method + password + ssh_known_hosts + regenerate_ssh_private_key ] ] end diff --git a/app/finders/events_finder.rb b/app/finders/events_finder.rb index 2e82bda8730..8df01f1dad9 100644 --- a/app/finders/events_finder.rb +++ b/app/finders/events_finder.rb @@ -58,7 +58,7 @@ class EventsFinder def by_target_type(events) return events unless Event::TARGET_TYPES[params[:target_type]] - events.where(target_type: Event::TARGET_TYPES[params[:target_type]]) + events.where(target_type: Event::TARGET_TYPES[params[:target_type]].name) end # rubocop: enable CodeReuse/ActiveRecord diff --git a/app/finders/group_descendants_finder.rb b/app/finders/group_descendants_finder.rb index c96979619fd..a9ce5be13f3 100644 --- a/app/finders/group_descendants_finder.rb +++ b/app/finders/group_descendants_finder.rb @@ -178,7 +178,7 @@ class GroupDescendantsFinder end def sort - params.fetch(:sort, 'id_asc') + params.fetch(:sort, 'created_desc') end # rubocop: disable CodeReuse/ActiveRecord diff --git a/app/helpers/auth_helper.rb b/app/helpers/auth_helper.rb index c158cf20dd6..44f85e9c0f8 100644 --- a/app/helpers/auth_helper.rb +++ b/app/helpers/auth_helper.rb @@ -24,6 +24,23 @@ module AuthHelper Gitlab::Auth::OAuth::Provider.label_for(name) end + def form_based_provider_priority + ['crowd', /^ldap/, 'kerberos'] + end + + def form_based_provider_with_highest_priority + @form_based_provider_with_highest_priority ||= begin + form_based_provider_priority.each do |provider_regexp| + highest_priority = form_based_providers.find { |provider| provider.match?(provider_regexp) } + break highest_priority unless highest_priority.nil? + end + end + end + + def form_based_auth_provider_has_active_class?(provider) + form_based_provider_with_highest_priority == provider + end + def form_based_provider?(name) [LDAP_PROVIDER, 'crowd'].any? { |pattern| pattern === name.to_s } end diff --git a/app/helpers/mirror_helper.rb b/app/helpers/mirror_helper.rb index a4025730397..65c7cd82832 100644 --- a/app/helpers/mirror_helper.rb +++ b/app/helpers/mirror_helper.rb @@ -2,6 +2,9 @@ module MirrorHelper def mirrors_form_data_attributes - { project_mirror_endpoint: project_mirror_path(@project) } + { + project_mirror_ssh_endpoint: ssh_host_keys_project_mirror_path(@project, :json), + project_mirror_endpoint: project_mirror_path(@project, :json) + } end end diff --git a/app/models/ci/build.rb b/app/models/ci/build.rb index 889f8ce27a6..d60861dc95f 100644 --- a/app/models/ci/build.rb +++ b/app/models/ci/build.rb @@ -98,7 +98,7 @@ module Ci scope :matches_tag_ids, -> (tag_ids) do matcher = ::ActsAsTaggableOn::Tagging - .where(taggable_type: CommitStatus) + .where(taggable_type: CommitStatus.name) .where(context: 'tags') .where('taggable_id = ci_builds.id') .where.not(tag_id: tag_ids).select('1') @@ -108,7 +108,7 @@ module Ci scope :with_any_tags, -> do matcher = ::ActsAsTaggableOn::Tagging - .where(taggable_type: CommitStatus) + .where(taggable_type: CommitStatus.name) .where(context: 'tags') .where('taggable_id = ci_builds.id').select('1') @@ -464,7 +464,9 @@ module Ci end def repo_url - auth = "gitlab-ci-token:#{ensure_token!}@" + return unless token + + auth = "gitlab-ci-token:#{token}@" project.http_url_to_repo.sub(%r{^https?://}) do |prefix| prefix + auth end @@ -725,7 +727,7 @@ module Ci trace = trace.dup Gitlab::Ci::MaskSecret.mask!(trace, project.runners_token) if project - Gitlab::Ci::MaskSecret.mask!(trace, token) + Gitlab::Ci::MaskSecret.mask!(trace, token) if token trace end @@ -814,12 +816,12 @@ module Ci .concat(pipeline.persisted_variables) .append(key: 'CI_JOB_ID', value: id.to_s) .append(key: 'CI_JOB_URL', value: Gitlab::Routing.url_helpers.project_job_url(project, self)) - .append(key: 'CI_JOB_TOKEN', value: token, public: false) + .append(key: 'CI_JOB_TOKEN', value: token.to_s, public: false) .append(key: 'CI_BUILD_ID', value: id.to_s) - .append(key: 'CI_BUILD_TOKEN', value: token, public: false) + .append(key: 'CI_BUILD_TOKEN', value: token.to_s, public: false) .append(key: 'CI_REGISTRY_USER', value: CI_REGISTRY_USER) - .append(key: 'CI_REGISTRY_PASSWORD', value: token, public: false) - .append(key: 'CI_REPOSITORY_URL', value: repo_url, public: false) + .append(key: 'CI_REGISTRY_PASSWORD', value: token.to_s, public: false) + .append(key: 'CI_REPOSITORY_URL', value: repo_url.to_s, public: false) .concat(deploy_token_variables) end end @@ -831,9 +833,9 @@ module Ci variables.append(key: 'GITLAB_FEATURES', value: project.licensed_features.join(',')) variables.append(key: 'CI_SERVER_NAME', value: 'GitLab') variables.append(key: 'CI_SERVER_VERSION', value: Gitlab::VERSION) - variables.append(key: 'CI_SERVER_VERSION_MAJOR', value: gitlab_version_info.major.to_s) - variables.append(key: 'CI_SERVER_VERSION_MINOR', value: gitlab_version_info.minor.to_s) - variables.append(key: 'CI_SERVER_VERSION_PATCH', value: gitlab_version_info.patch.to_s) + variables.append(key: 'CI_SERVER_VERSION_MAJOR', value: Gitlab.version_info.major.to_s) + variables.append(key: 'CI_SERVER_VERSION_MINOR', value: Gitlab.version_info.minor.to_s) + variables.append(key: 'CI_SERVER_VERSION_PATCH', value: Gitlab.version_info.patch.to_s) variables.append(key: 'CI_SERVER_REVISION', value: Gitlab.revision) variables.append(key: 'CI_JOB_NAME', value: name) variables.append(key: 'CI_JOB_STAGE', value: stage) @@ -850,10 +852,6 @@ module Ci end end - def gitlab_version_info - @gitlab_version_info ||= Gitlab::VersionInfo.parse(Gitlab::VERSION) - end - def legacy_variables Gitlab::Ci::Variables::Collection.new.tap do |variables| variables.append(key: 'CI_BUILD_REF', value: sha) diff --git a/app/models/clusters/kubernetes_namespace.rb b/app/models/clusters/kubernetes_namespace.rb index cbd52bfb48b..34f5e38ff79 100644 --- a/app/models/clusters/kubernetes_namespace.rb +++ b/app/models/clusters/kubernetes_namespace.rb @@ -11,9 +11,13 @@ module Clusters belongs_to :project, class_name: '::Project' has_one :platform_kubernetes, through: :cluster + before_validation :set_defaults + validates :namespace, presence: true validates :namespace, uniqueness: { scope: :cluster_id } + validates :service_account_name, presence: true + delegate :ca_pem, to: :platform_kubernetes, allow_nil: true delegate :api_url, to: :platform_kubernetes, allow_nil: true @@ -28,38 +32,43 @@ module Clusters "#{namespace}-token" end - def configure_predefined_credentials - self.namespace = kubernetes_or_project_namespace - self.service_account_name = default_service_account_name - end - def predefined_variables config = YAML.dump(kubeconfig) Gitlab::Ci::Variables::Collection.new.tap do |variables| variables - .append(key: 'KUBE_SERVICE_ACCOUNT', value: service_account_name) - .append(key: 'KUBE_NAMESPACE', value: namespace) - .append(key: 'KUBE_TOKEN', value: service_account_token, public: false) + .append(key: 'KUBE_SERVICE_ACCOUNT', value: service_account_name.to_s) + .append(key: 'KUBE_NAMESPACE', value: namespace.to_s) + .append(key: 'KUBE_TOKEN', value: service_account_token.to_s, public: false) .append(key: 'KUBECONFIG', value: config, public: false, file: true) end end - private - - def kubernetes_or_project_namespace - platform_kubernetes&.namespace.presence || project_namespace + def set_defaults + self.namespace ||= default_platform_kubernetes_namespace + self.namespace ||= default_project_namespace + self.service_account_name ||= default_service_account_name end + private + def default_service_account_name + return unless namespace + "#{namespace}-service-account" end - def project_namespace - Gitlab::NamespaceSanitizer.sanitize(project_slug) + def default_platform_kubernetes_namespace + platform_kubernetes&.namespace.presence + end + + def default_project_namespace + Gitlab::NamespaceSanitizer.sanitize(project_slug) if project_slug end def project_slug + return unless project + "#{project.path}-#{project.id}".downcase end diff --git a/app/models/commit.rb b/app/models/commit.rb index 9dd0cbacd9e..546fcc54a15 100644 --- a/app/models/commit.rb +++ b/app/models/commit.rb @@ -230,24 +230,13 @@ class Commit def lazy_author BatchLoader.for(author_email.downcase).batch do |emails, loader| - # A Hash that maps user Emails to the corresponding User objects. The - # Emails at this point are the _primary_ Emails of the Users. - users_for_emails = User - .by_any_email(emails) - .each_with_object({}) { |user, hash| hash[user.email] = user } - - users_for_ids = users_for_emails - .values - .each_with_object({}) { |user, hash| hash[user.id] = user } - - # Some commits may have used an alternative Email address. In this case we - # need to query the "emails" table to map those addresses to User objects. - Email - .where(email: emails - users_for_emails.keys) - .pluck(:email, :user_id) - .each { |(email, id)| users_for_emails[email] = users_for_ids[id] } - - users_for_emails.each { |email, user| loader.call(email, user) } + users = User.by_any_email(emails).includes(:emails) + + emails.each do |email| + user = users.find { |u| u.any_email?(email) } + + loader.call(email, user) + end end end diff --git a/app/models/concerns/avatarable.rb b/app/models/concerns/avatarable.rb index 0d5311a9985..b42236c1fa2 100644 --- a/app/models/concerns/avatarable.rb +++ b/app/models/concerns/avatarable.rb @@ -86,7 +86,7 @@ module Avatarable params[:model].upload_paths(params[:identifier]) end - Upload.where(uploader: AvatarUploader, path: paths).find_each do |upload| + Upload.where(uploader: AvatarUploader.name, path: paths).find_each do |upload| model = model_class.instantiate('id' => upload.model_id) loader.call({ model: model, identifier: File.basename(upload.path) }, upload) diff --git a/app/models/concerns/mirror_authentication.rb b/app/models/concerns/mirror_authentication.rb new file mode 100644 index 00000000000..e3e1a0441f8 --- /dev/null +++ b/app/models/concerns/mirror_authentication.rb @@ -0,0 +1,91 @@ +# frozen_string_literal: true + +# Mirroring may use password or SSH public-key authentication. This concern +# implements support for persisting the necessary data in a `credentials` +# serialized attribute. It also needs an `url` method to be defined +module MirrorAuthentication + SSH_PRIVATE_KEY_OPTS = { + type: 'RSA', + bits: 4096 + }.freeze + + extend ActiveSupport::Concern + + included do + validates :auth_method, inclusion: { in: %w[password ssh_public_key] }, allow_blank: true + + # We should generate a key even if there's no SSH URL present + before_validation :generate_ssh_private_key!, if: -> { + regenerate_ssh_private_key || ( auth_method == 'ssh_public_key' && ssh_private_key.blank? ) + } + + credentials_field :auth_method, reader: false + credentials_field :ssh_known_hosts + credentials_field :ssh_known_hosts_verified_at + credentials_field :ssh_known_hosts_verified_by_id + credentials_field :ssh_private_key + credentials_field :user + credentials_field :password + end + + class_methods do + def credentials_field(name, reader: true) + if reader + define_method(name) do + credentials[name] if credentials.present? + end + end + + define_method("#{name}=") do |value| + self.credentials ||= {} + + # Removal of the password, username, etc, generally causes an update of + # the value to the empty string. Detect and gracefully handle this case. + if value.present? + self.credentials[name] = value + else + self.credentials.delete(name) + end + end + end + end + + attr_accessor :regenerate_ssh_private_key + + def ssh_key_auth? + ssh_mirror_url? && auth_method == 'ssh_public_key' + end + + def password_auth? + auth_method == 'password' + end + + def ssh_mirror_url? + url&.start_with?('ssh://') + end + + def ssh_known_hosts_verified_by + @ssh_known_hosts_verified_by ||= ::User.find_by(id: ssh_known_hosts_verified_by_id) + end + + def ssh_known_hosts_fingerprints + ::SshHostKey.fingerprint_host_keys(ssh_known_hosts) + end + + def auth_method + auth_method = credentials.fetch(:auth_method, nil) if credentials.present? + + auth_method.presence || 'password' + end + + def ssh_public_key + return nil if ssh_private_key.blank? + + comment = "git@#{::Gitlab.config.gitlab.host}" + ::SSHKey.new(ssh_private_key, comment: comment).ssh_public_key + end + + def generate_ssh_private_key! + self.ssh_private_key = ::SSHKey.generate(SSH_PRIVATE_KEY_OPTS).private_key + end +end diff --git a/app/models/remote_mirror.rb b/app/models/remote_mirror.rb index c1f53b5da4f..a3415a4a14c 100644 --- a/app/models/remote_mirror.rb +++ b/app/models/remote_mirror.rb @@ -2,6 +2,7 @@ class RemoteMirror < ActiveRecord::Base include AfterCommitQueue + include MirrorAuthentication PROTECTED_BACKOFF_DELAY = 1.minute UNPROTECTED_BACKOFF_DELAY = 5.minutes @@ -28,6 +29,8 @@ class RemoteMirror < ActiveRecord::Base after_commit :remove_remote, on: :destroy + before_validation :store_credentials + scope :enabled, -> { where(enabled: true) } scope :started, -> { with_update_status(:started) } scope :stuck, -> { started.where('last_update_at < ? OR (last_update_at IS NULL AND updated_at < ?)', 1.day.ago, 1.day.ago) } @@ -84,7 +87,21 @@ class RemoteMirror < ActiveRecord::Base end def update_repository(options) - raw.update(options) + if ssh_mirror_url? + if ssh_key_auth? && ssh_private_key.present? + options[:ssh_key] = ssh_private_key + end + + if ssh_known_hosts.present? + options[:known_hosts] = ssh_known_hosts + end + end + + Gitlab::Git::RemoteMirror.new( + project.repository.raw, + remote_name, + **options + ).update end def sync? @@ -128,7 +145,8 @@ class RemoteMirror < ActiveRecord::Base super(value) && return unless Gitlab::UrlSanitizer.valid?(value) mirror_url = Gitlab::UrlSanitizer.new(value) - self.credentials = mirror_url.credentials + self.credentials ||= {} + self.credentials = self.credentials.merge(mirror_url.credentials) super(mirror_url.sanitized_url) end @@ -152,17 +170,28 @@ class RemoteMirror < ActiveRecord::Base def ensure_remote! return unless project - return unless remote_name && url + return unless remote_name && remote_url # If this fails or the remote already exists, we won't know due to # https://gitlab.com/gitlab-org/gitaly/issues/1317 - project.repository.add_remote(remote_name, url) + project.repository.add_remote(remote_name, remote_url) end private - def raw - @raw ||= Gitlab::Git::RemoteMirror.new(project.repository.raw, remote_name) + def store_credentials + # This is a necessary workaround for attr_encrypted, which doesn't otherwise + # notice that the credentials have changed + self.credentials = self.credentials + end + + # The remote URL omits any password if SSH public-key authentication is in use + def remote_url + return url unless ssh_key_auth? && password.present? + + Gitlab::UrlSanitizer.new(read_attribute(:url), credentials: { user: user }).full_url + rescue + super end def fallback_remote_name @@ -214,7 +243,7 @@ class RemoteMirror < ActiveRecord::Base project.repository.async_remove_remote(prev_remote_name) end - project.repository.add_remote(remote_name, url) + project.repository.add_remote(remote_name, remote_url) end def remove_remote @@ -224,6 +253,6 @@ class RemoteMirror < ActiveRecord::Base end def mirror_url_changed? - url_changed? || encrypted_credentials_changed? + url_changed? || credentials_changed? end end diff --git a/app/models/repository.rb b/app/models/repository.rb index 6e179f61a7b..fff6d4be275 100644 --- a/app/models/repository.rb +++ b/app/models/repository.rb @@ -1049,11 +1049,19 @@ class Repository end def cache - @cache ||= Gitlab::RepositoryCache.new(self) + @cache ||= if is_wiki + Gitlab::RepositoryCache.new(self, extra_namespace: 'wiki') + else + Gitlab::RepositoryCache.new(self) + end end def request_store_cache - @request_store_cache ||= Gitlab::RepositoryCache.new(self, backend: Gitlab::SafeRequestStore) + @request_store_cache ||= if is_wiki + Gitlab::RepositoryCache.new(self, extra_namespace: 'wiki', backend: Gitlab::SafeRequestStore) + else + Gitlab::RepositoryCache.new(self, backend: Gitlab::SafeRequestStore) + end end def tags_sorted_by_committed_date diff --git a/app/models/user.rb b/app/models/user.rb index a400058e87e..01eba7e0426 100644 --- a/app/models/user.rb +++ b/app/models/user.rb @@ -349,20 +349,28 @@ class User < ActiveRecord::Base def find_by_any_email(email, confirmed: false) return unless email - downcased = email.downcase - - find_by_private_commit_email(downcased) || by_any_email(downcased, confirmed: confirmed).take + by_any_email(email, confirmed: confirmed).take end - # Returns a relation containing all the users for the given Email address - def by_any_email(email, confirmed: false) - users = where(email: email) - users = users.confirmed if confirmed + # Returns a relation containing all the users for the given email addresses + # + # @param emails [String, Array<String>] email addresses to check + # @param confirmed [Boolean] Only return users where the email is confirmed + def by_any_email(emails, confirmed: false) + emails = Array(emails).map(&:downcase) + + from_users = where(email: emails) + from_users = from_users.confirmed if confirmed - emails = joins(:emails).where(emails: { email: email }) - emails = emails.confirmed if confirmed + from_emails = joins(:emails).where(emails: { email: emails }) + from_emails = from_emails.confirmed if confirmed - from_union([users, emails]) + items = [from_users, from_emails] + + user_ids = Gitlab::PrivateCommitEmail.user_ids_for_emails(emails) + items << where(id: user_ids) if user_ids.present? + + from_union(items) end def find_by_private_commit_email(email) @@ -1031,6 +1039,7 @@ class User < ActiveRecord::Base def all_emails all_emails = [] all_emails << email unless temp_oauth_email? + all_emails << private_commit_email all_emails.concat(emails.map(&:email)) all_emails end @@ -1043,16 +1052,24 @@ class User < ActiveRecord::Base verified_emails end + def any_email?(check_email) + downcased = check_email.downcase + + # handle the outdated private commit email case + return true if persisted? && + id == Gitlab::PrivateCommitEmail.user_id_for_email(downcased) + + all_emails.include?(check_email.downcase) + end + def verified_email?(check_email) downcased = check_email.downcase - if email == downcased - primary_email_verified? - else - user_id = Gitlab::PrivateCommitEmail.user_id_for_email(downcased) + # handle the outdated private commit email case + return true if persisted? && + id == Gitlab::PrivateCommitEmail.user_id_for_email(downcased) - user_id == id || emails.confirmed.where(email: downcased).exists? - end + verified_emails.include?(check_email.downcase) end def hook_attrs diff --git a/app/serializers/project_mirror_entity.rb b/app/serializers/project_mirror_entity.rb index 8aba244cd11..c13cc3276a7 100644 --- a/app/serializers/project_mirror_entity.rb +++ b/app/serializers/project_mirror_entity.rb @@ -3,11 +3,7 @@ class ProjectMirrorEntity < Grape::Entity expose :id - expose :remote_mirrors_attributes do |project| - next [] unless project.remote_mirrors.present? - - project.remote_mirrors.map do |remote| - remote.as_json(only: %i[id url enabled]) - end + expose :remote_mirrors_attributes, using: RemoteMirrorEntity do |project| + project.remote_mirrors end end diff --git a/app/serializers/remote_mirror_entity.rb b/app/serializers/remote_mirror_entity.rb new file mode 100644 index 00000000000..8835c6d4647 --- /dev/null +++ b/app/serializers/remote_mirror_entity.rb @@ -0,0 +1,15 @@ +# frozen_string_literal: true + +class RemoteMirrorEntity < Grape::Entity + expose :id + expose :url + expose :enabled + + expose :auth_method + expose :ssh_known_hosts + expose :ssh_public_key + + expose :ssh_known_hosts_fingerprints do |remote_mirror| + remote_mirror.ssh_known_hosts_fingerprints.as_json + end +end diff --git a/app/services/clusters/gcp/kubernetes/create_or_update_namespace_service.rb b/app/services/clusters/gcp/kubernetes/create_or_update_namespace_service.rb index 2b607681082..b31426556f6 100644 --- a/app/services/clusters/gcp/kubernetes/create_or_update_namespace_service.rb +++ b/app/services/clusters/gcp/kubernetes/create_or_update_namespace_service.rb @@ -23,7 +23,7 @@ module Clusters attr_reader :cluster, :kubernetes_namespace, :platform def configure_kubernetes_namespace - kubernetes_namespace.configure_predefined_credentials + kubernetes_namespace.set_defaults end def create_project_service_account diff --git a/app/services/issues/update_service.rb b/app/services/issues/update_service.rb index fba252b0bae..a1d0cc0e568 100644 --- a/app/services/issues/update_service.rb +++ b/app/services/issues/update_service.rb @@ -11,6 +11,12 @@ module Issues move_issue_to_new_project(issue) || update(issue) end + def update(issue) + create_merge_request_from_quick_action + + super + end + def before_update(issue) spam_check(issue, current_user) end @@ -93,6 +99,13 @@ module Issues private + def create_merge_request_from_quick_action + create_merge_request_params = params.delete(:create_merge_request) + return unless create_merge_request_params + + MergeRequests::CreateFromIssueService.new(project, current_user, create_merge_request_params).execute + end + def handle_milestone_change(issue) return if skip_milestone_email diff --git a/app/services/merge_requests/create_from_issue_service.rb b/app/services/merge_requests/create_from_issue_service.rb index 020af0bb950..e69791872cc 100644 --- a/app/services/merge_requests/create_from_issue_service.rb +++ b/app/services/merge_requests/create_from_issue_service.rb @@ -19,13 +19,15 @@ module MergeRequests result = CreateBranchService.new(project, current_user).execute(branch_name, ref) return result if result[:status] == :error - SystemNoteService.new_issue_branch(issue, project, current_user, branch_name) - new_merge_request = create(merge_request) if new_merge_request.valid? + SystemNoteService.new_merge_request(issue, project, current_user, new_merge_request) + success(new_merge_request) else + SystemNoteService.new_issue_branch(issue, project, current_user, branch_name) + error(new_merge_request.errors) end end diff --git a/app/services/projects/update_remote_mirror_service.rb b/app/services/projects/update_remote_mirror_service.rb index 9d0877d1ab2..1244a0f72a7 100644 --- a/app/services/projects/update_remote_mirror_service.rb +++ b/app/services/projects/update_remote_mirror_service.rb @@ -11,7 +11,7 @@ module Projects begin remote_mirror.ensure_remote! - repository.fetch_remote(remote_mirror.remote_name, no_tags: true) + repository.fetch_remote(remote_mirror.remote_name, ssh_auth: remote_mirror, no_tags: true) opts = {} if remote_mirror.only_protected_branches? diff --git a/app/services/quick_actions/interpret_service.rb b/app/services/quick_actions/interpret_service.rb index 9c81de7e90e..d248b10f41e 100644 --- a/app/services/quick_actions/interpret_service.rb +++ b/app/services/quick_actions/interpret_service.rb @@ -635,6 +635,22 @@ module QuickActions @updates[:tag_message] = message end + desc 'Create a merge request.' + explanation do |branch_name = nil| + branch_text = branch_name ? "branch '#{branch_name}'" : 'a branch' + "Creates #{branch_text} and a merge request to resolve this issue" + end + params "<branch name>" + condition do + issuable.is_a?(Issue) && current_user.can?(:create_merge_request_in, project) && current_user.can?(:push_code, project) + end + command :create_merge_request do |branch_name = nil| + @updates[:create_merge_request] = { + branch_name: branch_name, + issue_iid: issuable.iid + } + end + # rubocop: disable CodeReuse/ActiveRecord def extract_users(params) return [] if params.nil? diff --git a/app/services/system_note_service.rb b/app/services/system_note_service.rb index 729bc991294..ec6c306227b 100644 --- a/app/services/system_note_service.rb +++ b/app/services/system_note_service.rb @@ -407,11 +407,17 @@ module SystemNoteService def new_issue_branch(issue, project, author, branch) link = url_helpers.project_compare_url(project, from: project.default_branch, to: branch) - body = "created branch [`#{branch}`](#{link})" + body = "created branch [`#{branch}`](#{link}) to address this issue" create_note(NoteSummary.new(issue, project, author, body, action: 'branch')) end + def new_merge_request(issue, project, author, merge_request) + body = "created merge request #{merge_request.to_reference} to address this issue" + + create_note(NoteSummary.new(issue, project, author, body, action: 'merge')) + end + # Called when a Mentionable references a Noteable # # noteable - Noteable object being referenced diff --git a/app/services/todos/destroy/entity_leave_service.rb b/app/services/todos/destroy/entity_leave_service.rb index e8d1bcdd142..ebfb20132d0 100644 --- a/app/services/todos/destroy/entity_leave_service.rb +++ b/app/services/todos/destroy/entity_leave_service.rb @@ -45,7 +45,7 @@ module Todos # rubocop: disable CodeReuse/ActiveRecord def remove_confidential_issue_todos Todo.where( - target_id: confidential_issues.select(:id), target_type: Issue, user_id: user.id + target_id: confidential_issues.select(:id), target_type: Issue.name, user_id: user.id ).delete_all end # rubocop: enable CodeReuse/ActiveRecord diff --git a/app/services/todos/destroy/private_features_service.rb b/app/services/todos/destroy/private_features_service.rb index a8c3fe0ef5a..bd49519d694 100644 --- a/app/services/todos/destroy/private_features_service.rb +++ b/app/services/todos/destroy/private_features_service.rb @@ -14,9 +14,9 @@ module Todos def execute ProjectFeature.where(project_id: project_ids).each do |project_features| target_types = [] - target_types << Issue if private?(project_features.issues_access_level) - target_types << MergeRequest if private?(project_features.merge_requests_access_level) - target_types << Commit if private?(project_features.repository_access_level) + target_types << Issue.name if private?(project_features.issues_access_level) + target_types << MergeRequest.name if private?(project_features.merge_requests_access_level) + target_types << Commit.name if private?(project_features.repository_access_level) next if target_types.empty? diff --git a/app/views/abuse_reports/new.html.haml b/app/views/abuse_reports/new.html.haml index 84c3dfd8b91..92ae40512c5 100644 --- a/app/views/abuse_reports/new.html.haml +++ b/app/views/abuse_reports/new.html.haml @@ -1,8 +1,8 @@ - page_title _("Report abuse to GitLab") %h3.page-title - = _('Report abuse to GitLab') + = _("Report abuse to GitLab") %p - = _('Please use this form to report users to GitLab who create spam issues, comments or behave inappropriately.') + = _("Please use this form to report users to GitLab who create spam issues, comments or behave inappropriately.") %p = _("A member of GitLab's abuse team will review your report as soon as possible.") %hr @@ -20,7 +20,7 @@ .col-sm-10 = f.text_area :message, class: "form-control", rows: 2, required: true, value: sanitize(@ref_url) .form-text.text-muted - = _('Explain the problem. If appropriate, provide a link to the relevant issue or comment.') + = _("Explain the problem. If appropriate, provide a link to the relevant issue or comment.") .form-actions - = f.submit "Send report", class: "btn btn-success" + = f.submit _("Send report"), class: "btn btn-success" diff --git a/app/views/devise/shared/_signin_box.html.haml b/app/views/devise/shared/_signin_box.html.haml index 5ddb3ece1cb..ec968e435cd 100644 --- a/app/views/devise/shared/_signin_box.html.haml +++ b/app/views/devise/shared/_signin_box.html.haml @@ -1,10 +1,10 @@ - if form_based_providers.any? - if crowd_enabled? - .login-box.tab-pane.active{ id: "crowd", role: 'tabpanel' } + .login-box.tab-pane{ id: "crowd", role: 'tabpanel', class: active_when(form_based_auth_provider_has_active_class?(:crowd)) } .login-body = render 'devise/sessions/new_crowd' - @ldap_servers.each_with_index do |server, i| - .login-box.tab-pane{ id: "#{server['provider_name']}", role: 'tabpanel', class: active_when(i.zero? && !crowd_enabled?) } + .login-box.tab-pane{ id: "#{server['provider_name']}", role: 'tabpanel', class: active_when(i.zero? && form_based_auth_provider_has_active_class?(:ldapmain)) } .login-body = render 'devise/sessions/new_ldap', server: server - if password_authentication_enabled_for_web? @@ -12,6 +12,8 @@ .login-body = render 'devise/sessions/new_base' + = render_if_exists 'devise/sessions/new_smartcard' + - elsif password_authentication_enabled_for_web? .login-box.tab-pane.active{ id: 'login-pane', role: 'tabpanel' } .login-body diff --git a/app/views/devise/shared/_tabs_ldap.html.haml b/app/views/devise/shared/_tabs_ldap.html.haml index 7dced0942f5..aee05b6c81c 100644 --- a/app/views/devise/shared/_tabs_ldap.html.haml +++ b/app/views/devise/shared/_tabs_ldap.html.haml @@ -1,10 +1,13 @@ %ul.nav-links.new-session-tabs.nav-tabs.nav{ class: ('custom-provider-tabs' if form_based_providers.any?) } - if crowd_enabled? %li.nav-item - = link_to "Crowd", "#crowd", class: 'nav-link active', 'data-toggle' => 'tab' + = link_to "Crowd", "#crowd", class: "nav-link #{active_when(form_based_auth_provider_has_active_class?(:crowd))}", 'data-toggle' => 'tab' - @ldap_servers.each_with_index do |server, i| %li.nav-item - = link_to server['label'], "##{server['provider_name']}", class: "nav-link #{active_when(i.zero? && !crowd_enabled?)} qa-ldap-tab", 'data-toggle' => 'tab' + = link_to server['label'], "##{server['provider_name']}", class: "nav-link #{active_when(i.zero? && form_based_auth_provider_has_active_class?(:ldapmain))} qa-ldap-tab", 'data-toggle' => 'tab' + + = render_if_exists 'devise/shared/tab_smartcard' + - if password_authentication_enabled_for_web? %li.nav-item = link_to 'Standard', '#login-pane', class: 'nav-link qa-standard-tab', 'data-toggle' => 'tab' diff --git a/app/views/peek/views/_gc.html.haml b/app/views/peek/views/_gc.html.haml index 9fc83e56ee7..2a586261ce1 100644 --- a/app/views/peek/views/_gc.html.haml +++ b/app/views/peek/views/_gc.html.haml @@ -1,7 +1,7 @@ - local_assigns.fetch(:view) %span.bold - %span{ title: 'Invoke Time', data: { defer_to: "#{view.defer_key}-gc_time" } }... + %span{ title: _('Invoke Time'), data: { defer_to: "#{view.defer_key}-gc_time" } }... \/ - %span{ title: 'Invoke Count', data: { defer_to: "#{view.defer_key}-invokes" } }... + %span{ title: _('Invoke Count'), data: { defer_to: "#{view.defer_key}-invokes" } }... gc diff --git a/app/views/projects/_home_panel.html.haml b/app/views/projects/_home_panel.html.haml index 61ed951dea9..dcef4dd5b69 100644 --- a/app/views/projects/_home_panel.html.haml +++ b/app/views/projects/_home_panel.html.haml @@ -5,7 +5,7 @@ .project-header.d-flex.flex-row.flex-wrap.align-items-center.append-bottom-8 .project-title-row.d-flex.align-items-center .avatar-container.project-avatar.float-none - = project_icon(@project, alt: @project.name, class: 'avatar avatar-tile') + = project_icon(@project, alt: @project.name, class: 'avatar avatar-tile s24', width: 24, height: 24) %h1.project-title.d-flex.align-items-baseline.qa-project-name = @project.name .project-metadata.d-flex.flex-row.flex-wrap.align-items-baseline diff --git a/app/views/projects/blob/_editor.html.haml b/app/views/projects/blob/_editor.html.haml index 24f256d083b..3c1f33ea95e 100644 --- a/app/views/projects/blob/_editor.html.haml +++ b/app/views/projects/blob/_editor.html.haml @@ -6,12 +6,12 @@ = sprite_icon('fork', size: 12) = ref - if current_action?(:edit) || current_action?(:update) - %span.editor-file-name + %span.pull-left.append-right-10 = text_field_tag 'file_path', (params[:file_path] || @path), class: 'form-control new-file-path js-file-path-name-input' - if current_action?(:new) || current_action?(:create) - %span.editor-file-name + %span.pull-left.append-right-10 \/ = text_field_tag 'file_name', params[:file_name], placeholder: "File name", required: true, class: 'form-control new-file-name js-file-path-name-input' diff --git a/app/views/projects/branches/new.html.haml b/app/views/projects/branches/new.html.haml index 500536a5dbc..8181ee9eea1 100644 --- a/app/views/projects/branches/new.html.haml +++ b/app/views/projects/branches/new.html.haml @@ -20,7 +20,7 @@ .col-sm-10.create-from .dropdown = hidden_field_tag :ref, default_ref - = button_tag type: 'button', title: default_ref, class: 'dropdown-menu-toggle wide js-branch-select git-revision-dropdown-toggle', required: true, data: { toggle: 'dropdown', selected: default_ref, field_name: 'ref' } do + = button_tag type: 'button', title: default_ref, class: 'dropdown-menu-toggle wide js-branch-select monospace', required: true, data: { toggle: 'dropdown', selected: default_ref, field_name: 'ref' } do .text-left.dropdown-toggle-text= default_ref = icon('chevron-down') = render 'shared/ref_dropdown', dropdown_class: 'wide' diff --git a/app/views/projects/ci/builds/_build.html.haml b/app/views/projects/ci/builds/_build.html.haml index 0b10c66777a..44e9cb84341 100644 --- a/app/views/projects/ci/builds/_build.html.haml +++ b/app/views/projects/ci/builds/_build.html.haml @@ -60,7 +60,7 @@ - if pipeline.user = user_avatar(user: pipeline.user, size: 20) - else - %span.api API + %span.monospace API - if admin %td diff --git a/app/views/projects/compare/_form.html.haml b/app/views/projects/compare/_form.html.haml index d24ee4a3251..9744d293c8b 100644 --- a/app/views/projects/compare/_form.html.haml +++ b/app/views/projects/compare/_form.html.haml @@ -8,7 +8,7 @@ .input-group-text = s_("CompareBranches|Source") = hidden_field_tag :to, params[:to] - = button_tag type: 'button', title: params[:to], class: "form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do + = button_tag type: 'button', title: params[:to], class: "form-control compare-dropdown-toggle js-compare-dropdown has-tooltip monospace", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-to-dropdown", selected: params[:to], field_name: :to } do .dropdown-toggle-text.str-truncated= params[:to] || _("Select branch/tag") = render 'shared/ref_dropdown' .compare-ellipsis.inline ... @@ -18,7 +18,7 @@ .input-group-text = s_("CompareBranches|Target") = hidden_field_tag :from, params[:from] - = button_tag type: 'button', title: params[:from], class: "form-control compare-dropdown-toggle js-compare-dropdown has-tooltip git-revision-dropdown-toggle", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do + = button_tag type: 'button', title: params[:from], class: "form-control compare-dropdown-toggle js-compare-dropdown has-tooltip monospace", required: true, data: { refs_url: refs_project_path(@project), toggle: "dropdown", target: ".js-compare-from-dropdown", selected: params[:from], field_name: :from } do .dropdown-toggle-text.str-truncated= params[:from] || _("Select branch/tag") = render 'shared/ref_dropdown' diff --git a/app/views/projects/diffs/_collapsed.html.haml b/app/views/projects/diffs/_collapsed.html.haml index 9bd1255fe00..94dcda38bd6 100644 --- a/app/views/projects/diffs/_collapsed.html.haml +++ b/app/views/projects/diffs/_collapsed.html.haml @@ -1,5 +1,5 @@ - diff_file = viewer.diff_file - url = url_for(safe_params.merge(action: :diff_for_path, old_path: diff_file.old_path, new_path: diff_file.new_path, file_identifier: diff_file.file_identifier)) .nothing-here-block.diff-collapsed{ data: { diff_for_path: url } } - This diff is collapsed. - %button.click-to-expand.btn.btn-link Click to expand it. + = _("This diff is collapsed.") + %button.click-to-expand.btn.btn-link= _("Click to expand it.") diff --git a/app/views/projects/diffs/_diffs.html.haml b/app/views/projects/diffs/_diffs.html.haml index 077c6c68f7e..9de3c2db6e7 100644 --- a/app/views/projects/diffs/_diffs.html.haml +++ b/app/views/projects/diffs/_diffs.html.haml @@ -8,7 +8,7 @@ .files-changed-inner .inline-parallel-buttons.d-none.d-sm-none.d-md-block - if !diffs_expanded? && diff_files.any? { |diff_file| diff_file.collapsed? } - = link_to 'Expand all', url_for(safe_params.merge(expanded: 1, format: nil)), class: 'btn btn-default' + = link_to _('Expand all'), url_for(safe_params.merge(expanded: 1, format: nil)), class: 'btn btn-default' - if show_whitespace_toggle - if current_controller?(:commit) = commit_diff_whitespace_link(diffs.project, @commit, class: 'd-none d-sm-inline-block') diff --git a/app/views/projects/diffs/_file.html.haml b/app/views/projects/diffs/_file.html.haml index b4df654c839..1f90acaabcc 100644 --- a/app/views/projects/diffs/_file.html.haml +++ b/app/views/projects/diffs/_file.html.haml @@ -12,7 +12,7 @@ - blob = diff_file.blob .file-actions.d-none.d-sm-block - if blob&.readable_text? - = link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip', title: "Toggle comments for this file", disabled: @diff_notes_disabled do + = link_to '#', class: 'js-toggle-diff-comments btn active has-tooltip', title: _("Toggle comments for this file"), disabled: @diff_notes_disabled do = icon('comment') \ - if editable_diff?(diff_file) diff --git a/app/views/projects/diffs/_file_header.html.haml b/app/views/projects/diffs/_file_header.html.haml index 4cb04d744dc..6a1bff8640c 100644 --- a/app/views/projects/diffs/_file_header.html.haml +++ b/app/views/projects/diffs/_file_header.html.haml @@ -28,7 +28,7 @@ = diff_file.file_path - if diff_file.deleted_file? - deleted + = _("deleted") = copy_file_path_button(diff_file.file_path) diff --git a/app/views/projects/diffs/_render_error.html.haml b/app/views/projects/diffs/_render_error.html.haml index 47a9ac3ee6b..c3dc47a56a7 100644 --- a/app/views/projects/diffs/_render_error.html.haml +++ b/app/views/projects/diffs/_render_error.html.haml @@ -1,5 +1,5 @@ .nothing-here-block - This #{viewer.switcher_title} could not be displayed because #{diff_render_error_reason(viewer)}. + = _("This %{viewer} could not be displayed because %{reason}.") % { viewer: viewer.switcher_title, reason: diff_render_error_reason(viewer) } You can = diff_render_error_options(viewer).to_sentence(two_words_connector: ' or ', last_word_connector: ', or ').html_safe diff --git a/app/views/projects/diffs/_stats.html.haml b/app/views/projects/diffs/_stats.html.haml index 229a4574eeb..c9057f385da 100644 --- a/app/views/projects/diffs/_stats.html.haml +++ b/app/views/projects/diffs/_stats.html.haml @@ -38,4 +38,4 @@ \-#{diff_file.removed_lines} %li.dropdown-menu-empty-item.hidden %a - No files found. + = _("No files found.") diff --git a/app/views/projects/diffs/_text_file.html.haml b/app/views/projects/diffs/_text_file.html.haml index bc9f6c71fa8..56427a74d56 100644 --- a/app/views/projects/diffs/_text_file.html.haml +++ b/app/views/projects/diffs/_text_file.html.haml @@ -1,7 +1,7 @@ - too_big = diff_file.diff_lines.count > Commit::DIFF_SAFE_LINES - if too_big .suppressed-container - %a.show-suppressed-diff.js-show-suppressed-diff Changes suppressed. Click to show. + %a.show-suppressed-diff.js-show-suppressed-diff= _("Changes suppressed. Click to show.") %table.text-file.diff-wrap-lines.code.js-syntax-highlight.commit-diff{ data: diff_view_data, class: too_big ? 'hide' : '' } = render partial: "projects/diffs/line", diff --git a/app/views/projects/diffs/_warning.html.haml b/app/views/projects/diffs/_warning.html.haml index abe494f2974..2eef599cf84 100644 --- a/app/views/projects/diffs/_warning.html.haml +++ b/app/views/projects/diffs/_warning.html.haml @@ -1,14 +1,12 @@ .alert.alert-warning %h4 - Too many changes to show. + = _("Too many changes to show.") .float-right - if current_controller?(:commit) - = link_to "Plain diff", project_commit_path(@project, @commit, format: :diff), class: "btn btn-sm" - = link_to "Email patch", project_commit_path(@project, @commit, format: :patch), class: "btn btn-sm" + = link_to _("Plain diff"), project_commit_path(@project, @commit, format: :diff), class: "btn btn-sm" + = link_to _("Email patch"), project_commit_path(@project, @commit, format: :patch), class: "btn btn-sm" - elsif current_controller?('projects/merge_requests/diffs') && @merge_request&.persisted? - = link_to "Plain diff", merge_request_path(@merge_request, format: :diff), class: "btn btn-sm" - = link_to "Email patch", merge_request_path(@merge_request, format: :patch), class: "btn btn-sm" + = link_to _("Plain diff"), merge_request_path(@merge_request, format: :diff), class: "btn btn-sm" + = link_to _("Email patch"), merge_request_path(@merge_request, format: :patch), class: "btn btn-sm" %p - To preserve performance only - %strong #{diff_files.size} of #{diff_files.real_size} - files are displayed. + = _("To preserve performance only <strong>%{display_size} of ${real_size}</strong> files are displayed.").html_safe % { display_size: diff_files.size, real_size: diff_files.real_size } diff --git a/app/views/projects/diffs/viewers/_added.html.haml b/app/views/projects/diffs/viewers/_added.html.haml index 8004fe16688..f4c574a018f 100644 --- a/app/views/projects/diffs/viewers/_added.html.haml +++ b/app/views/projects/diffs/viewers/_added.html.haml @@ -1,2 +1,2 @@ .nothing-here-block - File added + = _("File added") diff --git a/app/views/projects/diffs/viewers/_deleted.html.haml b/app/views/projects/diffs/viewers/_deleted.html.haml index 0ac7b4ca8f6..b82ca4d0787 100644 --- a/app/views/projects/diffs/viewers/_deleted.html.haml +++ b/app/views/projects/diffs/viewers/_deleted.html.haml @@ -1,2 +1,2 @@ .nothing-here-block - File deleted + = _("File deleted") diff --git a/app/views/projects/diffs/viewers/_mode_changed.html.haml b/app/views/projects/diffs/viewers/_mode_changed.html.haml index 69bc96bbdad..a8d6f5fe400 100644 --- a/app/views/projects/diffs/viewers/_mode_changed.html.haml +++ b/app/views/projects/diffs/viewers/_mode_changed.html.haml @@ -1,3 +1,3 @@ - diff_file = viewer.diff_file .nothing-here-block - File mode changed from #{diff_file.a_mode} to #{diff_file.b_mode} + = _("File mode changed from %{a_mode} to %{b_mode}") % { a_mode: diff_file.a_mode, b_mode: diff_file.b_mode } diff --git a/app/views/projects/diffs/viewers/_no_preview.html.haml b/app/views/projects/diffs/viewers/_no_preview.html.haml index befe070af2b..b763ac34bf8 100644 --- a/app/views/projects/diffs/viewers/_no_preview.html.haml +++ b/app/views/projects/diffs/viewers/_no_preview.html.haml @@ -1,2 +1,2 @@ .nothing-here-block - No preview for this file type + = _("No preview for this file type") diff --git a/app/views/projects/diffs/viewers/_not_diffable.html.haml b/app/views/projects/diffs/viewers/_not_diffable.html.haml index b2c677ec59c..7c55e272f56 100644 --- a/app/views/projects/diffs/viewers/_not_diffable.html.haml +++ b/app/views/projects/diffs/viewers/_not_diffable.html.haml @@ -1,2 +1,2 @@ .nothing-here-block - This diff was suppressed by a .gitattributes entry. + = _("This diff was suppressed by a .gitattributes entry.") diff --git a/app/views/projects/diffs/viewers/_renamed.html.haml b/app/views/projects/diffs/viewers/_renamed.html.haml index ef05ee38d8d..b7336c356fe 100644 --- a/app/views/projects/diffs/viewers/_renamed.html.haml +++ b/app/views/projects/diffs/viewers/_renamed.html.haml @@ -1,2 +1,2 @@ .nothing-here-block - File moved + = _("File moved") diff --git a/app/views/projects/environments/_external_url.html.haml b/app/views/projects/environments/_external_url.html.haml index b3a82d1ef41..82567f88ccc 100644 --- a/app/views/projects/environments/_external_url.html.haml +++ b/app/views/projects/environments/_external_url.html.haml @@ -1,4 +1,4 @@ - if environment.external_url && can?(current_user, :read_environment, environment) = link_to environment.external_url, target: '_blank', rel: 'noopener noreferrer', class: 'btn external-url has-tooltip qa-view-deployment', title: s_('Environments|Open live environment') do = sprite_icon('external-link') - View deployment + = _("View deployment") diff --git a/app/views/projects/environments/_form.html.haml b/app/views/projects/environments/_form.html.haml index f942b936037..cbd5c54cecc 100644 --- a/app/views/projects/environments/_form.html.haml +++ b/app/views/projects/environments/_form.html.haml @@ -1,22 +1,21 @@ .row.prepend-top-default.append-bottom-default .col-lg-3 %h4.prepend-top-0 - Environments + = _("Environments") %p - Environments allow you to track deployments of your application - = succeed "." do - = link_to "Read more about environments", help_page_path("ci/environments") + - link_to_read_more = link_to(_("Read more about environments"), help_page_path("ci/environments")) + = _("Environments allow you to track deployments of your application %{link_to_read_more}.").html_safe % { link_to_read_more: link_to_read_more } = form_for [@project.namespace.becomes(Namespace), @project, @environment], html: { class: 'col-lg-9' } do |f| = form_errors(@environment) .form-group - = f.label :name, 'Name', class: 'label-bold' + = f.label :name, _('Name'), class: 'label-bold' = f.text_field :name, required: true, class: 'form-control' .form-group - = f.label :external_url, 'External URL', class: 'label-bold' + = f.label :external_url, _('External URL'), class: 'label-bold' = f.url_field :external_url, class: 'form-control' .form-actions - = f.submit 'Save', class: 'btn btn-success' - = link_to 'Cancel', project_environments_path(@project), class: 'btn btn-cancel' + = f.submit _('Save'), class: 'btn btn-save' + = link_to _('Cancel'), project_environments_path(@project), class: 'btn btn-cancel' diff --git a/app/views/projects/environments/_metrics_button.html.haml b/app/views/projects/environments/_metrics_button.html.haml index a4b27575095..c4f19ea79e7 100644 --- a/app/views/projects/environments/_metrics_button.html.haml +++ b/app/views/projects/environments/_metrics_button.html.haml @@ -2,6 +2,6 @@ - return unless can?(current_user, :read_environment, environment) -= link_to environment_metrics_path(environment), title: 'See metrics', class: 'btn metrics-button' do += link_to environment_metrics_path(environment), title: _('See metrics'), class: 'btn metrics-button' do = sprite_icon('chart') - Monitoring + = _("Monitoring") diff --git a/app/views/projects/environments/edit.html.haml b/app/views/projects/environments/edit.html.haml index d6ff3f729b4..d581bd3aeab 100644 --- a/app/views/projects/environments/edit.html.haml +++ b/app/views/projects/environments/edit.html.haml @@ -1,8 +1,8 @@ - @no_container = true -- page_title "Edit", @environment.name, "Environments" +- page_title _("Edit"), @environment.name, _("Environments") %div{ class: container_class } %h3.page-title - Edit environment + = _('Edit environment') %hr = render 'form' diff --git a/app/views/projects/environments/folder.html.haml b/app/views/projects/environments/folder.html.haml index 1ac7dab6775..b7e1cf85cb7 100644 --- a/app/views/projects/environments/folder.html.haml +++ b/app/views/projects/environments/folder.html.haml @@ -1,5 +1,5 @@ - @no_container = true -- page_title "Environments" +- page_title _("Environments") #environments-folder-list-view{ data: { endpoint: folder_project_environments_path(@project, @folder, format: :json), "folder-name" => @folder, diff --git a/app/views/projects/environments/index.html.haml b/app/views/projects/environments/index.html.haml index 7ebe617766f..6c0ad34c486 100644 --- a/app/views/projects/environments/index.html.haml +++ b/app/views/projects/environments/index.html.haml @@ -1,6 +1,6 @@ - @no_container = true -- page_title "Environments" -- add_to_breadcrumbs("Pipelines", project_pipelines_path(@project)) +- page_title _("Environments") +- add_to_breadcrumbs(_("Pipelines"), project_pipelines_path(@project)) #environments-list-view{ data: { environments_data: environments_list_data, "can-create-deployment" => can?(current_user, :create_deployment, @project).to_s, diff --git a/app/views/projects/environments/metrics.html.haml b/app/views/projects/environments/metrics.html.haml index 4222963a754..7b847a85686 100644 --- a/app/views/projects/environments/metrics.html.haml +++ b/app/views/projects/environments/metrics.html.haml @@ -1,5 +1,5 @@ - @no_container = true -- page_title "Metrics for environment", @environment.name +- page_title _("Metrics for environment"), @environment.name .prometheus-container{ class: container_class } #prometheus-graphs{ data: metrics_data(@project, @environment) } diff --git a/app/views/projects/environments/new.html.haml b/app/views/projects/environments/new.html.haml index 62b08e85e22..c1067fdff78 100644 --- a/app/views/projects/environments/new.html.haml +++ b/app/views/projects/environments/new.html.haml @@ -1,9 +1,9 @@ - @no_container = true -- breadcrumb_title "Environments" -- page_title 'New Environment' +- breadcrumb_title _("Environments") +- page_title _("New Environment") %div{ class: container_class } %h3.page-title - New environment + = _("New environment") %hr = render 'form' diff --git a/app/views/projects/environments/show.html.haml b/app/views/projects/environments/show.html.haml index 8c5b6e089ea..d59b2d4fb01 100644 --- a/app/views/projects/environments/show.html.haml +++ b/app/views/projects/environments/show.html.haml @@ -1,7 +1,7 @@ - @no_container = true -- add_to_breadcrumbs "Environments", project_environments_path(@project) +- add_to_breadcrumbs _("Environments"), project_environments_path(@project) - breadcrumb_title @environment.name -- page_title "Environments" +- page_title _("Environments") %div{ class: container_class } - if can?(current_user, :stop_environment, @environment) @@ -10,7 +10,7 @@ .modal-content .modal-header %h4.modal-title.d-flex.mw-100 - Stopping + = s_("Environments|Stopping") %span.has-tooltip.text-truncate.ml-1.mr-1.flex-fill{ title: @environment.name, data: { container: '#stop-environment-modal' } } = @environment.name ? @@ -40,7 +40,7 @@ = render 'projects/environments/external_url', environment: @environment = render 'projects/environments/metrics_button', environment: @environment - if can?(current_user, :update_environment, @environment) - = link_to 'Edit', edit_project_environment_path(@project, @environment), class: 'btn' + = link_to _('Edit'), edit_project_environment_path(@project, @environment), class: 'btn' - if can?(current_user, :stop_environment, @environment) = button_tag class: 'btn btn-danger', type: 'button', data: { toggle: 'modal', target: '#stop-environment-modal' } do @@ -52,21 +52,19 @@ .empty-state .text-content %h4.state-title - You don't have any deployments right now. + = _("You don't have any deployments right now.") %p.blank-state-text - Define environments in the deploy stage(s) in - %code .gitlab-ci.yml - to track deployments here. + = _("Define environments in the deploy stage(s) in <code>.gitlab-ci.yml</code> to track deployments here.").html_safe .text-center = link_to _("Read more"), help_page_path("ci/environments"), class: "btn btn-success" - else .table-holder .ci-table.environments{ role: 'grid' } .gl-responsive-table-row.table-row-header{ role: 'row' } - .table-section.section-10{ role: 'columnheader' } ID - .table-section.section-30{ role: 'columnheader' } Commit - .table-section.section-25{ role: 'columnheader' } Job - .table-section.section-15{ role: 'columnheader' } Created + .table-section.section-10{ role: 'columnheader' }= _('ID') + .table-section.section-30{ role: 'columnheader' }= _('Commit') + .table-section.section-25{ role: 'columnheader' }= _('Job') + .table-section.section-15{ role: 'columnheader' }= _('Created') = render @deployments diff --git a/app/views/projects/environments/terminal.html.haml b/app/views/projects/environments/terminal.html.haml index e40d631a1a1..e837d3d56ac 100644 --- a/app/views/projects/environments/terminal.html.haml +++ b/app/views/projects/environments/terminal.html.haml @@ -1,5 +1,5 @@ - @no_container = true -- page_title "Terminal for environment", @environment.name +- page_title _("Terminal for environment"), @environment.name - content_for :page_specific_javascripts do = stylesheet_link_tag "xterm.css" @@ -9,7 +9,7 @@ .row .col-sm-6 %h3.page-title - Terminal for environment + = _("Terminal for environment") = @environment.name .col-sm-6 diff --git a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml index 639efd34a74..7614d40ba1f 100644 --- a/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml +++ b/app/views/projects/generic_commit_statuses/_generic_commit_status.html.haml @@ -48,7 +48,7 @@ - if generic_commit_status.pipeline.user = user_avatar(user: generic_commit_status.pipeline.user, size: 20) - else - %span.api API + %span.monospace API - if admin %td diff --git a/app/views/projects/graphs/charts.html.haml b/app/views/projects/graphs/charts.html.haml index 3f1974d05f4..b0e22a35fe1 100644 --- a/app/views/projects/graphs/charts.html.haml +++ b/app/views/projects/graphs/charts.html.haml @@ -1,5 +1,5 @@ - @no_container = true -- page_title "Charts" +- page_title _("Contribution Charts") .repo-charts{ class: container_class } %h4.sub-header diff --git a/app/views/projects/merge_requests/creations/_new_compare.html.haml b/app/views/projects/merge_requests/creations/_new_compare.html.haml index 1fd71a38472..11272a67f93 100644 --- a/app/views/projects/merge_requests/creations/_new_compare.html.haml +++ b/app/views/projects/merge_requests/creations/_new_compare.html.haml @@ -21,7 +21,7 @@ selected: f.object.source_project_id .merge-request-select.dropdown = f.hidden_field :source_branch - = dropdown_toggle f.object.source_branch || _("Select source branch"), { toggle: "dropdown", 'field-name': "#{f.object_name}[source_branch]", 'refs-url': refs_project_path(@source_project), selected: f.object.source_branch }, { toggle_class: "js-compare-dropdown js-source-branch git-revision-dropdown-toggle" } + = dropdown_toggle f.object.source_branch || _("Select source branch"), { toggle: "dropdown", 'field-name': "#{f.object_name}[source_branch]", 'refs-url': refs_project_path(@source_project), selected: f.object.source_branch }, { toggle_class: "js-compare-dropdown js-source-branch monospace" } .dropdown-menu.dropdown-menu-selectable.js-source-branch-dropdown.git-revision-dropdown = dropdown_title(_("Select source branch")) = dropdown_filter(_("Search branches")) @@ -49,7 +49,7 @@ selected: f.object.target_project_id .merge-request-select.dropdown = f.hidden_field :target_branch - = dropdown_toggle f.object.target_branch, { toggle: "dropdown", 'field-name': "#{f.object_name}[target_branch]", 'refs-url': refs_project_path(f.object.target_project), selected: f.object.target_branch }, { toggle_class: "js-compare-dropdown js-target-branch git-revision-dropdown-toggle" } + = dropdown_toggle f.object.target_branch, { toggle: "dropdown", 'field-name': "#{f.object_name}[target_branch]", 'refs-url': refs_project_path(f.object.target_project), selected: f.object.target_branch }, { toggle_class: "js-compare-dropdown js-target-branch monospace" } .dropdown-menu.dropdown-menu-selectable.js-target-branch-dropdown.git-revision-dropdown = dropdown_title(_("Select target branch")) = dropdown_filter(_("Search branches")) diff --git a/app/views/projects/mirrors/_authentication_method.html.haml b/app/views/projects/mirrors/_authentication_method.html.haml new file mode 100644 index 00000000000..8dc042d87d1 --- /dev/null +++ b/app/views/projects/mirrors/_authentication_method.html.haml @@ -0,0 +1,36 @@ +- mirror = f.object +- is_push = local_assigns.fetch(:is_push, false) +- auth_options = [[_('Password'), 'password'], [_('SSH public key'), 'ssh_public_key']] +- regen_data = { auth_method: 'ssh_public_key', regenerate_ssh_private_key: true } +- ssh_public_key_present = mirror.ssh_public_key.present? + +.form-group + = f.label :auth_method, _('Authentication method'), class: 'label-bold' + = f.select :auth_method, + options_for_select(auth_options, mirror.auth_method), + {}, { class: "form-control js-mirror-auth-type" } + +.form-group + .collapse.js-well-changing-auth + .changing-auth-method= icon('spinner spin lg') + .well-password-auth.collapse.js-well-password-auth + = f.label :password, _("Password"), class: "label-bold" + = f.password_field :password, value: mirror.password, class: 'form-control' + - unless is_push + .well-ssh-auth.collapse.js-well-ssh-auth + %p.js-ssh-public-key-present{ class: ('collapse' unless ssh_public_key_present) } + = _('Here is the public SSH key that needs to be added to the remote server. For more information, please refer to the documentation.') + %p.js-ssh-public-key-pending{ class: ('collapse' if ssh_public_key_present) } + = _('An SSH key will be automatically generated when the form is submitted. For more information, please refer to the documentation.') + + .clearfix.js-ssh-public-key-wrap{ class: ('collapse' unless ssh_public_key_present) } + %code.prepend-top-10.ssh-public-key + = mirror.ssh_public_key + = clipboard_button(text: mirror.ssh_public_key, title: _("Copy SSH public key to clipboard"), class: 'prepend-top-10 btn-copy-ssh-public-key') + + = button_tag type: 'button', + data: { endpoint: project_mirror_path(@project), project_data: { import_data_attributes: regen_data } }, + class: "btn btn-inverted btn-warning prepend-top-10 js-btn-regenerate-ssh-key#{ ' collapse' unless ssh_public_key_present }" do + = icon('spinner spin', class: 'js-spinner d-none') + = _('Regenerate key') + = render 'projects/mirrors/regenerate_public_ssh_key_confirm_modal' diff --git a/app/views/projects/mirrors/_mirror_repos.html.haml b/app/views/projects/mirrors/_mirror_repos.html.haml index d523df1cd90..2f9bd5b04b6 100644 --- a/app/views/projects/mirrors/_mirror_repos.html.haml +++ b/app/views/projects/mirrors/_mirror_repos.html.haml @@ -59,5 +59,7 @@ .badge.mirror-error-badge{ data: { toggle: 'tooltip', html: 'true' }, title: html_escape(mirror.last_error.try(:strip)) }= _('Error') %td.mirror-action-buttons .btn-group.mirror-actions-group.pull-right{ role: 'group' } + - if mirror.ssh_key_auth? + = clipboard_button(text: mirror.ssh_public_key, class: 'btn btn-default', title: _('Copy SSH public key')) = render 'shared/remote_mirror_update_button', remote_mirror: mirror %button.js-delete-mirror.btn.btn-danger{ type: 'button', data: { mirror_id: mirror.id, toggle: 'tooltip', container: 'body' }, title: _('Remove') }= icon('trash-o') diff --git a/app/views/projects/mirrors/_mirror_repos_form.html.haml b/app/views/projects/mirrors/_mirror_repos_form.html.haml index 93994cb30ac..a2cce83bfab 100644 --- a/app/views/projects/mirrors/_mirror_repos_form.html.haml +++ b/app/views/projects/mirrors/_mirror_repos_form.html.haml @@ -1,18 +1,5 @@ -- protocols = Gitlab::UrlSanitizer::ALLOWED_SCHEMES.join('|') - .form-group = label_tag :mirror_direction, _('Mirror direction'), class: 'label-light' = select_tag :mirror_direction, options_for_select([[_('Push'), 'push']]), class: 'form-control js-mirror-direction', disabled: true -= f.fields_for :remote_mirrors, @project.remote_mirrors.build do |rm_f| - = rm_f.hidden_field :enabled, value: '1' - = rm_f.hidden_field :url, class: 'js-mirror-url-hidden', required: true, pattern: "(#{protocols}):\/\/.+" - = rm_f.hidden_field :only_protected_branches, class: 'js-mirror-protected-hidden' - -.form-group - = label_tag :auth_method, _('Authentication method'), class: 'label-bold' - = select_tag :auth_method, options_for_select([[_('None'), 'none'], [_('Password'), 'password']], 'none'), { class: "form-control js-auth-method" } - -.form-group.js-password-group.collapse - = label_tag :password, _('Password'), class: 'label-bold' - = text_field_tag :password, '', class: 'form-control js-password' += render partial: "projects/mirrors/mirror_repos_push", locals: { f: f } diff --git a/app/views/projects/mirrors/_mirror_repos_push.html.haml b/app/views/projects/mirrors/_mirror_repos_push.html.haml new file mode 100644 index 00000000000..1d9c83653fe --- /dev/null +++ b/app/views/projects/mirrors/_mirror_repos_push.html.haml @@ -0,0 +1,8 @@ +- protocols = Gitlab::UrlSanitizer::ALLOWED_SCHEMES.join('|') + += f.fields_for :remote_mirrors, @project.remote_mirrors.build do |rm_f| + = rm_f.hidden_field :enabled, value: '1' + = rm_f.hidden_field :url, class: 'js-mirror-url-hidden', required: true, pattern: "(#{protocols}):\/\/.+" + = rm_f.hidden_field :only_protected_branches, class: 'js-mirror-protected-hidden' + = render partial: 'projects/mirrors/ssh_host_keys', locals: { f: rm_f } + = render partial: 'projects/mirrors/authentication_method', locals: { f: rm_f, is_push: true } diff --git a/app/views/projects/mirrors/_regenerate_public_ssh_key_confirm_modal.html.haml b/app/views/projects/mirrors/_regenerate_public_ssh_key_confirm_modal.html.haml new file mode 100644 index 00000000000..327552c9b2c --- /dev/null +++ b/app/views/projects/mirrors/_regenerate_public_ssh_key_confirm_modal.html.haml @@ -0,0 +1,13 @@ +.modal.js-regenerate-public-ssh-key-confirm-modal{ tabindex: -1 } + .modal-dialog + .modal-content + .modal-header + %h3.modal-title.page-title + Regenerate public SSH key? + %button.close.js-cancel{ type: 'button', 'data-dismiss': 'modal', 'aria-label' => _('Close') } + %span{ 'aria-hidden': true } × + .modal-body + %p= _('Are you sure you want to regenerate the public key? You will have to update the public key on the remote server before mirroring will work again.') + .form-actions.modal-footer + = button_tag _('Cancel'), type: 'button', class: 'btn js-cancel' + = button_tag _('Regenerate key'), type: 'button', class: 'btn btn-inverted btn-warning js-confirm' diff --git a/app/views/projects/mirrors/_show.html.haml b/app/views/projects/mirrors/_show.html.haml deleted file mode 100644 index 8318d5898a1..00000000000 --- a/app/views/projects/mirrors/_show.html.haml +++ /dev/null @@ -1 +0,0 @@ -= render 'projects/mirrors/mirror_repos' diff --git a/app/views/projects/mirrors/_ssh_host_keys.html.haml b/app/views/projects/mirrors/_ssh_host_keys.html.haml new file mode 100644 index 00000000000..f61aa6ecd11 --- /dev/null +++ b/app/views/projects/mirrors/_ssh_host_keys.html.haml @@ -0,0 +1,33 @@ +- mirror = f.object +- verified_by = mirror.ssh_known_hosts_verified_by +- verified_at = mirror.ssh_known_hosts_verified_at + +.form-group.js-ssh-host-keys-section{ class: ('collapse' unless mirror.ssh_mirror_url?) } + %button.btn.btn-inverted.btn-success.inline.js-detect-host-keys.append-right-10{ type: 'button' } + = icon('spinner spin', class: 'js-spinner d-none') + = _('Detect host keys') + .fingerprint-ssh-info.js-fingerprint-ssh-info.prepend-top-10.append-bottom-10{ class: ('collapse' unless mirror.ssh_mirror_url?) } + %label.label-bold + = _('Fingerprints') + .fingerprints-list.js-fingerprints-list + - mirror.ssh_known_hosts_fingerprints.each do |fp| + %code= fp.fingerprint + - if verified_at + .form-text.text-muted.js-fingerprint-verification + %i.fa.fa-check.fingerprint-verified + Verified by + - if verified_by + = link_to verified_by.name, user_path(verified_by) + - else + = _('a deleted user') + #{time_ago_in_words(verified_at)} ago + + .js-ssh-hosts-advanced.inline + %button.btn.btn-default.btn-show-advanced.show-advanced{ type: 'button' } + %span.label-show + = _('Input host keys manually') + %span.label-hide + = _('Hide host keys manual input') + .js-ssh-known-hosts.collapse.prepend-top-default + = f.label :ssh_known_hosts, _('SSH host keys'), class: 'label-bold' + = f.text_area :ssh_known_hosts, class: 'form-control known-hosts js-known-hosts', rows: '10' diff --git a/app/views/projects/pipelines/charts.html.haml b/app/views/projects/pipelines/charts.html.haml index a86cb14960a..ec17eddba79 100644 --- a/app/views/projects/pipelines/charts.html.haml +++ b/app/views/projects/pipelines/charts.html.haml @@ -1,6 +1,5 @@ - @no_container = true -- breadcrumb_title "CI / CD Charts" -- page_title _("Charts"), _("Pipelines") +- page_title _("CI / CD Charts") %div{ class: container_class } .sub-header-block diff --git a/app/views/projects/pipelines/new.html.haml b/app/views/projects/pipelines/new.html.haml index 5b6823da1f6..f1cdc0a70dd 100644 --- a/app/views/projects/pipelines/new.html.haml +++ b/app/views/projects/pipelines/new.html.haml @@ -13,7 +13,7 @@ = f.label :ref, s_('Pipeline|Create for'), class: 'col-form-label' = hidden_field_tag 'pipeline[ref]', params[:ref] || @project.default_branch = dropdown_tag(params[:ref] || @project.default_branch, - options: { toggle_class: 'js-branch-select wide git-revision-dropdown-toggle', + options: { toggle_class: 'js-branch-select wide monospace', filter: true, dropdown_class: "dropdown-menu-selectable git-revision-dropdown", placeholder: s_("Pipeline|Search branches"), data: { selected: params[:ref] || @project.default_branch, field_name: 'pipeline[ref]' } }) .form-text.text-muted diff --git a/app/views/projects/protected_branches/shared/_dropdown.html.haml b/app/views/projects/protected_branches/shared/_dropdown.html.haml index b3d6068039a..67a6e8efae8 100644 --- a/app/views/projects/protected_branches/shared/_dropdown.html.haml +++ b/app/views/projects/protected_branches/shared/_dropdown.html.haml @@ -1,7 +1,7 @@ = f.hidden_field(:name) = dropdown_tag('Select branch or create wildcard', - options: { toggle_class: 'js-protected-branch-select js-filter-submit wide git-revision-dropdown-toggle qa-protected-branch-select', + options: { toggle_class: 'js-protected-branch-select js-filter-submit wide monospace qa-protected-branch-select', filter: true, dropdown_class: "dropdown-menu-selectable git-revision-dropdown qa-protected-branch-dropdown", placeholder: "Search protected branches", footer_content: true, data: { show_no: true, show_any: true, show_upcoming: true, diff --git a/app/views/projects/protected_tags/shared/_dropdown.html.haml b/app/views/projects/protected_tags/shared/_dropdown.html.haml index f0d7dcccd36..824a8604f6f 100644 --- a/app/views/projects/protected_tags/shared/_dropdown.html.haml +++ b/app/views/projects/protected_tags/shared/_dropdown.html.haml @@ -1,7 +1,7 @@ = f.hidden_field(:name) = dropdown_tag('Select tag or create wildcard', - options: { toggle_class: 'js-protected-tag-select js-filter-submit wide git-revision-dropdown-toggle', + options: { toggle_class: 'js-protected-tag-select js-filter-submit wide monospace', filter: true, dropdown_class: "dropdown-menu-selectable capitalize-header git-revision-dropdown", placeholder: "Search protected tags", footer_content: true, data: { show_no: true, show_any: true, show_upcoming: true, diff --git a/app/views/projects/settings/repository/show.html.haml b/app/views/projects/settings/repository/show.html.haml index a0bcaaf3c54..c14e95a382c 100644 --- a/app/views/projects/settings/repository/show.html.haml +++ b/app/views/projects/settings/repository/show.html.haml @@ -3,7 +3,7 @@ - @content_class = "limit-container-width" unless fluid_layout = render "projects/default_branch/show" -= render "projects/mirrors/show" += render "projects/mirrors/mirror_repos" -# Protected branches & tags use a lot of nested partials. -# The shared parts of the views can be found in the `shared` directory. diff --git a/app/views/repository_check_mailer/notify.html.haml b/app/views/repository_check_mailer/notify.html.haml index 94e5a5d9709..d5327a2b4cc 100644 --- a/app/views/repository_check_mailer/notify.html.haml +++ b/app/views/repository_check_mailer/notify.html.haml @@ -2,7 +2,7 @@ #{@message}. %p - = link_to "See the affected projects in the GitLab admin panel", admin_projects_url(last_repository_check_failed: 1) + = link_to _("See the affected projects in the GitLab admin panel"), admin_projects_url(last_repository_check_failed: 1) %p - You are receiving this message because you are a GitLab administrator for #{Gitlab.config.gitlab.url}. + = _("You are receiving this message because you are a GitLab administrator for %{url}.") % { url: Gitlab.config.gitlab.url } diff --git a/app/views/repository_check_mailer/notify.text.haml b/app/views/repository_check_mailer/notify.text.haml index 0902c50d052..6b64b337b0e 100644 --- a/app/views/repository_check_mailer/notify.text.haml +++ b/app/views/repository_check_mailer/notify.text.haml @@ -1,6 +1,5 @@ #{@message}. \ -View details: #{admin_projects_url(last_repository_check_failed: 1)} += _("View details: %{details_url}") % { details_url: admin_projects_url(last_repository_check_failed: 1) } -You are receiving this message because you are a GitLab administrator -for #{Gitlab.config.gitlab.url}. += _("You are receiving this message because you are a GitLab administrator for %{url}.") % { url: Gitlab.config.gitlab.url } diff --git a/app/views/shared/_labels_row.html.haml b/app/views/shared/_labels_row.html.haml deleted file mode 100644 index 21b37a7c9ae..00000000000 --- a/app/views/shared/_labels_row.html.haml +++ /dev/null @@ -1,5 +0,0 @@ -- labels.each do |label| - %span.label-row.btn-group{ role: "group", aria: { label: label.name }, style: "color: #{text_color_for_bg(label.color)}" } - = link_to_label(label, subject: @project, css_class: 'btn btn-transparent') - %button.btn.btn-transparent.label-remove.js-label-filter-remove{ type: "button", style: "background-color: #{label.color};", data: { label: label.title } } - = icon("times") diff --git a/app/views/u2f/_authenticate.html.haml b/app/views/u2f/_authenticate.html.haml index 1c788b9a737..979f6862de3 100644 --- a/app/views/u2f/_authenticate.html.haml +++ b/app/views/u2f/_authenticate.html.haml @@ -1,18 +1,18 @@ #js-authenticate-u2f -%a.btn.btn-block.btn-info#js-login-2fa-device{ href: '#' } Sign in via 2FA code +%a.btn.btn-block.btn-info#js-login-2fa-device{ href: '#' }= _("Sign in via 2FA code") -# haml-lint:disable InlineJavaScript %script#js-authenticate-u2f-in-progress{ type: "text/template" } - %p Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now. + %p= _("Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now.") %script#js-authenticate-u2f-error{ type: "text/template" } %div - %p <%= error_message %> (error code: <%= error_code %>) - %a.btn.btn-block.btn-warning#js-u2f-try-again Try again? + %p <%= error_message %> (#{_("error code:")} <%= error_code %>) + %a.btn.btn-block.btn-warning#js-u2f-try-again= _("Try again?") %script#js-authenticate-u2f-authenticated{ type: "text/template" } %div - %p We heard back from your U2F device. You have been authenticated. + %p= _("We heard back from your U2F device. You have been authenticated.") = form_tag(new_user_session_path, method: :post, id: 'js-login-u2f-form') do |f| - resource_params = params[resource_name].presence || params = hidden_field_tag 'user[remember_me]', resource_params.fetch(:remember_me, 0) diff --git a/app/views/u2f/_register.html.haml b/app/views/u2f/_register.html.haml index 39d4d82a77d..f6724f72307 100644 --- a/app/views/u2f/_register.html.haml +++ b/app/views/u2f/_register.html.haml @@ -2,39 +2,39 @@ -# haml-lint:disable InlineJavaScript %script#js-register-u2f-not-supported{ type: "text/template" } - %p Your browser doesn't support U2F. Please use Google Chrome desktop (version 41 or newer). + %p= _("Your browser doesn't support U2F. Please use Google Chrome desktop (version 41 or newer).") %script#js-register-u2f-setup{ type: "text/template" } - if current_user.two_factor_otp_enabled? .row.append-bottom-10 .col-md-4 - %button#js-setup-u2f-device.btn.btn-info.btn-block Set up new U2F device + %button#js-setup-u2f-device.btn.btn-info.btn-block= _("Set up new U2F device") .col-md-8 - %p Your U2F device needs to be set up. Plug it in (if not already) and click the button on the left. + %p= _("Your U2F device needs to be set up. Plug it in (if not already) and click the button on the left.") - else .row.append-bottom-10 .col-md-4 - %button#js-setup-u2f-device.btn.btn-info.btn-block{ disabled: true } Set up new U2F device + %button#js-setup-u2f-device.btn.btn-info.btn-block{ disabled: true }= _("Set up new U2F device") .col-md-8 - %p.text-warning You need to register a two-factor authentication app before you can set up a U2F device. + %p.text-warning= _("You need to register a two-factor authentication app before you can set up a U2F device.") %script#js-register-u2f-in-progress{ type: "text/template" } - %p Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now. + %p= _("Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now.") %script#js-register-u2f-error{ type: "text/template" } %div %p - %span <%= error_message %> (error code: <%= error_code %>) - %a.btn.btn-warning#js-u2f-try-again Try again? + %span <%= error_message %> (#{_("error code:")} <%= error_code %>) + %a.btn.btn-warning#js-u2f-try-again= _("Try again?") %script#js-register-u2f-registered{ type: "text/template" } .row.append-bottom-10 .col-md-12 - %p Your device was successfully set up! Give it a name and register it with the GitLab server. + %p= _("Your device was successfully set up! Give it a name and register it with the GitLab server.") = form_tag(create_u2f_profile_two_factor_auth_path, method: :post) do .row.append-bottom-10 .col-md-3 - = text_field_tag 'u2f_registration[name]', nil, class: 'form-control', placeholder: "Pick a name" + = text_field_tag 'u2f_registration[name]', nil, class: 'form-control', placeholder: _("Pick a name") .col-md-3 = hidden_field_tag 'u2f_registration[device_response]', nil, class: 'form-control', required: true, id: "js-device-response" - = submit_tag "Register U2F device", class: "btn btn-success" + = submit_tag _("Register U2F device"), class: "btn btn-success" diff --git a/app/views/users/_overview.html.haml b/app/views/users/_overview.html.haml index cf525f2bb2d..b5bc1180290 100644 --- a/app/views/users/_overview.html.haml +++ b/app/views/users/_overview.html.haml @@ -1,32 +1,30 @@ .row + .col-12 + .calendar-block.prepend-top-default.append-bottom-default + .user-calendar.d-none.d-sm-block{ data: { calendar_path: user_calendar_path(@user, :json), calendar_activities_path: user_calendar_activities_path, utc_offset: Time.zone.utc_offset } } + %h4.center.light + = spinner nil, true + .user-calendar-activities.d-none.d-sm-block +.row .col-md-12.col-lg-6 - .calendar-block - .content-block.hide-bottom-border - %h4 - = s_('UserProfile|Activity') - .user-calendar.d-none.d-sm-block.text-left{ data: { calendar_path: user_calendar_path(@user, :json), calendar_activities_path: user_calendar_activities_path, utc_offset: Time.zone.utc_offset } } - %h4.center.light - %i.fa.fa-spinner.fa-spin - .user-calendar-activities.d-none.d-sm-block - - if can?(current_user, :read_cross_project) .activities-block - .border-bottom.prepend-top-16 - %h5 - = s_('UserProfile|Recent contributions') + .prepend-top-16 + .d-flex.align-items-center.border-bottom + %h4.flex-grow + = s_('UserProfile|Activity') + = link_to s_('UserProfile|View all'), user_activity_path, class: "hide js-view-all" .overview-content-list{ data: { href: user_path } } .center.light.loading - %i.fa.fa-spinner.fa-spin - .prepend-top-10 - = link_to s_('UserProfile|View all'), user_activity_path, class: "hide js-view-all" + = spinner nil, true .col-md-12.col-lg-6 .projects-block - .border-bottom.prepend-top-16 - %h4 - = s_('UserProfile|Personal projects') + .prepend-top-16 + .d-flex.align-items-center.border-bottom + %h4.flex-grow + = s_('UserProfile|Personal projects') + = link_to s_('UserProfile|View all'), user_projects_path, class: "hide js-view-all" .overview-content-list{ data: { href: user_projects_path } } .center.light.loading - %i.fa.fa-spinner.fa-spin - .prepend-top-10 - = link_to s_('UserProfile|View all'), user_projects_path, class: "hide js-view-all" + = spinner nil, true diff --git a/app/views/users/show.html.haml b/app/views/users/show.html.haml index d6c8420b744..d11476738e4 100644 --- a/app/views/users/show.html.haml +++ b/app/views/users/show.html.haml @@ -124,12 +124,6 @@ - if profile_tab?(:activity) #activity.tab-pane - .row-content-block.calendar-block.white.second-block.d-none.d-sm-block - .user-calendar{ data: { calendar_path: user_calendar_path(@user, :json), calendar_activities_path: user_calendar_activities_path, utc_offset: Time.zone.utc_offset } } - %h4.center.light - %i.fa.fa-spinner.fa-spin - .user-calendar-activities - - if can?(current_user, :read_cross_project) %h4.prepend-top-20 = s_('UserProfile|Most Recent Activity') diff --git a/changelogs/unreleased/18933-render-index-as-readme.yml b/changelogs/unreleased/18933-render-index-as-readme.yml deleted file mode 100644 index 44acc2c719a..00000000000 --- a/changelogs/unreleased/18933-render-index-as-readme.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Make index.* render like README.* when it's present in a repository -merge_request: 22639 -author: Jakub Jirutka -type: added diff --git a/changelogs/unreleased/21480-parallel-job-keyword-mvc.yml b/changelogs/unreleased/21480-parallel-job-keyword-mvc.yml deleted file mode 100644 index 7ac2410b18c..00000000000 --- a/changelogs/unreleased/21480-parallel-job-keyword-mvc.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Implement parallel job keyword. -merge_request: 22631 -author: -type: added diff --git a/changelogs/unreleased/21970-fix-bamboo-results.yml b/changelogs/unreleased/21970-fix-bamboo-results.yml deleted file mode 100644 index 2fbb354c477..00000000000 --- a/changelogs/unreleased/21970-fix-bamboo-results.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Correctly process Bamboo API result array" -merge_request: 21970 -author: Alex Lossent -type: fixed
\ No newline at end of file diff --git a/changelogs/unreleased/22311-fix-duplicated-key-in-license-management-job.yml b/changelogs/unreleased/22311-fix-duplicated-key-in-license-management-job.yml deleted file mode 100644 index ab64a1387d9..00000000000 --- a/changelogs/unreleased/22311-fix-duplicated-key-in-license-management-job.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "fix duplicated key in license management job auto devops gitlab ci template" -merge_request: 22311 -author: Adam Lemanski -type: fixed diff --git a/changelogs/unreleased/22717-single-letter-identifier-external-issue-tracker.yml b/changelogs/unreleased/22717-single-letter-identifier-external-issue-tracker.yml deleted file mode 100644 index 3f7a0d9204e..00000000000 --- a/changelogs/unreleased/22717-single-letter-identifier-external-issue-tracker.yml +++ /dev/null @@ -1,5 +0,0 @@ ----
-title: "Allowing issues with single letter identifiers to be linked to external issue tracker (f.ex T-123)"
-merge_request: 22717
-author: Dídac Rodríguez Arbonès
-type: changed
\ No newline at end of file diff --git a/changelogs/unreleased/25140-disable-stop-button.yml b/changelogs/unreleased/25140-disable-stop-button.yml deleted file mode 100644 index a6ef52c3155..00000000000 --- a/changelogs/unreleased/25140-disable-stop-button.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Disables stop environment button while the deploy is in progress -merge_request: -author: -type: other diff --git a/changelogs/unreleased/26723-discussion-filters.yml b/changelogs/unreleased/26723-discussion-filters.yml deleted file mode 100644 index 3abe95bf30d..00000000000 --- a/changelogs/unreleased/26723-discussion-filters.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Filter notes by comments or activity for issues and merge requests -merge_request: -author: -type: added diff --git a/changelogs/unreleased/27231-add-license-data-to-projects-endpoint.yml b/changelogs/unreleased/27231-add-license-data-to-projects-endpoint.yml deleted file mode 100644 index f5ed6ccf6df..00000000000 --- a/changelogs/unreleased/27231-add-license-data-to-projects-endpoint.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add license data to projects endpoint -merge_request: 21606 -author: J.D. Bean (@jdbean) -type: added diff --git a/changelogs/unreleased/28249-add-pagination.yml b/changelogs/unreleased/28249-add-pagination.yml deleted file mode 100644 index df15094405a..00000000000 --- a/changelogs/unreleased/28249-add-pagination.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds pagination to pipelines table in merge request page -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/32959-update-todo-icon.yml b/changelogs/unreleased/32959-update-todo-icon.yml deleted file mode 100644 index f08fd6aa89f..00000000000 --- a/changelogs/unreleased/32959-update-todo-icon.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update Todo icons in collapsed sidebar for Issues and MRs -merge_request: 22534 -author: -type: changed diff --git a/changelogs/unreleased/34758-create-group-clusters.yml b/changelogs/unreleased/34758-create-group-clusters.yml deleted file mode 100644 index 50efde3cac3..00000000000 --- a/changelogs/unreleased/34758-create-group-clusters.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds model and migrations to enable group level clusters -merge_request: 22307 -author: -type: other diff --git a/changelogs/unreleased/37727-fix-file-delete-redirect.yml b/changelogs/unreleased/37727-fix-file-delete-redirect.yml deleted file mode 100644 index 3fc3965f1f0..00000000000 --- a/changelogs/unreleased/37727-fix-file-delete-redirect.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: On deletion of a file in sub directory in web IDE redirect to the sub directory - instead of project root -merge_request: 21465 -author: George Thomas @thegeorgeous -type: changed diff --git a/changelogs/unreleased/38304-username-API-call-case-sensitive.yml b/changelogs/unreleased/38304-username-API-call-case-sensitive.yml deleted file mode 100644 index b89778b6c23..00000000000 --- a/changelogs/unreleased/38304-username-API-call-case-sensitive.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Use case insensitve username lookups" -merge_request: 21728 -author: William George -type: fixed
\ No newline at end of file diff --git a/changelogs/unreleased/40085-add-a-create_merge_request-quick-action.yml b/changelogs/unreleased/40085-add-a-create_merge_request-quick-action.yml new file mode 100644 index 00000000000..e1614ac7669 --- /dev/null +++ b/changelogs/unreleased/40085-add-a-create_merge_request-quick-action.yml @@ -0,0 +1,5 @@ +--- +title: Creates /create_merge_request quickaction +merge_request: 22485 +author: Jacopo Beschi @jacopo-beschi +type: added diff --git a/changelogs/unreleased/40372-prometheus-dashboard-broken-on-firefox.yml b/changelogs/unreleased/40372-prometheus-dashboard-broken-on-firefox.yml deleted file mode 100644 index 8376fac7abf..00000000000 --- a/changelogs/unreleased/40372-prometheus-dashboard-broken-on-firefox.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix prometheus graphs in firefox -merge_request: 22400 -author: -type: fixed diff --git a/changelogs/unreleased/41545-gitlab-merge-request-status-could-not-connect-to-the-ci-server-please-check-your-settings-and-try-again.yml b/changelogs/unreleased/41545-gitlab-merge-request-status-could-not-connect-to-the-ci-server-please-check-your-settings-and-try-again.yml deleted file mode 100644 index 103419c1185..00000000000 --- a/changelogs/unreleased/41545-gitlab-merge-request-status-could-not-connect-to-the-ci-server-please-check-your-settings-and-try-again.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Reword error message for internal CI unknown pipeline status -merge_request: 22474 -author: -type: changed diff --git a/changelogs/unreleased/42611-removed-branch-link.yml b/changelogs/unreleased/42611-removed-branch-link.yml deleted file mode 100644 index 03a206871b4..00000000000 --- a/changelogs/unreleased/42611-removed-branch-link.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Only render link to branch when branch still exists in pipeline page -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/42790-improve-feedback-for-internal-git-access-checks-timeouts.yml b/changelogs/unreleased/42790-improve-feedback-for-internal-git-access-checks-timeouts.yml deleted file mode 100644 index d58d8da3a0e..00000000000 --- a/changelogs/unreleased/42790-improve-feedback-for-internal-git-access-checks-timeouts.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds trace of each access check when git push times out -merge_request: 22265 -author: -type: added diff --git a/changelogs/unreleased/43422-Update-images-in-group-docs.yml b/changelogs/unreleased/43422-Update-images-in-group-docs.yml deleted file mode 100644 index 4c4146589ad..00000000000 --- a/changelogs/unreleased/43422-Update-images-in-group-docs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update images in group docs -merge_request: 22031 -author: Marc Schwede -type: other diff --git a/changelogs/unreleased/43521-keep-personal-emails-private.yml b/changelogs/unreleased/43521-keep-personal-emails-private.yml deleted file mode 100644 index 0f0bede6482..00000000000 --- a/changelogs/unreleased/43521-keep-personal-emails-private.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds option to override commit email with a noreply private email -merge_request: 22560 -author: -type: added diff --git a/changelogs/unreleased/44012-filter-reactions-none-any.yml b/changelogs/unreleased/44012-filter-reactions-none-any.yml deleted file mode 100644 index 5d685010f8a..00000000000 --- a/changelogs/unreleased/44012-filter-reactions-none-any.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add None / Any options to reactions filter -merge_request: 22638 -author: Heinrich Lee Yu -type: added diff --git a/changelogs/unreleased/45068-no-longer-require-a-deploy-to-start-prometheus-monitoring.yml b/changelogs/unreleased/45068-no-longer-require-a-deploy-to-start-prometheus-monitoring.yml deleted file mode 100644 index 6a305099dde..00000000000 --- a/changelogs/unreleased/45068-no-longer-require-a-deploy-to-start-prometheus-monitoring.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: No longer require a deploy to start Prometheus monitoring -merge_request: 22401 -author: -type: changed diff --git a/changelogs/unreleased/45669-table-in-jobs-on-pipeline.yml b/changelogs/unreleased/45669-table-in-jobs-on-pipeline.yml deleted file mode 100644 index 97052d01b24..00000000000 --- a/changelogs/unreleased/45669-table-in-jobs-on-pipeline.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Hide all tables on Pipeline when no Jobs for the Pipeline -merge_request: 18540 -author: Takuya Noguchi -type: fixed diff --git a/changelogs/unreleased/46884-remove-card-title.yml b/changelogs/unreleased/46884-remove-card-title.yml deleted file mode 100644 index 95f08a67638..00000000000 --- a/changelogs/unreleased/46884-remove-card-title.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove .card-title from .card-header for BS4 migration -merge_request: 19335 -author: Takuya Noguchi -type: other diff --git a/changelogs/unreleased/47008-issue-board-card-design.yml b/changelogs/unreleased/47008-issue-board-card-design.yml deleted file mode 100644 index 39238687943..00000000000 --- a/changelogs/unreleased/47008-issue-board-card-design.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Issue board card design -merge_request: 21229 -author: -type: changed diff --git a/changelogs/unreleased/48494-fix-merge-request-buttons-spacing.yml b/changelogs/unreleased/48494-fix-merge-request-buttons-spacing.yml deleted file mode 100644 index 41cc024b8ac..00000000000 --- a/changelogs/unreleased/48494-fix-merge-request-buttons-spacing.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix incorrect spacing between buttons when commenting on a MR. -merge_request: 22135 -author: -type: fixed diff --git a/changelogs/unreleased/48684-sort-projects-by-stars-in-groups.yml b/changelogs/unreleased/48684-sort-projects-by-stars-in-groups.yml deleted file mode 100644 index 01681adab24..00000000000 --- a/changelogs/unreleased/48684-sort-projects-by-stars-in-groups.yml +++ /dev/null @@ -1,4 +0,0 @@ ---- -title: Add new sort option "most_stars" to "Group > Children" pages -merge_request: 22121 -author: Rene Hennig diff --git a/changelogs/unreleased/48731-show-empty-state-on-wiki-only-projects.yml b/changelogs/unreleased/48731-show-empty-state-on-wiki-only-projects.yml deleted file mode 100644 index 8fd1b48b00e..00000000000 --- a/changelogs/unreleased/48731-show-empty-state-on-wiki-only-projects.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Update the empty state on wiki-only projects to display an empty state that - is more consistent with the rest of the system. -merge_request: 22262 -author: -type: changed diff --git a/changelogs/unreleased/48889-message-for-were-merged-into.yml b/changelogs/unreleased/48889-message-for-were-merged-into.yml deleted file mode 100644 index 552b8826829..00000000000 --- a/changelogs/unreleased/48889-message-for-were-merged-into.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix 'merged with' UI being displayed when merge request has no merge commit -merge_request: 22022 -author: -type: fixed diff --git a/changelogs/unreleased/49403-redesign-activity-feed.yml b/changelogs/unreleased/49403-redesign-activity-feed.yml deleted file mode 100644 index cec53a3ef5a..00000000000 --- a/changelogs/unreleased/49403-redesign-activity-feed.yml +++ /dev/null @@ -1,4 +0,0 @@ -title: Redesign activity feed -merge_request: 22217 -author: -type: other diff --git a/changelogs/unreleased/49417-improve-settings-pages-design-by-prioritizing-content-group-settings.yml b/changelogs/unreleased/49417-improve-settings-pages-design-by-prioritizing-content-group-settings.yml deleted file mode 100644 index 8ded24a1cd0..00000000000 --- a/changelogs/unreleased/49417-improve-settings-pages-design-by-prioritizing-content-group-settings.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update group settings/edit page to new design -merge_request: 21115 -author: -type: other diff --git a/changelogs/unreleased/49565-ssh-push-mirroring.yml b/changelogs/unreleased/49565-ssh-push-mirroring.yml new file mode 100644 index 00000000000..2dfeffa4088 --- /dev/null +++ b/changelogs/unreleased/49565-ssh-push-mirroring.yml @@ -0,0 +1,5 @@ +--- +title: Allow SSH public-key authentication for push mirroring +merge_request: 22982 +author: +type: added diff --git a/changelogs/unreleased/49591-use-cached-readme-blobs.yml b/changelogs/unreleased/49591-use-cached-readme-blobs.yml deleted file mode 100644 index 59098d2733a..00000000000 --- a/changelogs/unreleased/49591-use-cached-readme-blobs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use cached readme contents when available -merge_request: 22325 -author: -type: performance diff --git a/changelogs/unreleased/50185-fix-broken-file-name-navigation.yml b/changelogs/unreleased/50185-fix-broken-file-name-navigation.yml deleted file mode 100644 index d1b341af457..00000000000 --- a/changelogs/unreleased/50185-fix-broken-file-name-navigation.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix broken file name navigation on MRs -merge_request: 22109 -author: -type: fixed diff --git a/changelogs/unreleased/50728-re-arrange-help-related-user-menu-items-into-new-help-menu.yml b/changelogs/unreleased/50728-re-arrange-help-related-user-menu-items-into-new-help-menu.yml deleted file mode 100644 index dfda65ef91b..00000000000 --- a/changelogs/unreleased/50728-re-arrange-help-related-user-menu-items-into-new-help-menu.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Re-arrange help-related user menu items into new Help menu -merge_request: 22195 -author: -type: added diff --git a/changelogs/unreleased/50904-job-log.yml b/changelogs/unreleased/50904-job-log.yml deleted file mode 100644 index 31eb2d56b77..00000000000 --- a/changelogs/unreleased/50904-job-log.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Transform job page into a single Vue+Vuex application -merge_request: -author: -type: other diff --git a/changelogs/unreleased/50962-create-new-group-rename-form-fields-and-update-ui.yml b/changelogs/unreleased/50962-create-new-group-rename-form-fields-and-update-ui.yml deleted file mode 100644 index db374e10c36..00000000000 --- a/changelogs/unreleased/50962-create-new-group-rename-form-fields-and-update-ui.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Create new group: Rename form fields and update UI' -merge_request: -author: -type: other diff --git a/changelogs/unreleased/51259-ci-cd-gitlab-ui.yml b/changelogs/unreleased/51259-ci-cd-gitlab-ui.yml deleted file mode 100644 index a15f1c033b3..00000000000 --- a/changelogs/unreleased/51259-ci-cd-gitlab-ui.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Uses gitlab-ui components in jobs components -merge_request: -author: -type: other diff --git a/changelogs/unreleased/51306-fix-inaccessible-dropdown-for-codeless-projects.yml b/changelogs/unreleased/51306-fix-inaccessible-dropdown-for-codeless-projects.yml deleted file mode 100644 index 13e3bb66430..00000000000 --- a/changelogs/unreleased/51306-fix-inaccessible-dropdown-for-codeless-projects.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix inaccessible dropdown for code-less projects -merge_request: 22137 -author: -type: other diff --git a/changelogs/unreleased/51335-fail-early-when-user-cannot-be-identified.yml b/changelogs/unreleased/51335-fail-early-when-user-cannot-be-identified.yml deleted file mode 100644 index a042debc28f..00000000000 --- a/changelogs/unreleased/51335-fail-early-when-user-cannot-be-identified.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: If user was not found, service hooks won't run on post receive background job -merge_request: 22519 -author: -type: fixed diff --git a/changelogs/unreleased/51386-broken-border-reports.yml b/changelogs/unreleased/51386-broken-border-reports.yml deleted file mode 100644 index 720b4edc467..00000000000 --- a/changelogs/unreleased/51386-broken-border-reports.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixes broken borders for reports section in MR widget -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/51527-xss-in-mr-source-branch.yml b/changelogs/unreleased/51527-xss-in-mr-source-branch.yml deleted file mode 100644 index dae277b6413..00000000000 --- a/changelogs/unreleased/51527-xss-in-mr-source-branch.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix XSS in merge request source branch name -merge_request: -author: -type: security diff --git a/changelogs/unreleased/51620-cannot-add-label-to-issue-from-board.yml b/changelogs/unreleased/51620-cannot-add-label-to-issue-from-board.yml deleted file mode 100644 index 9e99779d352..00000000000 --- a/changelogs/unreleased/51620-cannot-add-label-to-issue-from-board.yml +++ /dev/null @@ -1,4 +0,0 @@ -title: Make Issue Board sidebar show project-specific labels based on selected Issue -merge_request: 22475 -author: -type: fixed diff --git a/changelogs/unreleased/51716-add-kubernetes-namespace-background-migration.yml b/changelogs/unreleased/51716-add-kubernetes-namespace-background-migration.yml deleted file mode 100644 index 89a91e8deaf..00000000000 --- a/changelogs/unreleased/51716-add-kubernetes-namespace-background-migration.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add background migration to populate Kubernetes namespaces -merge_request: 22433 -author: -type: added diff --git a/changelogs/unreleased/51716-add-kubernetes-namespace-model.yml b/changelogs/unreleased/51716-add-kubernetes-namespace-model.yml deleted file mode 100644 index ad43c512ba3..00000000000 --- a/changelogs/unreleased/51716-add-kubernetes-namespace-model.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Introduce new model to persist specific cluster information -merge_request: 22404 -author: -type: added diff --git a/changelogs/unreleased/51716-create-kube-namespace.yml b/changelogs/unreleased/51716-create-kube-namespace.yml deleted file mode 100644 index 851e19c0a38..00000000000 --- a/changelogs/unreleased/51716-create-kube-namespace.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Extend RBAC by having a service account restricted to project's namespace -merge_request: 22011 -author: -type: other diff --git a/changelogs/unreleased/51955-change-single-item-breadcrumbs-to-page-titles.yml b/changelogs/unreleased/51955-change-single-item-breadcrumbs-to-page-titles.yml deleted file mode 100644 index 63fa84d2d51..00000000000 --- a/changelogs/unreleased/51955-change-single-item-breadcrumbs-to-page-titles.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Change single-item breadcrumbs to page titles -merge_request: 22155 -author: -type: changed diff --git a/changelogs/unreleased/51972-prometheus-not-showing-as-installed-even-though-it-is.yml b/changelogs/unreleased/51972-prometheus-not-showing-as-installed-even-though-it-is.yml deleted file mode 100644 index 73b035fca00..00000000000 --- a/changelogs/unreleased/51972-prometheus-not-showing-as-installed-even-though-it-is.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Show available clusters when installed or updated -merge_request: 22356 -author: -type: fixed diff --git a/changelogs/unreleased/52059-filter-milestone-by-none-any.yml b/changelogs/unreleased/52059-filter-milestone-by-none-any.yml deleted file mode 100644 index 5511440c0b9..00000000000 --- a/changelogs/unreleased/52059-filter-milestone-by-none-any.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Added `Any` option to milestones filter -merge_request: 22351 -author: Heinrich Lee Yu -type: added diff --git a/changelogs/unreleased/52115-Link-button-in-markdown-editor-should-recognize-URLs.yml b/changelogs/unreleased/52115-Link-button-in-markdown-editor-should-recognize-URLs.yml deleted file mode 100644 index 8521335c2ea..00000000000 --- a/changelogs/unreleased/52115-Link-button-in-markdown-editor-should-recognize-URLs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Link button in markdown editor recognize URLs -merge_request: 1983 -author: Johann Hubert Sonntagbauer -type: changed diff --git a/changelogs/unreleased/52122-fix-broken-whitespace-button.yml b/changelogs/unreleased/52122-fix-broken-whitespace-button.yml deleted file mode 100644 index 3f261eb2ac5..00000000000 --- a/changelogs/unreleased/52122-fix-broken-whitespace-button.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix broken "Show whitespace changes" button on MRs. -merge_request: 22539 -author: -type: fixed diff --git a/changelogs/unreleased/52147-loading-state.yml b/changelogs/unreleased/52147-loading-state.yml deleted file mode 100644 index 5ae844073f7..00000000000 --- a/changelogs/unreleased/52147-loading-state.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Removes extra border from test reports in the merge request widget -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/52193-Pipeline-graph-is-not-vertically-aligned-in-commit-page.yml b/changelogs/unreleased/52193-Pipeline-graph-is-not-vertically-aligned-in-commit-page.yml deleted file mode 100644 index 2d3ac49807a..00000000000 --- a/changelogs/unreleased/52193-Pipeline-graph-is-not-vertically-aligned-in-commit-page.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Vertical align Pipeline Graph in Commit Page -merge_request: 22173 -author: Johann Hubert Sonntagbauer -type: fixed diff --git a/changelogs/unreleased/52202-consider-moving-isjobstuck-verification-to-backend.yml b/changelogs/unreleased/52202-consider-moving-isjobstuck-verification-to-backend.yml deleted file mode 100644 index 0efd97d91b8..00000000000 --- a/changelogs/unreleased/52202-consider-moving-isjobstuck-verification-to-backend.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Renders stuck block when runners are stuck -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/52299-follow-up-from-resolve-add-status-message-from-within-user-menu.yml b/changelogs/unreleased/52299-follow-up-from-resolve-add-status-message-from-within-user-menu.yml deleted file mode 100644 index 8ea0693037f..00000000000 --- a/changelogs/unreleased/52299-follow-up-from-resolve-add-status-message-from-within-user-menu.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix size of emojis of user status in user menu -merge_request: 22194 -author: -type: fixed diff --git a/changelogs/unreleased/52300-pool-repositories.yml b/changelogs/unreleased/52300-pool-repositories.yml deleted file mode 100644 index 5435f3aa21f..00000000000 --- a/changelogs/unreleased/52300-pool-repositories.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Start tracking shards and pool repositories in the database -merge_request: 22482 -author: -type: other diff --git a/changelogs/unreleased/52353-keyboard-navigation-project-slug-is-not-focused-on-new-project-page.yml b/changelogs/unreleased/52353-keyboard-navigation-project-slug-is-not-focused-on-new-project-page.yml deleted file mode 100644 index ffcc0cc08a0..00000000000 --- a/changelogs/unreleased/52353-keyboard-navigation-project-slug-is-not-focused-on-new-project-page.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Focus project slug on tab navigation -merge_request: 22198 -author: -type: other diff --git a/changelogs/unreleased/52367-cleanup-web-hooks-columns.yml b/changelogs/unreleased/52367-cleanup-web-hooks-columns.yml deleted file mode 100644 index d1f3ca83613..00000000000 --- a/changelogs/unreleased/52367-cleanup-web-hooks-columns.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove legacy unencrypted webhook columns from the database -merge_request: 22199 -author: -type: changed diff --git a/changelogs/unreleased/52382-filter-milestone-api-none-any.yml b/changelogs/unreleased/52382-filter-milestone-api-none-any.yml deleted file mode 100644 index a7559a25645..00000000000 --- a/changelogs/unreleased/52382-filter-milestone-api-none-any.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Standardize milestones filter in APIs to None / Any -merge_request: 22637 -author: Heinrich Lee Yu -type: changed diff --git a/changelogs/unreleased/52383-ui-filter-assignee-none-any.yml b/changelogs/unreleased/52383-ui-filter-assignee-none-any.yml deleted file mode 100644 index adf153f33ce..00000000000 --- a/changelogs/unreleased/52383-ui-filter-assignee-none-any.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add None/Any option for assignee_id in search bar -merge_request: 22599 -author: Heinrich Lee Yu -type: added diff --git a/changelogs/unreleased/52384-api-filter-assignee-none-any.yml b/changelogs/unreleased/52384-api-filter-assignee-none-any.yml deleted file mode 100644 index 9acec04d946..00000000000 --- a/changelogs/unreleased/52384-api-filter-assignee-none-any.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add None/Any option for assignee_id in Issues and Merge Requests API -merge_request: 22598 -author: Heinrich Lee Yu -type: added diff --git a/changelogs/unreleased/52408-pip-cache-dir-to-cache-python-dependencies.yml b/changelogs/unreleased/52408-pip-cache-dir-to-cache-python-dependencies.yml deleted file mode 100644 index 19d3e35c15c..00000000000 --- a/changelogs/unreleased/52408-pip-cache-dir-to-cache-python-dependencies.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use the standard PIP_CACHE_DIR for Python dependency caching template -merge_request: 22211 -author: Takuya Noguchi -type: fixed diff --git a/changelogs/unreleased/52421-show-canary-no-canary-in-the-performance-bar.yml b/changelogs/unreleased/52421-show-canary-no-canary-in-the-performance-bar.yml deleted file mode 100644 index 20e32a2e987..00000000000 --- a/changelogs/unreleased/52421-show-canary-no-canary-in-the-performance-bar.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Show canary status in the performance bar -merge_request: 22222 -author: -type: changed diff --git a/changelogs/unreleased/52477-add-iid-headers-to-emails.yml b/changelogs/unreleased/52477-add-iid-headers-to-emails.yml deleted file mode 100644 index c17b66c5f54..00000000000 --- a/changelogs/unreleased/52477-add-iid-headers-to-emails.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add IID headers to E-Mail notifications -merge_request: 22263 -author: -type: changed diff --git a/changelogs/unreleased/52527-harden-wiki-against-missing-last-version.yml b/changelogs/unreleased/52527-harden-wiki-against-missing-last-version.yml deleted file mode 100644 index c7c33e47d01..00000000000 --- a/changelogs/unreleased/52527-harden-wiki-against-missing-last-version.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix a bug displaying certain wiki pages -merge_request: 22377 -author: -type: fixed diff --git a/changelogs/unreleased/52545-guest-create-issue-in-group-board.yml b/changelogs/unreleased/52545-guest-create-issue-in-group-board.yml deleted file mode 100644 index 5701e44eb32..00000000000 --- a/changelogs/unreleased/52545-guest-create-issue-in-group-board.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Always show new issue button in boards' Open list -merge_request: 22557 -author: Heinrich Lee Yu -type: fixed diff --git a/changelogs/unreleased/52548-links-in-tabs-of-the-labels-index-pages-ends-with-html.yml b/changelogs/unreleased/52548-links-in-tabs-of-the-labels-index-pages-ends-with-html.yml deleted file mode 100644 index 052ef70c41a..00000000000 --- a/changelogs/unreleased/52548-links-in-tabs-of-the-labels-index-pages-ends-with-html.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix bug when links in tabs of the labels index pages ends with .html -merge_request: 22716 -author: -type: fixed diff --git a/changelogs/unreleased/52559-applications-api-get-delete.yml b/changelogs/unreleased/52559-applications-api-get-delete.yml deleted file mode 100644 index 19f98a2bb56..00000000000 --- a/changelogs/unreleased/52559-applications-api-get-delete.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add Applications API endpoints for listing and deleting entries. -merge_request: 22296 -author: Jean-Baptiste Vasseur -type: added diff --git a/changelogs/unreleased/52686-project-slug-does-not-auto-populate-in-ie11.yml b/changelogs/unreleased/52686-project-slug-does-not-auto-populate-in-ie11.yml deleted file mode 100644 index 5a30317babf..00000000000 --- a/changelogs/unreleased/52686-project-slug-does-not-auto-populate-in-ie11.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use literal instead of constructor for creating regex -merge_request: 22367 -author: -type: other diff --git a/changelogs/unreleased/52692-catch-redirect-loops.yml b/changelogs/unreleased/52692-catch-redirect-loops.yml deleted file mode 100644 index 655124b8fb4..00000000000 --- a/changelogs/unreleased/52692-catch-redirect-loops.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix 500 error when testing webhooks with redirect loops -merge_request: 22447 -author: Heinrich Lee Yu -type: fixed diff --git a/changelogs/unreleased/52712-further-ui-improvements-to-profile-overview-tab.yml b/changelogs/unreleased/52712-further-ui-improvements-to-profile-overview-tab.yml new file mode 100644 index 00000000000..65aa9323d2e --- /dev/null +++ b/changelogs/unreleased/52712-further-ui-improvements-to-profile-overview-tab.yml @@ -0,0 +1,5 @@ +--- +title: UI improvements to user's profile +merge_request: 22977 +author: +type: other diff --git a/changelogs/unreleased/52767-more-chaos-for-gitlab.yml b/changelogs/unreleased/52767-more-chaos-for-gitlab.yml deleted file mode 100644 index 067777cb7fa..00000000000 --- a/changelogs/unreleased/52767-more-chaos-for-gitlab.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add endpoints for simulating certain failure modes in the application -merge_request: 22746 -author: -type: other diff --git a/changelogs/unreleased/52771-ldap-users-can-t-choose-private-or-internal-when-creating-a-new-group.yml b/changelogs/unreleased/52771-ldap-users-can-t-choose-private-or-internal-when-creating-a-new-group.yml deleted file mode 100644 index a05ef75b6a6..00000000000 --- a/changelogs/unreleased/52771-ldap-users-can-t-choose-private-or-internal-when-creating-a-new-group.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix bug stopping non-admin users from changing visibility level on group creation -merge_request: 22468 -author: -type: fixed diff --git a/changelogs/unreleased/52772-assign-me-quick-action-doesn-t-work-if-there-is-extra-white-space.yml b/changelogs/unreleased/52772-assign-me-quick-action-doesn-t-work-if-there-is-extra-white-space.yml deleted file mode 100644 index 4451cdd78b5..00000000000 --- a/changelogs/unreleased/52772-assign-me-quick-action-doesn-t-work-if-there-is-extra-white-space.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Resolve assign-me quick action doesn't work if there is extra white space -merge_request: 22402 -author: -type: fixed diff --git a/changelogs/unreleased/52780-stale-pipeline-status-cache-for-_project-after-disabling-pipelines.yml b/changelogs/unreleased/52780-stale-pipeline-status-cache-for-_project-after-disabling-pipelines.yml deleted file mode 100644 index 7586d7995b7..00000000000 --- a/changelogs/unreleased/52780-stale-pipeline-status-cache-for-_project-after-disabling-pipelines.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Cache pipeline status per SHA. -merge_request: 22589 -author: -type: fixed diff --git a/changelogs/unreleased/52840-fix-runners-details-page.yml b/changelogs/unreleased/52840-fix-runners-details-page.yml deleted file mode 100644 index b061390fcf0..00000000000 --- a/changelogs/unreleased/52840-fix-runners-details-page.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix rendering of 'Protected' value on Runner details page -merge_request: 22459 -author: -type: fixed diff --git a/changelogs/unreleased/52886-fix-broken-master.yml b/changelogs/unreleased/52886-fix-broken-master.yml deleted file mode 100644 index c6488c83e3b..00000000000 --- a/changelogs/unreleased/52886-fix-broken-master.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixes broken test in master -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/52925-scheduled-pipelines-ui-problems.yml b/changelogs/unreleased/52925-scheduled-pipelines-ui-problems.yml deleted file mode 100644 index 792b24d75ac..00000000000 --- a/changelogs/unreleased/52925-scheduled-pipelines-ui-problems.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixing styling issues on the scheduled pipelines page -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/52993-ldap-rename_provider-rake-task-broken.yml b/changelogs/unreleased/52993-ldap-rename_provider-rake-task-broken.yml deleted file mode 100644 index ca78f9a392e..00000000000 --- a/changelogs/unreleased/52993-ldap-rename_provider-rake-task-broken.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use gitlab_environment for ldap rake task -merge_request: 22582 -author: -type: fixed diff --git a/changelogs/unreleased/53013-duplicate-escape.yml b/changelogs/unreleased/53013-duplicate-escape.yml deleted file mode 100644 index c5ec2322fb5..00000000000 --- a/changelogs/unreleased/53013-duplicate-escape.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove duplicate escape in job sidebar -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/53023-endless-scroll-loader-is-visible-on-user-profile-overview-page.yml b/changelogs/unreleased/53023-endless-scroll-loader-is-visible-on-user-profile-overview-page.yml deleted file mode 100644 index 0377e10fe9e..00000000000 --- a/changelogs/unreleased/53023-endless-scroll-loader-is-visible-on-user-profile-overview-page.yml +++ /dev/null @@ -1,4 +0,0 @@ -title: Adds container to pager to enable scoping -merge_request: 22529 -? author -type: other diff --git a/changelogs/unreleased/53052-mg-fix-broken-ie11.yml b/changelogs/unreleased/53052-mg-fix-broken-ie11.yml deleted file mode 100644 index c616efffa6b..00000000000 --- a/changelogs/unreleased/53052-mg-fix-broken-ie11.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix incompatibility with IE11 due to non-transpiled gitlab-ui components -merge_request: 22695 -author: -type: fixed diff --git a/changelogs/unreleased/53055-combine-date-util-functions.yml b/changelogs/unreleased/53055-combine-date-util-functions.yml deleted file mode 100644 index 56d4406f1bf..00000000000 --- a/changelogs/unreleased/53055-combine-date-util-functions.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Combine all datetime library functions into 'datetime_utility.js' -merge_request: 22570 -author: -type: other diff --git a/changelogs/unreleased/53133-jobs-list.yml b/changelogs/unreleased/53133-jobs-list.yml deleted file mode 100644 index 2e13edc0e76..00000000000 --- a/changelogs/unreleased/53133-jobs-list.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix stage dropdown not rendering in different languages -merge_request: 22604 -author: -type: other diff --git a/changelogs/unreleased/53155-structured-logs-params-array.yml b/changelogs/unreleased/53155-structured-logs-params-array.yml deleted file mode 100644 index 4d4f68a5c84..00000000000 --- a/changelogs/unreleased/53155-structured-logs-params-array.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use key-value pair arrays for API query parameter logging instead of hashes -merge_request: 22623 -author: -type: other diff --git a/changelogs/unreleased/53227-empty-list.yml b/changelogs/unreleased/53227-empty-list.yml deleted file mode 100644 index 8b222145299..00000000000 --- a/changelogs/unreleased/53227-empty-list.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Only renders dropdown for review app changes when we have a list of files to - show. Otherwise will render the regular review app button -merge_request: -author: -type: other diff --git a/changelogs/unreleased/53230-remove_personal_access_tokens_finder_find_by_method.yml b/changelogs/unreleased/53230-remove_personal_access_tokens_finder_find_by_method.yml deleted file mode 100644 index d4d78a2fd06..00000000000 --- a/changelogs/unreleased/53230-remove_personal_access_tokens_finder_find_by_method.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove PersonalAccessTokensFinder#find_by method -merge_request: 22617 -author: -type: fixed diff --git a/changelogs/unreleased/53270-remove-mousetrap-rails.yml b/changelogs/unreleased/53270-remove-mousetrap-rails.yml deleted file mode 100644 index 7214c81d73d..00000000000 --- a/changelogs/unreleased/53270-remove-mousetrap-rails.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove mousetrap-rails gem -merge_request: 22647 -author: Takuya Noguchi -type: other diff --git a/changelogs/unreleased/53273-update-moment-to-2-22-2.yml b/changelogs/unreleased/53273-update-moment-to-2-22-2.yml deleted file mode 100644 index a6b40466927..00000000000 --- a/changelogs/unreleased/53273-update-moment-to-2-22-2.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update moment to 2.22.2 -merge_request: 22648 -author: Takuya Noguchi -type: security diff --git a/changelogs/unreleased/53290-incorrect-project-list-order-select-default-label.yml b/changelogs/unreleased/53290-incorrect-project-list-order-select-default-label.yml new file mode 100644 index 00000000000..d076352a27b --- /dev/null +++ b/changelogs/unreleased/53290-incorrect-project-list-order-select-default-label.yml @@ -0,0 +1,5 @@ +--- +title: Fix default sorting for subgroups and projects list +merge_request: 23058 +author: Jacopo Beschi @jacopo-beschi +type: fixed diff --git a/changelogs/unreleased/53362-allow-concurrency-in-puma.yml b/changelogs/unreleased/53362-allow-concurrency-in-puma.yml deleted file mode 100644 index 5fbda0161c1..00000000000 --- a/changelogs/unreleased/53362-allow-concurrency-in-puma.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow Rails concurrency when running in Puma -merge_request: 22751 -author: -type: performance diff --git a/changelogs/unreleased/53450-wrong-value-for-kubernetes_version-variable.yml b/changelogs/unreleased/53450-wrong-value-for-kubernetes_version-variable.yml deleted file mode 100644 index cd9300ca2d1..00000000000 --- a/changelogs/unreleased/53450-wrong-value-for-kubernetes_version-variable.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Bump KUBERNETES_VERSION for Auto DevOps to latest 1.10 series -merge_request: 22757 -author: -type: other diff --git a/changelogs/unreleased/53533-fix-broken-link.yml b/changelogs/unreleased/53533-fix-broken-link.yml deleted file mode 100644 index 6d55c75d82e..00000000000 --- a/changelogs/unreleased/53533-fix-broken-link.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Render unescaped link for failed pipeline status -merge_request: 22807 -author: -type: fixed diff --git a/changelogs/unreleased/53535-sticky-archived.yml b/changelogs/unreleased/53535-sticky-archived.yml deleted file mode 100644 index 8d452d84871..00000000000 --- a/changelogs/unreleased/53535-sticky-archived.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Renders warning info when job is archieved -merge_request: -author: -type: added diff --git a/changelogs/unreleased/53636-fix-rendering-of-any-user-filter.yml b/changelogs/unreleased/53636-fix-rendering-of-any-user-filter.yml deleted file mode 100644 index a59a276a334..00000000000 --- a/changelogs/unreleased/53636-fix-rendering-of-any-user-filter.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix rendering of filter bar tokens for special values -merge_request: 22865 -author: Heinrich Lee Yu -type: fixed diff --git a/changelogs/unreleased/53879-kube-token-nil.yml b/changelogs/unreleased/53879-kube-token-nil.yml deleted file mode 100644 index 61a0db15d84..00000000000 --- a/changelogs/unreleased/53879-kube-token-nil.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix deployment jobs using nil KUBE_TOKEN due to migration issue -merge_request: 23009 -author: -type: fixed diff --git a/changelogs/unreleased/53888-missing-favicon.yml b/changelogs/unreleased/53888-missing-favicon.yml deleted file mode 100644 index ba6f26c6b9f..00000000000 --- a/changelogs/unreleased/53888-missing-favicon.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds CI favicon back to jobs page -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/53972-fix-fill-shards.yml b/changelogs/unreleased/53972-fix-fill-shards.yml deleted file mode 100644 index ca94d6cc589..00000000000 --- a/changelogs/unreleased/53972-fix-fill-shards.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix a race condition intermittently breaking GitLab startup -merge_request: 23028 -author: -type: fixed diff --git a/changelogs/unreleased/54002-activity-feed-missing-padding-in-event-note-when-a-branch-is-deleted.yml b/changelogs/unreleased/54002-activity-feed-missing-padding-in-event-note-when-a-branch-is-deleted.yml deleted file mode 100644 index 9f4f104a12c..00000000000 --- a/changelogs/unreleased/54002-activity-feed-missing-padding-in-event-note-when-a-branch-is-deleted.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds margin after a deleted branch name in the activity feed. -merge_request: 23038 -author: -type: fixed diff --git a/changelogs/unreleased/54015-Markdown-Editor-improve-Cursor-placement.yml b/changelogs/unreleased/54015-Markdown-Editor-improve-Cursor-placement.yml new file mode 100644 index 00000000000..28e3fae01a9 --- /dev/null +++ b/changelogs/unreleased/54015-Markdown-Editor-improve-Cursor-placement.yml @@ -0,0 +1,5 @@ +--- +title: Refine cursor positioning in Markdown Editor for wrap tags +merge_request: 23085 +author: Johann Hubert Sonntagbauer +type: changed diff --git a/changelogs/unreleased/54032-reply-shortcut-only-discussion-text.yml b/changelogs/unreleased/54032-reply-shortcut-only-discussion-text.yml new file mode 100644 index 00000000000..5c1f6e74b39 --- /dev/null +++ b/changelogs/unreleased/54032-reply-shortcut-only-discussion-text.yml @@ -0,0 +1,5 @@ +--- +title: Make reply shortcut only quote selected discussion text +merge_request: 23096 +author: Thomas Pathier +type: fix diff --git a/changelogs/unreleased/6500-fix-misaligned-approvers-dropdown.yml b/changelogs/unreleased/6500-fix-misaligned-approvers-dropdown.yml deleted file mode 100644 index 3e87c5875c6..00000000000 --- a/changelogs/unreleased/6500-fix-misaligned-approvers-dropdown.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix misaligned approvers dropdown -merge_request: 22832 -author: -type: fixed diff --git a/changelogs/unreleased/7737-ci-pipeline-view-slowed-down-massivly-if-security-tabs-has-many-entries-ee.yml b/changelogs/unreleased/7737-ci-pipeline-view-slowed-down-massivly-if-security-tabs-has-many-entries-ee.yml deleted file mode 100644 index aaae8feb220..00000000000 --- a/changelogs/unreleased/7737-ci-pipeline-view-slowed-down-massivly-if-security-tabs-has-many-entries-ee.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Improve performance of rendering large reports -merge_request: 22835 -author: -type: performance diff --git a/changelogs/unreleased/Fix-pipeline-redirect.yml b/changelogs/unreleased/Fix-pipeline-redirect.yml deleted file mode 100644 index 459273c7740..00000000000 --- a/changelogs/unreleased/Fix-pipeline-redirect.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Redirect to the pipeline builds page when a build is canceled -merge_request: -author: Eva Kadlecova -type: fixed diff --git a/changelogs/unreleased/ab-45608-stuck-mr-query.yml b/changelogs/unreleased/ab-45608-stuck-mr-query.yml deleted file mode 100644 index 3b64534e480..00000000000 --- a/changelogs/unreleased/ab-45608-stuck-mr-query.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add index to find stuck merge requests. -merge_request: 22749 -author: -type: performance diff --git a/changelogs/unreleased/ac-post-merge-pipeline.yml b/changelogs/unreleased/ac-post-merge-pipeline.yml deleted file mode 100644 index 08322c9cb8a..00000000000 --- a/changelogs/unreleased/ac-post-merge-pipeline.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Show post-merge pipeline in merge request page -merge_request: 22292 -author: -type: added diff --git a/changelogs/unreleased/add-action-to-deployment.yml b/changelogs/unreleased/add-action-to-deployment.yml deleted file mode 100644 index 4629f762ae8..00000000000 --- a/changelogs/unreleased/add-action-to-deployment.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix environment status in merge request widget -merge_request: 22799 -author: -type: changed diff --git a/changelogs/unreleased/add-failure-reason-for-execution-timeout.yml b/changelogs/unreleased/add-failure-reason-for-execution-timeout.yml deleted file mode 100644 index c8488cbf200..00000000000 --- a/changelogs/unreleased/add-failure-reason-for-execution-timeout.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add failure reason for execution timeout -merge_request: 22224 -author: -type: changed diff --git a/changelogs/unreleased/add-gl-link-to-markdown-header.yml b/changelogs/unreleased/add-gl-link-to-markdown-header.yml deleted file mode 100644 index b8fe66ab52a..00000000000 --- a/changelogs/unreleased/add-gl-link-to-markdown-header.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Change markdown header tab anchor links to buttons -merge_request: 21988 -author: George Tsiolis -type: other diff --git a/changelogs/unreleased/add-new-kubernetes-spec-helpers.yml b/changelogs/unreleased/add-new-kubernetes-spec-helpers.yml deleted file mode 100644 index 87023ede020..00000000000 --- a/changelogs/unreleased/add-new-kubernetes-spec-helpers.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Introduce new kubernetes helpers -merge_request: 22525 -author: -type: other diff --git a/changelogs/unreleased/add-role-binding-to-kubeclient.yml b/changelogs/unreleased/add-role-binding-to-kubeclient.yml deleted file mode 100644 index bc343116eb4..00000000000 --- a/changelogs/unreleased/add-role-binding-to-kubeclient.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow kubeclient to call RoleBinding methods -merge_request: 22524 -author: -type: other diff --git a/changelogs/unreleased/add-scheduled-flag-to-job-entity.yml b/changelogs/unreleased/add-scheduled-flag-to-job-entity.yml deleted file mode 100644 index a80b5a931b9..00000000000 --- a/changelogs/unreleased/add-scheduled-flag-to-job-entity.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add scheduled flag to job entity -merge_request: 22710 -author: -type: other diff --git a/changelogs/unreleased/an-multithreading.yml b/changelogs/unreleased/an-multithreading.yml deleted file mode 100644 index fca847e6ea4..00000000000 --- a/changelogs/unreleased/an-multithreading.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Experimental support for running Puma multithreaded web-server -merge_request: 22372 -author: -type: performance diff --git a/changelogs/unreleased/avoid-lock-when-introduce-new-failure-reason.yml b/changelogs/unreleased/avoid-lock-when-introduce-new-failure-reason.yml deleted file mode 100644 index 30b9ae032d4..00000000000 --- a/changelogs/unreleased/avoid-lock-when-introduce-new-failure-reason.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Support backward compatibility when introduce new failure reason -merge_request: 22566 -author: -type: changed diff --git a/changelogs/unreleased/blackst0ne-bump-mermaid.yml b/changelogs/unreleased/blackst0ne-bump-mermaid.yml deleted file mode 100644 index cb924ac8448..00000000000 --- a/changelogs/unreleased/blackst0ne-bump-mermaid.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Bump mermaid to 8.0.0-rc.8 -merge_request: 22509 -author: "@blackst0ne" -type: changed diff --git a/changelogs/unreleased/bvl-merge-base-multiple-revisions.yml b/changelogs/unreleased/bvl-merge-base-multiple-revisions.yml deleted file mode 100644 index 4075e35fce9..00000000000 --- a/changelogs/unreleased/bvl-merge-base-multiple-revisions.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow finding the common ancestor for multiple revisions through the API -merge_request: 22295 -author: -type: changed diff --git a/changelogs/unreleased/bvl-patches-via-mail.yml b/changelogs/unreleased/bvl-patches-via-mail.yml deleted file mode 100644 index 6fd9e6a956c..00000000000 --- a/changelogs/unreleased/bvl-patches-via-mail.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow adding patches when creating a merge request via email -merge_request: 22723 -author: Serdar Dogruyol -type: added diff --git a/changelogs/unreleased/bvl-preload-user-status-for-events.yml b/changelogs/unreleased/bvl-preload-user-status-for-events.yml deleted file mode 100644 index e13b19b19c1..00000000000 --- a/changelogs/unreleased/bvl-preload-user-status-for-events.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Show user status for label events in system notes -merge_request: 22609 -author: -type: fixed diff --git a/changelogs/unreleased/bw-automatically-navigate-to-last-board-visited.yml b/changelogs/unreleased/bw-automatically-navigate-to-last-board-visited.yml deleted file mode 100644 index 836b9aa21c5..00000000000 --- a/changelogs/unreleased/bw-automatically-navigate-to-last-board-visited.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Automatically navigate to last board visited -merge_request: 22430 -author: -type: changed diff --git a/changelogs/unreleased/ccr-43034_issues_controller_100_queries.yml b/changelogs/unreleased/ccr-43034_issues_controller_100_queries.yml deleted file mode 100644 index d92c0e74c07..00000000000 --- a/changelogs/unreleased/ccr-43034_issues_controller_100_queries.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add preload for routes and namespaces for issues controller. -merge_request: 21651 -author: -type: performance diff --git a/changelogs/unreleased/ccr-51052_keep_labels_on_issue.yml b/changelogs/unreleased/ccr-51052_keep_labels_on_issue.yml deleted file mode 100644 index 7ef857d38ed..00000000000 --- a/changelogs/unreleased/ccr-51052_keep_labels_on_issue.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixed label removal from issue -merge_request: 22762 -author: -type: fixed diff --git a/changelogs/unreleased/ccr-51520_change_milestone_email.yml b/changelogs/unreleased/ccr-51520_change_milestone_email.yml deleted file mode 100644 index ce4beba2c5f..00000000000 --- a/changelogs/unreleased/ccr-51520_change_milestone_email.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add email for milestone change -merge_request: 22279 -author: -type: added diff --git a/changelogs/unreleased/change-branch-font-type-in-tag-creation.yml b/changelogs/unreleased/change-branch-font-type-in-tag-creation.yml deleted file mode 100644 index 0f46efb693f..00000000000 --- a/changelogs/unreleased/change-branch-font-type-in-tag-creation.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Change branch font type in tag creation -merge_request: 22454 -author: George Tsiolis -type: other diff --git a/changelogs/unreleased/da-fix-does-not-import-projects-over-ssh.yml b/changelogs/unreleased/da-fix-does-not-import-projects-over-ssh.yml deleted file mode 100644 index 5867b1f0981..00000000000 --- a/changelogs/unreleased/da-fix-does-not-import-projects-over-ssh.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Does not allow a SSH URI when importing new projects -merge_request: 22309 -author: -type: fixed diff --git a/changelogs/unreleased/diff-expand-all-button.yml b/changelogs/unreleased/diff-expand-all-button.yml deleted file mode 100644 index 77600e726d5..00000000000 --- a/changelogs/unreleased/diff-expand-all-button.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Show expand all diffs button when a single diff file is collapsed -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/diff-stats-perf-bar.yml b/changelogs/unreleased/diff-stats-perf-bar.yml deleted file mode 100644 index 52d70d4537f..00000000000 --- a/changelogs/unreleased/diff-stats-perf-bar.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixed diff stats not showing when performance bar is enabled -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/disallow-retry-of-old-builds.yml b/changelogs/unreleased/disallow-retry-of-old-builds.yml deleted file mode 100644 index 03992fc0213..00000000000 --- a/changelogs/unreleased/disallow-retry-of-old-builds.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Soft-archive old jobs -merge_request: -author: -type: added diff --git a/changelogs/unreleased/dm-api-merge-requests-index-merged-at.yml b/changelogs/unreleased/dm-api-merge-requests-index-merged-at.yml deleted file mode 100644 index 8e02a9019df..00000000000 --- a/changelogs/unreleased/dm-api-merge-requests-index-merged-at.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Expose {closed,merged}_{at,by} in merge requests API index -merge_request: -author: -type: changed diff --git a/changelogs/unreleased/dm-commit-email-select-options.yml b/changelogs/unreleased/dm-commit-email-select-options.yml deleted file mode 100644 index 90d5c8cf0c6..00000000000 --- a/changelogs/unreleased/dm-commit-email-select-options.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix bug causing not all emails to show up in commit email selectbox -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/docs-minor-aws-fixes.yml b/changelogs/unreleased/docs-minor-aws-fixes.yml new file mode 100644 index 00000000000..64fa6b12afe --- /dev/null +++ b/changelogs/unreleased/docs-minor-aws-fixes.yml @@ -0,0 +1,5 @@ +--- +title: Fixes to AWS documentation spelling and grammar +merge_request: 23198 +author: Brendan O'Leary +type: other diff --git a/changelogs/unreleased/drop-allow_overflow-option-duration_in_numbers.yml b/changelogs/unreleased/drop-allow_overflow-option-duration_in_numbers.yml deleted file mode 100644 index 4bece6459a0..00000000000 --- a/changelogs/unreleased/drop-allow_overflow-option-duration_in_numbers.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Drop `allow_overflow` option in `TimeHelper.duration_in_numbers` -merge_request: 52284 -author: -type: changed diff --git a/changelogs/unreleased/drop-default-value-status-deployments.yml b/changelogs/unreleased/drop-default-value-status-deployments.yml new file mode 100644 index 00000000000..fdb826a0507 --- /dev/null +++ b/changelogs/unreleased/drop-default-value-status-deployments.yml @@ -0,0 +1,5 @@ +--- +title: Drop default value on status column in deployments table +merge_request: 22971 +author: +type: other diff --git a/changelogs/unreleased/even-more-frozen-string-lib.yml b/changelogs/unreleased/even-more-frozen-string-lib.yml deleted file mode 100644 index 3f5fd7710aa..00000000000 --- a/changelogs/unreleased/even-more-frozen-string-lib.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Enable even more frozen string in lib/**/*.rb -merge_request: -author: gfyoung -type: performance diff --git a/changelogs/unreleased/fast_project_blob_path.yml b/changelogs/unreleased/fast_project_blob_path.yml deleted file mode 100644 index b56c9d9cf59..00000000000 --- a/changelogs/unreleased/fast_project_blob_path.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Improve performance of tree rendering in repositories with lots of items -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/fe-ac-review-app-changes-33418.yml b/changelogs/unreleased/fe-ac-review-app-changes-33418.yml deleted file mode 100644 index e4803683062..00000000000 --- a/changelogs/unreleased/fe-ac-review-app-changes-33418.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds filtered dropdown with changed files in review -merge_request: -author: -type: changed diff --git a/changelogs/unreleased/feature-gb-improve-include-config-errors-reporting.yml b/changelogs/unreleased/feature-gb-improve-include-config-errors-reporting.yml deleted file mode 100644 index 67eb6b78096..00000000000 --- a/changelogs/unreleased/feature-gb-improve-include-config-errors-reporting.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Improve validation errors for external CI/CD configuration -merge_request: 22394 -author: -type: added diff --git a/changelogs/unreleased/feature-improved-branch-filter-sorting.yml b/changelogs/unreleased/feature-improved-branch-filter-sorting.yml deleted file mode 100644 index 539c297e0dd..00000000000 --- a/changelogs/unreleased/feature-improved-branch-filter-sorting.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Improving branch filter sorting by listing exact matches first and added support - for begins_with (^) and ends_with ($) matching. -merge_request: 22166 -author: Jason Rutherford -type: changed diff --git a/changelogs/unreleased/fix-53298.yml b/changelogs/unreleased/fix-53298.yml deleted file mode 100644 index f0bf5470dc8..00000000000 --- a/changelogs/unreleased/fix-53298.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Fix #53298: JupyterHub restarts should work without errors' -merge_request: 22671 -author: Amit Rathi -type: fixed diff --git a/changelogs/unreleased/fix-base64-encoded-file-uploads.yml b/changelogs/unreleased/fix-base64-encoded-file-uploads.yml deleted file mode 100644 index 3dde2419fa1..00000000000 --- a/changelogs/unreleased/fix-base64-encoded-file-uploads.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove base64 encoding from files that contain plain text -merge_request: 22425 -author: -type: fixed diff --git a/changelogs/unreleased/fix-deployment-metrics-in-mr-widget.yml b/changelogs/unreleased/fix-deployment-metrics-in-mr-widget.yml deleted file mode 100644 index 5427ead3d1b..00000000000 --- a/changelogs/unreleased/fix-deployment-metrics-in-mr-widget.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Avoid returning deployment metrics url to MR widget when the deployment is - not successful -merge_request: 23010 -author: -type: fixed diff --git a/changelogs/unreleased/fix-error-handling-bugs-in-kubernetes-integration.yml b/changelogs/unreleased/fix-error-handling-bugs-in-kubernetes-integration.yml deleted file mode 100644 index f2a117fe63f..00000000000 --- a/changelogs/unreleased/fix-error-handling-bugs-in-kubernetes-integration.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix error handling bugs in kubernetes integration -merge_request: 22922 -author: -type: fixed diff --git a/changelogs/unreleased/fix-stuck-import-jobs-query-performance-issue.yml b/changelogs/unreleased/fix-stuck-import-jobs-query-performance-issue.yml deleted file mode 100644 index d8455a8509f..00000000000 --- a/changelogs/unreleased/fix-stuck-import-jobs-query-performance-issue.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Improves performance of stuck import jobs detection -merge_request: 22879 -author: -type: performance diff --git a/changelogs/unreleased/fix-tags-for-envs.yml b/changelogs/unreleased/fix-tags-for-envs.yml deleted file mode 100644 index 633788ff6d8..00000000000 --- a/changelogs/unreleased/fix-tags-for-envs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Do not reload self on hooks when creating deployment -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/fj-41213-api-update-submodule-commit.yml b/changelogs/unreleased/fj-41213-api-update-submodule-commit.yml deleted file mode 100644 index c06b02b05e8..00000000000 --- a/changelogs/unreleased/fj-41213-api-update-submodule-commit.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add endpoint to update a git submodule reference -merge_request: 20949 -author: -type: added diff --git a/changelogs/unreleased/fj-50890-fix-commit-message-wiki-new-page.yml b/changelogs/unreleased/fj-50890-fix-commit-message-wiki-new-page.yml deleted file mode 100644 index 5add6d727ac..00000000000 --- a/changelogs/unreleased/fj-50890-fix-commit-message-wiki-new-page.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix bug with wiki page create message -merge_request: 22849 -author: -type: fixed diff --git a/changelogs/unreleased/fj-52406-wiki-file-content-disposition.yml b/changelogs/unreleased/fj-52406-wiki-file-content-disposition.yml deleted file mode 100644 index b765e8caf8b..00000000000 --- a/changelogs/unreleased/fj-52406-wiki-file-content-disposition.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix bug with wiki attachments content disposition -merge_request: 22220 -author: -type: fixed diff --git a/changelogs/unreleased/fj-bump-gitaly-0-129-0.yml b/changelogs/unreleased/fj-bump-gitaly-0-129-0.yml deleted file mode 100644 index 9d44e46c0ed..00000000000 --- a/changelogs/unreleased/fj-bump-gitaly-0-129-0.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Bump Gitaly to 0.129.0 -merge_request: 22868 -author: -type: added diff --git a/changelogs/unreleased/fl-missing-i18n.yml b/changelogs/unreleased/fl-missing-i18n.yml deleted file mode 100644 index d41a691e636..00000000000 --- a/changelogs/unreleased/fl-missing-i18n.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Adds missing i18n to pipelines table -merge_request: -author: -type: other diff --git a/changelogs/unreleased/fl-update-svgs.yml b/changelogs/unreleased/fl-update-svgs.yml deleted file mode 100644 index e6e76617df1..00000000000 --- a/changelogs/unreleased/fl-update-svgs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Updates svg dependency -merge_request: -author: -type: other diff --git a/changelogs/unreleased/frozen-string-enable-lib-gitlab-ci-remain.yml b/changelogs/unreleased/frozen-string-enable-lib-gitlab-ci-remain.yml deleted file mode 100644 index ecbfc323080..00000000000 --- a/changelogs/unreleased/frozen-string-enable-lib-gitlab-ci-remain.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Enable frozen string for remaining lib/gitlab/ci/**/*.rb -merge_request: -author: gfyoung -type: performance diff --git a/changelogs/unreleased/frozen-string-enable-lib-gitlab.yml b/changelogs/unreleased/frozen-string-enable-lib-gitlab.yml deleted file mode 100644 index d64278eb626..00000000000 --- a/changelogs/unreleased/frozen-string-enable-lib-gitlab.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Enable frozen string for lib/gitlab/*.rb -merge_request: -author: gfyoung -type: performance diff --git a/changelogs/unreleased/enable-frozen-string-lib-gitlab.yml b/changelogs/unreleased/frozen-string-lib-gitlab-even-even-even-more.yml index 4a216c46d38..e718d716647 100644 --- a/changelogs/unreleased/enable-frozen-string-lib-gitlab.yml +++ b/changelogs/unreleased/frozen-string-lib-gitlab-even-even-even-more.yml @@ -1,5 +1,5 @@ --- -title: Enable some frozen string in lib/gitlab +title: Enable even more frozen string for lib/gitlab merge_request: author: gfyoung type: performance diff --git a/changelogs/unreleased/frozen-string-enable-lib-gitlab-ci.yml b/changelogs/unreleased/frozen-string-lib-gitlab-even-even-more.yml index a881c304f34..e718d716647 100644 --- a/changelogs/unreleased/frozen-string-enable-lib-gitlab-ci.yml +++ b/changelogs/unreleased/frozen-string-lib-gitlab-even-even-more.yml @@ -1,5 +1,5 @@ --- -title: Enable frozen string for lib/gitlab/ci +title: Enable even more frozen string for lib/gitlab merge_request: author: gfyoung type: performance diff --git a/changelogs/unreleased/frozen-string-lib-rubocop.yml b/changelogs/unreleased/frozen-string-lib-rubocop.yml new file mode 100644 index 00000000000..9fe342e251b --- /dev/null +++ b/changelogs/unreleased/frozen-string-lib-rubocop.yml @@ -0,0 +1,5 @@ +--- +title: Enable Rubocop on lib/gitlab +merge_request: +author: gfyoung +type: other diff --git a/changelogs/unreleased/gl-ui-loading-icon.yml b/changelogs/unreleased/gl-ui-loading-icon.yml deleted file mode 100644 index 5540fc7d7ea..00000000000 --- a/changelogs/unreleased/gl-ui-loading-icon.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove gitlab-ui's loading icon from global -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/gl-ui-modal.yml b/changelogs/unreleased/gl-ui-modal.yml deleted file mode 100644 index fbdb8260d24..00000000000 --- a/changelogs/unreleased/gl-ui-modal.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove gitlab-ui's modal from global -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/gl-ui-pagination.yml b/changelogs/unreleased/gl-ui-pagination.yml deleted file mode 100644 index cf73d6a1f8f..00000000000 --- a/changelogs/unreleased/gl-ui-pagination.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove gitlab-ui's pagination from global -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/gl-ui-progress-bar.yml b/changelogs/unreleased/gl-ui-progress-bar.yml deleted file mode 100644 index 1e584dacd6f..00000000000 --- a/changelogs/unreleased/gl-ui-progress-bar.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove gitlab-ui's progress bar from global -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/gl-ui-tooltip.yml b/changelogs/unreleased/gl-ui-tooltip.yml deleted file mode 100644 index 99ded9f812e..00000000000 --- a/changelogs/unreleased/gl-ui-tooltip.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove gitlab-ui's tooltip from global -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/gt-add-transparent-background-to-markdown-header-tabs.yml b/changelogs/unreleased/gt-add-transparent-background-to-markdown-header-tabs.yml deleted file mode 100644 index 2ba52e07324..00000000000 --- a/changelogs/unreleased/gt-add-transparent-background-to-markdown-header-tabs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add transparent background to markdown header tabs -merge_request: 22565 -author: George Tsiolis -type: fixed diff --git a/changelogs/unreleased/gt-align-issue-status-and-confidential-icon.yml b/changelogs/unreleased/gt-align-issue-status-and-confidential-icon.yml new file mode 100644 index 00000000000..481ce656dc7 --- /dev/null +++ b/changelogs/unreleased/gt-align-issue-status-and-confidential-icon.yml @@ -0,0 +1,5 @@ +--- +title: Align issue status label and confidential icon. +merge_request: 23046 +author: George Tsiolis +type: fixed diff --git a/changelogs/unreleased/gt-align-sign-in-button.yml b/changelogs/unreleased/gt-align-sign-in-button.yml deleted file mode 100644 index a51fa319231..00000000000 --- a/changelogs/unreleased/gt-align-sign-in-button.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Align sign in button -merge_request: 22888 -author: George Tsiolis -type: fixed diff --git a/changelogs/unreleased/gt-change-breadcrumb-title-for-contribution-charts.yml b/changelogs/unreleased/gt-change-breadcrumb-title-for-contribution-charts.yml new file mode 100644 index 00000000000..233cc43117d --- /dev/null +++ b/changelogs/unreleased/gt-change-breadcrumb-title-for-contribution-charts.yml @@ -0,0 +1,5 @@ +--- +title: Change breadcrumb title for contribution charts +merge_request: 23071 +author: George Tsiolis +type: changed diff --git a/changelogs/unreleased/gt-fix-ide-typos-in-props.yml b/changelogs/unreleased/gt-fix-ide-typos-in-props.yml deleted file mode 100644 index a81b227c82f..00000000000 --- a/changelogs/unreleased/gt-fix-ide-typos-in-props.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix IDE typos in props -merge_request: 22685 -author: George Tsiolis -type: other diff --git a/changelogs/unreleased/gt-fix-quick-links-button-styles.yml b/changelogs/unreleased/gt-fix-quick-links-button-styles.yml deleted file mode 100644 index 4c1150631f8..00000000000 --- a/changelogs/unreleased/gt-fix-quick-links-button-styles.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix quick links button styles -merge_request: 22657 -author: George Tsiolis -type: fixed diff --git a/changelogs/unreleased/gt-fix-typo-in-notebook-props.yml b/changelogs/unreleased/gt-fix-typo-in-notebook-props.yml new file mode 100644 index 00000000000..60603905a2d --- /dev/null +++ b/changelogs/unreleased/gt-fix-typo-in-notebook-props.yml @@ -0,0 +1,5 @@ +--- +title: Fix typo in notebook props +merge_request: 23103 +author: George Tsiolis +type: other diff --git a/changelogs/unreleased/gt-remove-empty-spec-describe-blocks.yml b/changelogs/unreleased/gt-remove-empty-spec-describe-blocks.yml deleted file mode 100644 index d2a65d48d8d..00000000000 --- a/changelogs/unreleased/gt-remove-empty-spec-describe-blocks.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove empty spec describe blocks -merge_request: 22451 -author: George Tsiolis -type: other diff --git a/changelogs/unreleased/gt-remove-instances-of-extend-monospace.yml b/changelogs/unreleased/gt-remove-instances-of-extend-monospace.yml new file mode 100644 index 00000000000..dc41de61046 --- /dev/null +++ b/changelogs/unreleased/gt-remove-instances-of-extend-monospace.yml @@ -0,0 +1,5 @@ +--- +title: Remove monospace extend +merge_request: 23089 +author: George Tsiolis +type: performance diff --git a/changelogs/unreleased/gt-remove-prometheus-configuration-help-text.yml b/changelogs/unreleased/gt-remove-prometheus-configuration-help-text.yml deleted file mode 100644 index 018686c0d47..00000000000 --- a/changelogs/unreleased/gt-remove-prometheus-configuration-help-text.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove prometheus configuration help text -merge_request: 22413 -author: George Tsiolis -type: other diff --git a/changelogs/unreleased/gt-truncate-milestone-title-on-collapsed-sidebar.yml b/changelogs/unreleased/gt-truncate-milestone-title-on-collapsed-sidebar.yml deleted file mode 100644 index ca3b99e73ab..00000000000 --- a/changelogs/unreleased/gt-truncate-milestone-title-on-collapsed-sidebar.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Truncate milestone title on collapsed sidebar -merge_request: 22624 -author: George Tsiolis -type: changed diff --git a/changelogs/unreleased/gt-update-environments-empty-state.yml b/changelogs/unreleased/gt-update-environments-empty-state.yml deleted file mode 100644 index dcb477cdbe4..00000000000 --- a/changelogs/unreleased/gt-update-environments-empty-state.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update environments empty state -merge_request: 22297 -author: George Tsiolis -type: other diff --git a/changelogs/unreleased/gt-update-project-and-group-labels-empty-state.yml b/changelogs/unreleased/gt-update-project-and-group-labels-empty-state.yml deleted file mode 100644 index d644ca86b79..00000000000 --- a/changelogs/unreleased/gt-update-project-and-group-labels-empty-state.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update project and group labels empty state -merge_request: 22745 -author: George Tsiolis -type: changed diff --git a/changelogs/unreleased/gt-update-wiki-empty-state.yml b/changelogs/unreleased/gt-update-wiki-empty-state.yml deleted file mode 100644 index 76f923ae814..00000000000 --- a/changelogs/unreleased/gt-update-wiki-empty-state.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update wiki empty state -merge_requrst: 22218 -author: George Tsiolis -type: other diff --git a/changelogs/unreleased/gt-use-merge-request-prefix-in-event-feed-title.yml b/changelogs/unreleased/gt-use-merge-request-prefix-in-event-feed-title.yml deleted file mode 100644 index 51af2807a03..00000000000 --- a/changelogs/unreleased/gt-use-merge-request-prefix-in-event-feed-title.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Use merge request prefix symbol in event feed title -merge_request: 22449 -author: George Tsiolis -type: changed diff --git a/changelogs/unreleased/ide-file-templates-clear.yml b/changelogs/unreleased/ide-file-templates-clear.yml deleted file mode 100644 index 7878f2231a7..00000000000 --- a/changelogs/unreleased/ide-file-templates-clear.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Clear fetched file templates when changing template type in Web IDE -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/ide-open-all-mr-files.yml b/changelogs/unreleased/ide-open-all-mr-files.yml new file mode 100644 index 00000000000..6a5ea8908fc --- /dev/null +++ b/changelogs/unreleased/ide-open-all-mr-files.yml @@ -0,0 +1,5 @@ +--- +title: Open first 10 merge request files in IDE +merge_request: +author: +type: fixed diff --git a/changelogs/unreleased/ignore-environment-validation-failure.yml b/changelogs/unreleased/ignore-environment-validation-failure.yml deleted file mode 100644 index 1b61cf86dc4..00000000000 --- a/changelogs/unreleased/ignore-environment-validation-failure.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Ignore environment validation failure -merge_request: 23100 -author: -type: fixed diff --git a/changelogs/unreleased/introduce-knative-support.yml b/changelogs/unreleased/introduce-knative-support.yml deleted file mode 100644 index 53290d71977..00000000000 --- a/changelogs/unreleased/introduce-knative-support.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Introduce Knative support -author: Chris Baumbauer -merge_request: 43959 -type: added diff --git a/changelogs/unreleased/issue_49936.yml b/changelogs/unreleased/issue_49936.yml deleted file mode 100644 index 2283eb15fd9..00000000000 --- a/changelogs/unreleased/issue_49936.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update JIRA service UI to accept email and API token -merge_request: -author: -type: other diff --git a/changelogs/unreleased/issue_51323.yml b/changelogs/unreleased/issue_51323.yml deleted file mode 100644 index b0e83e303d1..00000000000 --- a/changelogs/unreleased/issue_51323.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add 'only history' option to notes filter -merge_request: -author: -type: changed diff --git a/changelogs/unreleased/jivl-fix-bar-char-transient-spec-failure.yml b/changelogs/unreleased/jivl-fix-bar-char-transient-spec-failure.yml deleted file mode 100644 index 344997add74..00000000000 --- a/changelogs/unreleased/jivl-fix-bar-char-transient-spec-failure.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix transient spec error in the bar_chart component -merge_request: 22495 -author: -type: fixed diff --git a/changelogs/unreleased/jramsay-42673-commit-tooltip.yml b/changelogs/unreleased/jramsay-42673-commit-tooltip.yml deleted file mode 100644 index 083cd1a54a0..00000000000 --- a/changelogs/unreleased/jramsay-42673-commit-tooltip.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add commit message to commit tree anchor title -merge_request: 22585 -author: -type: fixed diff --git a/changelogs/unreleased/kcj-add-philosophy.yml b/changelogs/unreleased/kcj-add-philosophy.yml new file mode 100644 index 00000000000..d164ce165ea --- /dev/null +++ b/changelogs/unreleased/kcj-add-philosophy.yml @@ -0,0 +1,5 @@ +--- +title: Adds a PHILOSOPHY.md which references GitLab Product Handbook +merge_request: 23200 +author: +type: other diff --git a/changelogs/unreleased/kinolaev-master-patch-91872.yml b/changelogs/unreleased/kinolaev-master-patch-91872.yml deleted file mode 100644 index 053e9101e39..00000000000 --- a/changelogs/unreleased/kinolaev-master-patch-91872.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Change HELM_HOST in Auto-DevOps template to work behind proxy -merge_request: 22596 -author: Sergej Nikolaev <kinolaev@gmail.com> -type: fixed diff --git a/changelogs/unreleased/lfs-project-attribute-alias.yml b/changelogs/unreleased/lfs-project-attribute-alias.yml deleted file mode 100644 index 883869f651a..00000000000 --- a/changelogs/unreleased/lfs-project-attribute-alias.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Resolve LFS not correctly showing enabled -merge_request: 22501 -author: -type: fixed diff --git a/changelogs/unreleased/max_retries_when.yml b/changelogs/unreleased/max_retries_when.yml deleted file mode 100644 index dad3cd8a123..00000000000 --- a/changelogs/unreleased/max_retries_when.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow to configure when to retry failed CI jobs -merge_request: 21758 -author: Markus Doits -type: added diff --git a/changelogs/unreleased/more-frozen-string-enable-lib.yml b/changelogs/unreleased/more-frozen-string-enable-lib.yml deleted file mode 100644 index 9598c53b7fd..00000000000 --- a/changelogs/unreleased/more-frozen-string-enable-lib.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Enable more frozen string in lib/**/*.rb -merge_request: -author: gfyoung -type: performance diff --git a/changelogs/unreleased/mr-creation-source-project-filtering.yml b/changelogs/unreleased/mr-creation-source-project-filtering.yml deleted file mode 100644 index 818101a6f1b..00000000000 --- a/changelogs/unreleased/mr-creation-source-project-filtering.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixed source project not filtering in merge request creation compare form -merge_request: -author: -type: fixed diff --git a/changelogs/unreleased/mr-file-list.yml b/changelogs/unreleased/mr-file-list.yml deleted file mode 100644 index 0a2a5e0c1cc..00000000000 --- a/changelogs/unreleased/mr-file-list.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Switch between tree list & file list in diffs file browser -merge_request: 22191 -author: -type: added diff --git a/changelogs/unreleased/mr-image-commenting.yml b/changelogs/unreleased/mr-image-commenting.yml deleted file mode 100644 index 3cc3becc795..00000000000 --- a/changelogs/unreleased/mr-image-commenting.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Reimplemented image commenting in merge request diffs -merge_request: -author: -type: added diff --git a/changelogs/unreleased/osw-comment-on-any-line-on-diffs.yml b/changelogs/unreleased/osw-comment-on-any-line-on-diffs.yml deleted file mode 100644 index e25d64a89d7..00000000000 --- a/changelogs/unreleased/osw-comment-on-any-line-on-diffs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Allow commenting on any diff line in Merge Requests -merge_request: 22914 -author: -type: added diff --git a/changelogs/unreleased/pl-uprade-prometheus-alertmanager.yml b/changelogs/unreleased/pl-uprade-prometheus-alertmanager.yml deleted file mode 100644 index d0c8ed8001d..00000000000 --- a/changelogs/unreleased/pl-uprade-prometheus-alertmanager.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Upgrade Prometheus to 2.4.3 and Alertmanager to 0.15.2 -merge_request: 22600 -author: -type: other diff --git a/changelogs/unreleased/project_identicon_fix.yml b/changelogs/unreleased/project_identicon_fix.yml new file mode 100644 index 00000000000..de4876fc4a5 --- /dev/null +++ b/changelogs/unreleased/project_identicon_fix.yml @@ -0,0 +1,5 @@ +--- +title: Fix project identicon aligning Harry Kiselev +merge_request: 23166 +author: Harry Kiselev +type: other diff --git a/changelogs/unreleased/rails5-active-record-class-value.yml b/changelogs/unreleased/rails5-active-record-class-value.yml new file mode 100644 index 00000000000..9f9fdf10cd1 --- /dev/null +++ b/changelogs/unreleased/rails5-active-record-class-value.yml @@ -0,0 +1,5 @@ +--- +title: 'Rails5: Passing a class as a value in an Active Record query is deprecated' +merge_request: 23164 +author: Jasper Maes +type: other diff --git a/changelogs/unreleased/rails5-deprecated-uniq.yml b/changelogs/unreleased/rails5-deprecated-uniq.yml deleted file mode 100644 index 69a169100f0..00000000000 --- a/changelogs/unreleased/rails5-deprecated-uniq.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Replace deprecated uniq on a Relation with distinct -merge_request: 22625 -author: Jasper Maes -type: other diff --git a/changelogs/unreleased/rails5-fix-delete-blob.yml b/changelogs/unreleased/rails5-fix-delete-blob.yml deleted file mode 100644 index ee8304fbdf4..00000000000 --- a/changelogs/unreleased/rails5-fix-delete-blob.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Rails5: fix delete blob' -merge_request: 22456 -author: Jasper Maes -type: other diff --git a/changelogs/unreleased/rails5-fix-deployment-spec.yml b/changelogs/unreleased/rails5-fix-deployment-spec.yml deleted file mode 100644 index 9e53c617a54..00000000000 --- a/changelogs/unreleased/rails5-fix-deployment-spec.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Rails5: fix deployment model spec' -merge_request: 22428 -author: Jasper Maes -type: other diff --git a/changelogs/unreleased/rails5-mysql-milliseconds-deployment-spec.yml b/changelogs/unreleased/rails5-mysql-milliseconds-deployment-spec.yml deleted file mode 100644 index 8c71ecebfdb..00000000000 --- a/changelogs/unreleased/rails5-mysql-milliseconds-deployment-spec.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Rails5: fix mysql milliseconds issue in deployment model specs' -merge_request: 22850 -author: Jasper Maes -type: other diff --git a/changelogs/unreleased/rails5-mysql-schedule-build.yml b/changelogs/unreleased/rails5-mysql-schedule-build.yml deleted file mode 100644 index cbc481fbf89..00000000000 --- a/changelogs/unreleased/rails5-mysql-schedule-build.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Rails 5: fix mysql milliseconds problems in scheduled build specs' -merge_request: 22170 -author: Jasper Maes -type: other diff --git a/changelogs/unreleased/rails5-user-status-spec.yml b/changelogs/unreleased/rails5-user-status-spec.yml deleted file mode 100644 index 818d480e9fc..00000000000 --- a/changelogs/unreleased/rails5-user-status-spec.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: 'Rails5: fix user edit profile clear status spec' -merge_request: 22169 -author: Jasper Maes -type: other diff --git a/changelogs/unreleased/rake-gitaly-check.yml b/changelogs/unreleased/rake-gitaly-check.yml deleted file mode 100644 index 90fbd62d203..00000000000 --- a/changelogs/unreleased/rake-gitaly-check.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add gitlab:gitaly:check task for Gitaly health check -merge_request: 22063 -author: -type: other diff --git a/changelogs/unreleased/ravlen-rename-secret-variables-in-codebase.yml b/changelogs/unreleased/ravlen-rename-secret-variables-in-codebase.yml deleted file mode 100644 index 211d51a3d43..00000000000 --- a/changelogs/unreleased/ravlen-rename-secret-variables-in-codebase.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Secret Variables renamed to CI Variables in the codebase, to match UX" -merge_request: 22414 -author: Marcel Amirault @ravlen -type: changed
\ No newline at end of file diff --git a/changelogs/unreleased/redact-links-dev.yml b/changelogs/unreleased/redact-links-dev.yml deleted file mode 100644 index 338e7965465..00000000000 --- a/changelogs/unreleased/redact-links-dev.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Redact personal tokens in unsubscribe links. -merge_request: -author: -type: security diff --git a/changelogs/unreleased/refactor-snippets-finder.yml b/changelogs/unreleased/refactor-snippets-finder.yml deleted file mode 100644 index 37cacf71c14..00000000000 --- a/changelogs/unreleased/refactor-snippets-finder.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Rewrite SnippetsFinder to improve performance by a factor of 1500 -merge_request: -author: -type: performance diff --git a/changelogs/unreleased/related_mrs.yml b/changelogs/unreleased/related_mrs.yml deleted file mode 100644 index cc89e9d0cdb..00000000000 --- a/changelogs/unreleased/related_mrs.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add API endpoint to list issue related merge requests -merge_request: 21806 -author: Helmut Januschka -type: added diff --git a/changelogs/unreleased/remove-asset-sync.yml b/changelogs/unreleased/remove-asset-sync.yml deleted file mode 100644 index ddb82212975..00000000000 --- a/changelogs/unreleased/remove-asset-sync.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove asset_sync gem from Gemfile and related code from codebase -merge_request: 22610 -author: -type: other diff --git a/changelogs/unreleased/remove-ci_enable_scheduled_build-feature-flag.yml b/changelogs/unreleased/remove-ci_enable_scheduled_build-feature-flag.yml deleted file mode 100644 index ce52a487551..00000000000 --- a/changelogs/unreleased/remove-ci_enable_scheduled_build-feature-flag.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove `ci_enable_scheduled_build` feature flag -merge_request: 22742 -author: -type: other diff --git a/changelogs/unreleased/remove-experimental-label-from-cluster-views.yml b/changelogs/unreleased/remove-experimental-label-from-cluster-views.yml deleted file mode 100644 index af9512b27e9..00000000000 --- a/changelogs/unreleased/remove-experimental-label-from-cluster-views.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Removes experimental labels from cluster views -merge_request: 22550 -author: -type: other diff --git a/changelogs/unreleased/rename-scheduled-label-badges.yml b/changelogs/unreleased/rename-scheduled-label-badges.yml deleted file mode 100644 index f9ee17a98a4..00000000000 --- a/changelogs/unreleased/rename-scheduled-label-badges.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Rename "scheduled" label/badge of delayed jobs to "delayed" -merge_request: 22245 -author: -type: changed diff --git a/changelogs/unreleased/replace-i-to-icons-in-vue-components.yml b/changelogs/unreleased/replace-i-to-icons-in-vue-components.yml deleted file mode 100644 index 6de57b04338..00000000000 --- a/changelogs/unreleased/replace-i-to-icons-in-vue-components.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Replace i to icons in vue components -merge_request: 20748 -author: George Tsiolis -type: changed diff --git a/changelogs/unreleased/replace-tooltip-in-markdown-component.yml b/changelogs/unreleased/replace-tooltip-in-markdown-component.yml deleted file mode 100644 index 5047e75c06a..00000000000 --- a/changelogs/unreleased/replace-tooltip-in-markdown-component.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Replace tooltip in markdown component with gl-tooltip -merge_request: 21989 -author: George Tsiolis -type: other diff --git a/changelogs/unreleased/rs-revert-api.yml b/changelogs/unreleased/rs-revert-api.yml deleted file mode 100644 index c07b2fe624c..00000000000 --- a/changelogs/unreleased/rs-revert-api.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add revert to commits API -merge_request: 22919 -author: -type: added diff --git a/changelogs/unreleased/rz_fix_milestone_count.yml b/changelogs/unreleased/rz_fix_milestone_count.yml deleted file mode 100644 index 1013b88e0bc..00000000000 --- a/changelogs/unreleased/rz_fix_milestone_count.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fixing count on Milestones -merge_request: 21446 -author: -type: fixed diff --git a/changelogs/unreleased/scheduled-manual-jobs-environment-play-buttons.yml b/changelogs/unreleased/scheduled-manual-jobs-environment-play-buttons.yml deleted file mode 100644 index c89af78d989..00000000000 --- a/changelogs/unreleased/scheduled-manual-jobs-environment-play-buttons.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add the Play button for delayed jobs in environment page -merge_request: 22106 -author: -type: added diff --git a/changelogs/unreleased/security-2717-fix-issue-title-xss.yml b/changelogs/unreleased/security-2717-fix-issue-title-xss.yml deleted file mode 100644 index f2e638e5ab5..00000000000 --- a/changelogs/unreleased/security-2717-fix-issue-title-xss.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Escape entity title while autocomplete template rendering to prevent XSS -merge_request: 2556 -author: -type: security diff --git a/changelogs/unreleased/security-2717-xss-username-autocomplete.yml b/changelogs/unreleased/security-2717-xss-username-autocomplete.yml new file mode 100644 index 00000000000..d9b1015eeb4 --- /dev/null +++ b/changelogs/unreleased/security-2717-xss-username-autocomplete.yml @@ -0,0 +1,5 @@ +--- +title: Escape user fullname while rendering autocomplete template to prevent XSS +merge_request: +author: +type: security diff --git a/changelogs/unreleased/security-51113-hash_personal_access_tokens.yml b/changelogs/unreleased/security-51113-hash_personal_access_tokens.yml deleted file mode 100644 index 4cebe814148..00000000000 --- a/changelogs/unreleased/security-51113-hash_personal_access_tokens.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Persist only SHA digest of PersonalAccessToken#token -merge_request: -author: -type: security diff --git a/changelogs/unreleased/security-kubeclient-ssrf.yml b/changelogs/unreleased/security-kubeclient-ssrf.yml deleted file mode 100644 index 45fc41029fc..00000000000 --- a/changelogs/unreleased/security-kubeclient-ssrf.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Monkey kubeclient to not follow any redirects. -merge_request: -author: -type: security diff --git a/changelogs/unreleased/sh-add-audit-logging-json-ce.yml b/changelogs/unreleased/sh-add-audit-logging-json-ce.yml deleted file mode 100644 index 3c0a27da269..00000000000 --- a/changelogs/unreleased/sh-add-audit-logging-json-ce.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add support for JSON logging for audit events -merge_request: 22471 -author: -type: added diff --git a/changelogs/unreleased/sh-associate-rakefile-ruby.yml b/changelogs/unreleased/sh-associate-rakefile-ruby.yml deleted file mode 100644 index 3e3fcb8d860..00000000000 --- a/changelogs/unreleased/sh-associate-rakefile-ruby.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Associate Rakefile with Ruby icon in diffs -merge_request: -author: -type: other diff --git a/changelogs/unreleased/sh-bump-gems-security.yml b/changelogs/unreleased/sh-bump-gems-security.yml new file mode 100644 index 00000000000..06489f6f979 --- /dev/null +++ b/changelogs/unreleased/sh-bump-gems-security.yml @@ -0,0 +1,5 @@ +--- +title: Bump nokogiri, loofah, and rack gems for security updates +merge_request: 23204 +author: +type: security diff --git a/changelogs/unreleased/sh-fix-commit-signatures-error.yml b/changelogs/unreleased/sh-fix-commit-signatures-error.yml deleted file mode 100644 index e2ea0e5857e..00000000000 --- a/changelogs/unreleased/sh-fix-commit-signatures-error.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix commit signature error when project is disabled -merge_request: 22344 -author: -type: fixed diff --git a/changelogs/unreleased/sh-fix-hipchat-ssrf.yml b/changelogs/unreleased/sh-fix-hipchat-ssrf.yml deleted file mode 100644 index cdc95a34fcf..00000000000 --- a/changelogs/unreleased/sh-fix-hipchat-ssrf.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Prevent SSRF attacks in HipChat integration -merge_request: -author: -type: security diff --git a/changelogs/unreleased/sh-fix-issue-52176.yml b/changelogs/unreleased/sh-fix-issue-52176.yml deleted file mode 100644 index 7269e14d910..00000000000 --- a/changelogs/unreleased/sh-fix-issue-52176.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Disable replication lag check for Aurora PostgreSQL databases -merge_request: 22786 -author: -type: fixed diff --git a/changelogs/unreleased/sh-fix-issue-52649.yml b/changelogs/unreleased/sh-fix-issue-52649.yml deleted file mode 100644 index 34b7f74a345..00000000000 --- a/changelogs/unreleased/sh-fix-issue-52649.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix statement timeouts in RemoveRestrictedTodos migration -merge_request: 22795 -author: -type: other diff --git a/changelogs/unreleased/sh-fix-issue-53153.yml b/changelogs/unreleased/sh-fix-issue-53153.yml deleted file mode 100644 index ee51631f959..00000000000 --- a/changelogs/unreleased/sh-fix-issue-53153.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix extra merge request versions created from forked merge requests -merge_request: 22611 -author: -type: fixed diff --git a/changelogs/unreleased/sh-fix-search-relative-urls.yml b/changelogs/unreleased/sh-fix-search-relative-urls.yml deleted file mode 100644 index 2545e9ca553..00000000000 --- a/changelogs/unreleased/sh-fix-search-relative-urls.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix search "all in GitLab" not working with relative URLs -merge_request: 22644 -author: -type: fixed diff --git a/changelogs/unreleased/sh-fix-wiki-security-issue-53072.yml b/changelogs/unreleased/sh-fix-wiki-security-issue-53072.yml deleted file mode 100644 index ac6ab7cc3f4..00000000000 --- a/changelogs/unreleased/sh-fix-wiki-security-issue-53072.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Validate Wiki attachments are valid temporary files -merge_request: -author: -type: security diff --git a/changelogs/unreleased/sh-handle-invalid-comparison.yml b/changelogs/unreleased/sh-handle-invalid-comparison.yml deleted file mode 100644 index 30b5b3d8198..00000000000 --- a/changelogs/unreleased/sh-handle-invalid-comparison.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Reject invalid branch names in repository compare controller -merge_request: 22186 -author: -type: fixed diff --git a/changelogs/unreleased/sh-optimize-merge-request-project-lookup.yml b/changelogs/unreleased/sh-optimize-merge-request-project-lookup.yml deleted file mode 100644 index 241b89c4633..00000000000 --- a/changelogs/unreleased/sh-optimize-merge-request-project-lookup.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Reduce SQL queries needed to load open merge requests -merge_request: 22709 -author: -type: performance diff --git a/changelogs/unreleased/sh-optimize-mr-commit-sha-lookup.yml b/changelogs/unreleased/sh-optimize-mr-commit-sha-lookup.yml deleted file mode 100644 index bea73f8d329..00000000000 --- a/changelogs/unreleased/sh-optimize-mr-commit-sha-lookup.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Optimize merge request refresh by using the database to check commit SHAs -merge_request: 22731 -author: -type: performance diff --git a/changelogs/unreleased/sh-optimize-reload-diffs-service.yml b/changelogs/unreleased/sh-optimize-reload-diffs-service.yml deleted file mode 100644 index 422102560ed..00000000000 --- a/changelogs/unreleased/sh-optimize-reload-diffs-service.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Significantly cut memory usage and SQL queries when reloading diffs -merge_request: 22725 -author: -type: performance diff --git a/changelogs/unreleased/sh-pages-eof-error.yml b/changelogs/unreleased/sh-pages-eof-error.yml deleted file mode 100644 index 497a74c1458..00000000000 --- a/changelogs/unreleased/sh-pages-eof-error.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix EOF detection with CI artifacts metadata -merge_request: 22479 -author: -type: fixed diff --git a/changelogs/unreleased/sh-paginate-bitbucket-server-imports.yml b/changelogs/unreleased/sh-paginate-bitbucket-server-imports.yml deleted file mode 100644 index b5743e71cf9..00000000000 --- a/changelogs/unreleased/sh-paginate-bitbucket-server-imports.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Paginate Bitbucket Server importer projects -merge_request: 22825 -author: -type: changed diff --git a/changelogs/unreleased/sh-remove-koding.yml b/changelogs/unreleased/sh-remove-koding.yml deleted file mode 100644 index 2c4e8c76a61..00000000000 --- a/changelogs/unreleased/sh-remove-koding.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove Koding integration and documentation -merge_request: 22334 -author: -type: removed diff --git a/changelogs/unreleased/sh-strip-github-pat-whitespace.yml b/changelogs/unreleased/sh-strip-github-pat-whitespace.yml deleted file mode 100644 index ea26f57e8f0..00000000000 --- a/changelogs/unreleased/sh-strip-github-pat-whitespace.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Strip whitespace around GitHub personal access tokens -merge_request: 22432 -author: -type: fixed diff --git a/changelogs/unreleased/stateful_deployments.yml b/changelogs/unreleased/stateful_deployments.yml deleted file mode 100644 index 4caa5ad77b8..00000000000 --- a/changelogs/unreleased/stateful_deployments.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add status to Deployment -merge_request: 22380 -author: -type: changed diff --git a/changelogs/unreleased/support-license-management-and-performance.yml b/changelogs/unreleased/support-license-management-and-performance.yml deleted file mode 100644 index 2e65dba5e76..00000000000 --- a/changelogs/unreleased/support-license-management-and-performance.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Support licenses and performance -merge_request: -author: -type: added diff --git a/changelogs/unreleased/tc-index-lfs-objects-file-store.yml b/changelogs/unreleased/tc-index-lfs-objects-file-store.yml deleted file mode 100644 index 90e80cb1ef1..00000000000 --- a/changelogs/unreleased/tc-index-lfs-objects-file-store.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Enhance performance of counting local LFS objects -merge_request: 22143 -author: -type: performance diff --git a/changelogs/unreleased/tc-index-uploads-file-store.yml b/changelogs/unreleased/tc-index-uploads-file-store.yml deleted file mode 100644 index fa3b3164e38..00000000000 --- a/changelogs/unreleased/tc-index-uploads-file-store.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Enhance performance of counting local Uploads -merge_request: 22522 -author: -type: performance diff --git a/changelogs/unreleased/test-usage-ping-in-timeout-case.yml b/changelogs/unreleased/test-usage-ping-in-timeout-case.yml deleted file mode 100644 index daee98765ac..00000000000 --- a/changelogs/unreleased/test-usage-ping-in-timeout-case.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Fix auto-corrected upload URLs in webhooks -merge_request: 22361 -author: -type: fixed diff --git a/changelogs/unreleased/toggle-sidebar-alignment.yml b/changelogs/unreleased/toggle-sidebar-alignment.yml deleted file mode 100644 index 428fe61da9b..00000000000 --- a/changelogs/unreleased/toggle-sidebar-alignment.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Align toggle sidebar button across all browsers and OSs -merge_request: 22771 -author: -type: fixed diff --git a/changelogs/unreleased/top_level_clusters_controller.yml b/changelogs/unreleased/top_level_clusters_controller.yml deleted file mode 100644 index 1fe1d048de4..00000000000 --- a/changelogs/unreleased/top_level_clusters_controller.yml +++ /dev/null @@ -1,6 +0,0 @@ ---- -title: Change to top level controller for clusters so that we can use it for project - clusters (now) and group clusters (later) -merge_request: 22438 -author: -type: other diff --git a/changelogs/unreleased/update-readme-ruby-version.yml b/changelogs/unreleased/update-readme-ruby-version.yml deleted file mode 100644 index 524b8112d4f..00000000000 --- a/changelogs/unreleased/update-readme-ruby-version.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update Ruby version in README -merge_request: 22466 -author: J.D. Bean -type: changed diff --git a/changelogs/unreleased/update-runner-chart-to-0-1-34.yml b/changelogs/unreleased/update-runner-chart-to-0-1-34.yml deleted file mode 100644 index ebd34bb86b8..00000000000 --- a/changelogs/unreleased/update-runner-chart-to-0-1-34.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update used version of Runner Helm Chart to 0.1.34 -merge_request: 22274 -author: -type: other diff --git a/changelogs/unreleased/update-runner-chart-to-0-1-35.yml b/changelogs/unreleased/update-runner-chart-to-0-1-35.yml deleted file mode 100644 index 3b8029c8d96..00000000000 --- a/changelogs/unreleased/update-runner-chart-to-0-1-35.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update used version of Runner Helm Chart to 0.1.35 -merge_request: 22541 -author: -type: other diff --git a/changelogs/unreleased/update_license_management_job.yml b/changelogs/unreleased/update_license_management_job.yml deleted file mode 100644 index d6e56080e77..00000000000 --- a/changelogs/unreleased/update_license_management_job.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: "Remove dind from license_management auto-devops job definition" -merge_request: 22732 -author: -type: performance diff --git a/changelogs/unreleased/upgrade-workhorse-7-1-0.yml b/changelogs/unreleased/upgrade-workhorse-7-1-0.yml deleted file mode 100644 index b6df35e6d10..00000000000 --- a/changelogs/unreleased/upgrade-workhorse-7-1-0.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Update GitLab-Workhorse to v7.1.0 -merge_request: 22883 -author: -type: other diff --git a/changelogs/unreleased/use-raw-file-format.yml b/changelogs/unreleased/use-raw-file-format.yml deleted file mode 100644 index d86db51fea4..00000000000 --- a/changelogs/unreleased/use-raw-file-format.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Make all legacy security reports to use raw format -merge_request: -author: -type: changed diff --git a/changelogs/unreleased/winh-delayed-jobs-dynamic-timer.yml b/changelogs/unreleased/winh-delayed-jobs-dynamic-timer.yml deleted file mode 100644 index fbedd2796b2..00000000000 --- a/changelogs/unreleased/winh-delayed-jobs-dynamic-timer.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add dynamic timer to delayed jobs -merge_request: 22382 -author: -type: changed diff --git a/changelogs/unreleased/winh-job-list-dynamic-timer.yml b/changelogs/unreleased/winh-job-list-dynamic-timer.yml deleted file mode 100644 index 333a974d6aa..00000000000 --- a/changelogs/unreleased/winh-job-list-dynamic-timer.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add dynamic timer for delayed jobs in job list -merge_request: 22656 -author: -type: changed diff --git a/changelogs/unreleased/winh-pipeline-actions-dynamic-timer.yml b/changelogs/unreleased/winh-pipeline-actions-dynamic-timer.yml deleted file mode 100644 index 4ea1d3f8256..00000000000 --- a/changelogs/unreleased/winh-pipeline-actions-dynamic-timer.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Add dynamic timer for delayed jobs in pipelines list -merge_request: 22621 -author: -type: changed diff --git a/changelogs/unreleased/zj-bump-gitaly-0-128.yml b/changelogs/unreleased/zj-bump-gitaly-0-128.yml deleted file mode 100644 index 451df4b800e..00000000000 --- a/changelogs/unreleased/zj-bump-gitaly-0-128.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Bump Gitaly to 0.128.0 -merge_request: -author: -type: added diff --git a/changelogs/unreleased/zj-circuit-breaker-removal.yml b/changelogs/unreleased/zj-circuit-breaker-removal.yml deleted file mode 100644 index f753cec993f..00000000000 --- a/changelogs/unreleased/zj-circuit-breaker-removal.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove Git circuit breaker -merge_request: 22212 -author: -type: removed diff --git a/changelogs/unreleased/zj-remove-linguist.yml b/changelogs/unreleased/zj-remove-linguist.yml deleted file mode 100644 index 5719512c4cc..00000000000 --- a/changelogs/unreleased/zj-remove-linguist.yml +++ /dev/null @@ -1,5 +0,0 @@ ---- -title: Remove Linguist gem, reducing Rails memory usage by 128MB per process -merge_request: 21008 -author: -type: changed diff --git a/danger/documentation/Dangerfile b/danger/documentation/Dangerfile index 1ee025f0972..87c61d6e90d 100644 --- a/danger/documentation/Dangerfile +++ b/danger/documentation/Dangerfile @@ -15,10 +15,10 @@ docs_paths_to_review = docs_paths_requiring_review(helper.all_changed_files) unless docs_paths_to_review.empty? message 'This merge request adds or changes files that require a ' \ - 'review from the docs team.' + 'review from the Docs team.' markdown(<<~MARKDOWN) -## Docs Review +## Docs review The following files require a review from the Documentation team: @@ -32,24 +32,15 @@ the documentation. GitLabbers are also welcome to use the [#docs](https://gitlab Who to ping [based on DevOps stages](https://about.gitlab.com/handbook/product/categories/#devops-stages): -| Stage | Tech writer | -| ------------- | ----------- | -| ~Create | `@marcia` | -| ~Configure | `@eread` | -| ~Distribution | `@axil` | -| ~Geo | `@eread` | -| ~Gitaly | `@axil` | -| ~Gitter | `@axil` | -| ~Manage | `@eread` | -| ~Monitoring | `@axil` | -| ~Packaging | `@axil` | -| ~Plan | `@mikelewis`| -| ~Release | `marcia` | -| ~Secure | `@axil` | -| ~Verify | `@eread` | +| Tech writer | Stage(s) | +| ------------ | ------------------------------------------------------------ | +| `@marcia` | ~Create ~Release | +| `@axil` | ~Distribution ~Gitaly ~Gitter ~Monitoring ~Packaging ~Secure | +| `@eread` | ~Manage ~Configure ~Geo ~Verify | +| `@mikelewis` | ~Plan | If you are not sure which category the change falls within, or the change is not -part of one of these categories, you can mention the whole team with `@gl-docsteam`. +part of one of these categories, you can mention one of the usernames above. MARKDOWN unless gitlab.mr_labels.include?('Documentation') diff --git a/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb b/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb new file mode 100644 index 00000000000..a480c15e66b --- /dev/null +++ b/db/migrate/20181112103239_drop_default_value_on_status_deployments.rb @@ -0,0 +1,14 @@ +# frozen_string_literal: true + +class DropDefaultValueOnStatusDeployments < ActiveRecord::Migration + DOWNTIME = false + DEPLOYMENT_STATUS_SUCCESS = 2 # Equivalent to Deployment.state_machine.states['success'].value + + def up + change_column_default :deployments, :status, nil + end + + def down + change_column_default :deployments, :status, DEPLOYMENT_STATUS_SUCCESS + end +end diff --git a/db/schema.rb b/db/schema.rb index 8e02f43f702..cc47368c530 100644 --- a/db/schema.rb +++ b/db/schema.rb @@ -10,7 +10,7 @@ # # It's strongly recommended that you check this file into your version control system. -ActiveRecord::Schema.define(version: 20181107054254) do +ActiveRecord::Schema.define(version: 20181112103239) do # These are extensions that must be enabled in order to support this database enable_extension "plpgsql" @@ -807,7 +807,7 @@ ActiveRecord::Schema.define(version: 20181107054254) do t.datetime "created_at" t.datetime "updated_at" t.string "on_stop" - t.integer "status", limit: 2, default: 2, null: false + t.integer "status", limit: 2, null: false t.datetime_with_timezone "finished_at" t.index ["created_at"], name: "index_deployments_on_created_at", using: :btree t.index ["deployable_type", "deployable_id"], name: "index_deployments_on_deployable_type_and_deployable_id", using: :btree diff --git a/doc/README.md b/doc/README.md index 20fcd2e1724..a1cdb00794e 100644 --- a/doc/README.md +++ b/doc/README.md @@ -176,7 +176,7 @@ instant how code changes impact your production environment. - [GitLab Prometheus](administration/monitoring/prometheus/index.md): Configure the bundled Prometheus to collect various metrics from your GitLab instance. - [Prometheus project integration](user/project/integrations/prometheus.md): Configure the Prometheus integration per project and monitor your CI/CD environments. -- [Prometheus metrics](user/project/integrations/prometheus_library/metrics.md): Let Prometheus collect metrics from various services, like Kubernetes, NGINX, NGINX ingress controller, HAProxy, and Amazon Cloud Watch. +- [Prometheus metrics](user/project/integrations/prometheus_library/index.md): Let Prometheus collect metrics from various services, like Kubernetes, NGINX, NGINX ingress controller, HAProxy, and Amazon Cloud Watch. - [GitLab Performance Monitoring](administration/monitoring/performance/index.md): Use InfluxDB and Grafana to monitor the performance of your GitLab instance (will be eventually replaced by Prometheus). - [Health check](user/admin_area/monitoring/health_check.md): GitLab provides liveness and readiness probes to indicate service health and reachability to required services. - [GitLab Cycle Analytics](user/project/cycle_analytics.md): Cycle Analytics measures the time it takes to go from an diff --git a/doc/administration/gitaly/index.md b/doc/administration/gitaly/index.md index e1b2a0a24eb..3395c503ced 100644 --- a/doc/administration/gitaly/index.md +++ b/doc/administration/gitaly/index.md @@ -1,10 +1,8 @@ # Gitaly -[Gitaly](https://gitlab.com/gitlab-org/gitaly) (introduced in GitLab -9.0) is a service that provides high-level RPC access to Git -repositories. Gitaly was optional when it was first introduced in -GitLab, but since GitLab 9.4 it is a mandatory component of the -application. +[Gitaly](https://gitlab.com/gitlab-org/gitaly) is the service that +provides high-level RPC access to Git repositories. Without it, no other +components can read or write Git data. GitLab components that access Git repositories (gitlab-rails, gitlab-shell, gitlab-workhorse) act as clients to Gitaly. End users do @@ -47,15 +45,9 @@ installations that are larger than a single machine. Most installations will be better served with the default configuration used by Omnibus and the GitLab source installation guide. -Starting with GitLab 9.4 it is possible to run Gitaly on a different -server from the rest of the application. This can improve performance -when running GitLab with its repositories stored on an NFS server. - -At the moment (GitLab 9.4) Gitaly is not yet a replacement for NFS -because some parts of GitLab still bypass Gitaly when accessing Git -repositories. If you choose to deploy Gitaly on your NFS server you -must still also mount your Git shares on your GitLab application -servers. +Starting with GitLab 11.4, Gitaly is a replacement for NFS except +when the [Elastic Search indexer](https://gitlab.com/gitlab-org/gitlab-elasticsearch-indexer) +is used. Gitaly network traffic is unencrypted so you should use a firewall to restrict access to your Gitaly server. diff --git a/doc/administration/pages/index.md b/doc/administration/pages/index.md index d8345f2d6bd..cbd3032bd4e 100644 --- a/doc/administration/pages/index.md +++ b/doc/administration/pages/index.md @@ -244,8 +244,9 @@ This setting is enabled by default. ### Access control -Access control was [introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/33422) -in GitLab 11.5. It can be configured per-project, and allows access to a Pages +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/33422) in GitLab 11.5. + +GitLab Pages access control can be configured per-project, and allows access to a Pages site to be controlled based on a user's membership to that project. Access control works by registering the Pages daemon as an OAuth application @@ -259,15 +260,16 @@ Each request to view a resource in a private site is authenticated by Pages using that token. For each request it receives, it makes a request to the GitLab API to check that the user is authorized to read that site. -Pages access control is currently disabled by default. To enable it, you must: +Pages access control is disabled by default. To enable it: -1. Enable it in `/etc/gitlab/gitlab.rb` +1. Enable it in `/etc/gitlab/gitlab.rb`: ```ruby gitlab_pages['access_control'] = true ``` -1. [Reconfigure GitLab][reconfigure] +1. [Reconfigure GitLab][reconfigure]. +1. Users can now configure it in their [projects' settings](../../user/project/pages/introduction.md#gitlab-pages-access-control-core-only). ## Activate verbose logging for daemon diff --git a/doc/administration/pages/source.md b/doc/administration/pages/source.md index ddff54be575..9f2b4d9075a 100644 --- a/doc/administration/pages/source.md +++ b/doc/administration/pages/source.md @@ -393,8 +393,9 @@ server_name ~^.*\.pages\.example\.io$; ## Access control -Access control was [introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/33422) -in GitLab 11.5. It can be configured per-project, and allows access to a Pages +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/33422) in GitLab 11.5. + +GitLab Pages access control can be configured per-project, and allows access to a Pages site to be controlled based on a user's membership to that project. Access control works by registering the Pages daemon as an OAuth application @@ -408,15 +409,17 @@ Each request to view a resource in a private site is authenticated by Pages using that token. For each request it receives, it makes a request to the GitLab API to check that the user is authorized to read that site. -Pages access control is currently disabled by default. To enable it, you must: +Pages access control is disabled by default. To enable it: 1. Modify your `config/gitlab.yml` file: + ```yaml pages: access_control: true ``` -1. [Restart GitLab][restart] -1. Create a new [system OAuth application](../../integration/oauth_provider.md#adding-an-application-through-the-profile) + +1. [Restart GitLab][restart]. +1. Create a new [system OAuth application](../../integration/oauth_provider.md#adding-an-application-through-the-profile). This should be called `GitLab Pages` and have a `Redirect URL` of `https://projects.example.io/auth`. It does not need to be a "trusted" application, but it does need the "api" scope. @@ -429,6 +432,8 @@ Pages access control is currently disabled by default. To enable it, you must: -auth-server <URL of the GitLab instance> ``` +1. Users can now configure it in their [projects' settings](../../user/project/pages/introduction.md#gitlab-pages-access-control-core-only). + ## Change storage path Follow the steps below to change the default path where GitLab Pages' contents diff --git a/doc/api/README.md b/doc/api/README.md index 19abbdc7a1e..0e8d1aaf86e 100644 --- a/doc/api/README.md +++ b/doc/api/README.md @@ -105,7 +105,7 @@ not explicit. This allows for a stable API endpoint, but also means new features can be added to the API in the same version number. New features and bug fixes are released in tandem with a new GitLab, and apart -from incidental patch and security releases, are released on the 22nd each +from incidental patch and security releases, are released on the 22nd of each month. Backward incompatible changes (e.g. endpoints removal, parameters removal etc.), as well as removal of entire API versions are done in tandem with a major point release of GitLab itself. All deprecations and changes diff --git a/doc/ci/environments.md b/doc/ci/environments.md index 4d740c32fd6..315d0c5e7ef 100644 --- a/doc/ci/environments.md +++ b/doc/ci/environments.md @@ -416,19 +416,18 @@ and/or `production`) you can see this information in the merge request itself. ### Go directly from source files to public pages on the environment -> Introduced in GitLab 8.17. +> Introduced in GitLab 8.17. In GitLab 11.5 the file links +are surfaced to the merge request widget. -To go one step further, we can specify a Route Map to get GitLab to show us "View on [environment URL]" buttons to go directly from a file to that file's representation on the deployed website. It will be exposed in a few places: - -| In the diff for a merge request, comparison or commit | In the file view | -| ------ | ------ | -| !["View on env" button in merge request diff](img/view_on_env_mr.png) | !["View on env" button in file view](img/view_on_env_blob.png) | +You can specify a Route Map to get GitLab to show "View on <environment URL>" +buttons to go directly from a file to that file's representation on the +[deployed website via Review Apps](review_apps/index.md). To get this to work, you need to tell GitLab how the paths of files in your repository map to paths of pages on your website, using a Route Map. A Route Map is a file inside the repository at `.gitlab/route-map.yml`, which contains a YAML array that maps `source` paths (in the repository) to `public` paths (on the website). - -This is an example of a route map for [Middleman](https://middlemanapp.com) static websites like [http://about.gitlab.com](https://gitlab.com/gitlab-com/www-gitlab-com): +Below is an example of a route map for [Middleman](https://middlemanapp.com) static websites +like <https://gitlab.com/gitlab-com/www-gitlab-com>: ```yaml # Team data @@ -467,6 +466,25 @@ In the example above, the fact that mappings are evaluated in order of their def --- +Once you have the route mapping set up, it will be exposed in a few places: + +- In the merge request widget. The **View app** button will take you to the + environment URL you have set up in `.gitlab-ci.yml`. The dropdown will render + the first 5 matched items from the route map, but you can filter them if more + than 5 are available. + + ![View app file list in merge request widget](img/view_on_mr_widget.png) + +- In the diff for a merge request, comparison, or commit. + + !["View on env" button in merge request diff](img/view_on_env_mr.png) + +- In the blob file view. + + !["View on env" button in file view](img/view_on_env_blob.png) | + +--- + We now have a full development cycle, where our app is tested, built, deployed as a Review app, deployed to a staging server once the merge request is merged, and finally manually deployed to the production server. What we just described @@ -568,13 +586,13 @@ exist, you should see something like: > > - For the monitoring dashboard to appear, you need to: > - Have enabled the [Prometheus integration][prom] -> - Configured Prometheus to collect at least one [supported metric](../user/project/integrations/prometheus_library/metrics.md) +> - Configured Prometheus to collect at least one [supported metric](../user/project/integrations/prometheus_library/index.md) > - With GitLab 9.2, all deployments to an environment are shown directly on the > monitoring dashboard If you have enabled [Prometheus for monitoring system and response metrics](https://docs.gitlab.com/ee/user/project/integrations/prometheus.html), you can monitor the performance behavior of your app running in each environment. -Once configured, GitLab will attempt to retrieve [supported performance metrics](https://docs.gitlab.com/ee/user/project/integrations/prometheus_library/metrics.html) for any +Once configured, GitLab will attempt to retrieve [supported performance metrics](https://docs.gitlab.com/ee/user/project/integrations/prometheus_library/index.html) for any environment which has had a successful deployment. If monitoring data was successfully retrieved, a Monitoring button will appear for each environment. diff --git a/doc/ci/img/view_on_env_blob.png b/doc/ci/img/view_on_env_blob.png Binary files differindex dd9ca40280a..acc457fbb38 100644 --- a/doc/ci/img/view_on_env_blob.png +++ b/doc/ci/img/view_on_env_blob.png diff --git a/doc/ci/img/view_on_mr_widget.png b/doc/ci/img/view_on_mr_widget.png Binary files differnew file mode 100644 index 00000000000..04f4b58df62 --- /dev/null +++ b/doc/ci/img/view_on_mr_widget.png diff --git a/doc/ci/yaml/README.md b/doc/ci/yaml/README.md index ec709280085..44eec43ef54 100644 --- a/doc/ci/yaml/README.md +++ b/doc/ci/yaml/README.md @@ -1682,6 +1682,11 @@ include: NOTE: **Note:** The remote file must be publicly accessible through a simple GET request, as we don't support authentication schemas in the remote URL. + NOTE: **Note:** + In order to include files from another repository inside your local network, + you may need to enable the **Allow requests to the local network from hooks and services** checkbox + located in the **Settings > Network > Outbound requests** section within the **Admin area**. + --- diff --git a/doc/development/migration_style_guide.md b/doc/development/migration_style_guide.md index e4e532bb4ed..a99267bfbba 100644 --- a/doc/development/migration_style_guide.md +++ b/doc/development/migration_style_guide.md @@ -134,9 +134,9 @@ should be more than enough. When removing an index make sure to use the method `remove_concurrent_index` instead of the regular `remove_index` method. The `remove_concurrent_index` method automatically drops concurrent indexes when using PostgreSQL, removing the -need for downtime. To use this method you must disable transactions by calling -the method `disable_ddl_transaction!` in the body of your migration class like -so: +need for downtime. To use this method you must disable single-transaction mode +by calling the method `disable_ddl_transaction!` in the body of your migration +class like so: ```ruby class MyMigration < ActiveRecord::Migration diff --git a/doc/university/bookclub/booklist.md b/doc/university/bookclub/booklist.md index 26c3851276b..84b1f643b91 100644 --- a/doc/university/bookclub/booklist.md +++ b/doc/university/bookclub/booklist.md @@ -10,7 +10,7 @@ List of books and resources, that may be worth reading. 1. **The Humble Programmer** - Edsger W. Dijkstra, 1972 ([paper](http://dl.acm.org/citation.cfm?id=361591)) + Edsger W. Dijkstra, 1972 ([paper](https://dl.acm.org/citation.cfm?id=361591)) ## Programming diff --git a/doc/university/high-availability/aws/README.md b/doc/university/high-availability/aws/README.md index 0a7ce922de1..b21cf27c1d3 100644 --- a/doc/university/high-availability/aws/README.md +++ b/doc/university/high-availability/aws/README.md @@ -9,7 +9,7 @@ in [significantly degraded performance](https://gitlab.com/gitlab-org/gitlab-ee/ GitLab on AWS can leverage many of the services that are already configurable with High Availability. These services have a lot of -flexibility and are able to adopt to most companies, best of all is the +flexibility and are able to adapt to most companies, best of all is the ability to automate both vertical and horizontal scaling. In this article we'll go through a basic HA setup where we'll start by @@ -55,9 +55,9 @@ and from the Actions dropdown choose Edit DNS Hostnames and select Yes. ### Subnet Now let's create some subnets in different Availability Zones. Make sure -that each subnet is associated the the VPC we just created, that it has +that each subnet is associated to the VPC we just created, that it has a distinct VPC and lastly that CIDR blocks don't overlap. This will also -allow us to enable multi AZ for redundancy. +allow us to enable multi-AZ for redundancy. We will create private and public subnets to match load balancers and RDS instances as well. @@ -98,7 +98,7 @@ traffic from any destination. ![Subnet Config](img/ig-rt.png) -Before leaving this screen select the next tab to the rgiht which is +Before leaving this screen select the next tab to the right which is Subnet Associations and add our public subnets. If you followed our naming convention they should be easy to find. @@ -106,8 +106,8 @@ naming convention they should be easy to find. ## Database with RDS -For our database server we will use Amazon RDS which offers Multi AZ -for redundancy. Lets start by creating a subnet group and then we'll +For our database server we will use Amazon RDS which offers Multi-AZ +for redundancy. Let's start by creating a subnet group and then we'll create the actual RDS instance. ### Subnet Group @@ -122,7 +122,7 @@ the VPC ID dropdown and at the bottom we can add our private subnets. Select the RDS service from the Database section and create a new PostgreSQL instance. After choosing between a Production or Development instance we'll start with the actual configuration. On the -image bellow we have the settings for this article but note the +image below we have the settings for this article but note the following two options which are of particular interest for HA: 1. Multi-AZ-Deployment is recommended as redundancy. Read more at @@ -133,7 +133,7 @@ IOPS (SSD) is best suited for HA. Read more about it at ![RDS Instance Specs](img/instance_specs.png) -The rest of the setting on this page request a DB identifier, username +The rest of the setting on this page request a DB identifier, username, and a master password. We've chosen to use `gitlab-ha`, `gitlab` and a very secure password respectively. Keep these in hand for later. @@ -152,7 +152,7 @@ EC is an in-memory hosted caching solution. Redis maintains its own persistence and is used for certain types of application. Let's choose the ElastiCache service in the Database section from our -AWS console. Now lets create a cache subnet group which will be very +AWS console. Now let's create a cache subnet group which will be very similar to the RDS subnet group. Make sure to select our VPC and its private subnets. @@ -160,7 +160,7 @@ private subnets. Now press the Launch a Cache Cluster and choose Redis for our DB engine. You'll be able to configure details such as replication, -Multi AZ and node types. The second section will allow us to choose our +Multi-AZ and node types. The second section will allow us to choose our subnet and security group and ![Redis Cluster details](img/redis-cluster-det.png) @@ -274,7 +274,7 @@ username, and password. gitlab_rails['db_password'] = "mypassword" gitlab_rails['db_host'] = "<rds-endpoint>" -Next we only need to configure the Redis section by adding the host and +Next, we only need to configure the Redis section by adding the host and uncommenting the port. @@ -285,7 +285,7 @@ to make the EFS integration easier to manage. gitlab_rails['redis_host'] = "<redis-endpoint>" gitlab_rails['redis_port'] = 6379 -Finally run reconfigure, you might find it useful to run a check and +Finally, run reconfigure. You might find it useful to run a check and a service status to make sure everything has been set up correctly. sudo gitlab-ctl reconfigure @@ -321,10 +321,10 @@ The Load Balancer Health will allow us to indicate where to ping and what makes up a healthy or unhealthy instance. We won't add the instance on the next session because we'll destroy it -momentarily as we'll be using the image we where creating. We will keep +momentarily as we'll be using the image we were creating. We will keep the Enable Cross-Zone and Enable Connection Draining active. -After we finish creating the Load Balancer we can re visit our Security +After we finish creating the Load Balancer we can revisit our Security Groups to improve access only through the ELB and any other requirement you might have. @@ -363,7 +363,7 @@ After this is launched we are able to start creating our Auto Scaling Group. Start by giving it a name and assigning it our VPC and private subnets. We also want to always start with two instances and if you scroll down to Advanced Details we can choose to receive traffic from ELBs. -Lets enable that option and select our ELB. We also want to use the ELB's +Let's enable that option and select our ELB. We also want to use the ELB's health check. ![Auto scaling](img/auto-scaling-det.png) @@ -388,9 +388,9 @@ we where aiming for. After you're done with the policies section have some fun trying to break instances. You should be able to see how the Auto Scaling Group and the -EC2 screen start bringing them up again. +EC2 screen starts bringing them up again. -High Availability is a very big area, we went mostly through scaling and +High Availability is a vast area, we went mostly through scaling and some redundancy options but it might also imply Geographic replication. There is a lot of ground yet to cover so have a read through these other resources and feel free to open an issue to request additional material. diff --git a/doc/update/11.2-to-11.3.md b/doc/update/11.2-to-11.3.md index d77f879ee57..f2b8efc3e6e 100644 --- a/doc/update/11.2-to-11.3.md +++ b/doc/update/11.2-to-11.3.md @@ -235,7 +235,7 @@ There might be configuration options available for [`gitlab.yml`][yaml]. View th ```sh cd /home/git/gitlab -git diff origin/11-1-stable:config/gitlab.yml.example origin/11-3-stable:config/gitlab.yml.example +git diff origin/11-2-stable:config/gitlab.yml.example origin/11-3-stable:config/gitlab.yml.example ``` #### Nginx configuration @@ -246,10 +246,10 @@ Ensure you're still up-to-date with the latest NGINX configuration changes: cd /home/git/gitlab # For HTTPS configurations -git diff origin/11-1-stable:lib/support/nginx/gitlab-ssl origin/11-3-stable:lib/support/nginx/gitlab-ssl +git diff origin/11-2-stable:lib/support/nginx/gitlab-ssl origin/11-3-stable:lib/support/nginx/gitlab-ssl # For HTTP configurations -git diff origin/11-1-stable:lib/support/nginx/gitlab origin/11-3-stable:lib/support/nginx/gitlab +git diff origin/11-2-stable:lib/support/nginx/gitlab origin/11-3-stable:lib/support/nginx/gitlab ``` If you are using Strict-Transport-Security in your installation to continue using it you must enable it in your Nginx @@ -283,7 +283,7 @@ There might be new configuration options available for [`gitlab.default.example` ```sh cd /home/git/gitlab -git diff origin/11-1-stable:lib/support/init.d/gitlab.default.example origin/11-3-stable:lib/support/init.d/gitlab.default.example +git diff origin/11-2-stable:lib/support/init.d/gitlab.default.example origin/11-3-stable:lib/support/init.d/gitlab.default.example ``` Ensure you're still up-to-date with the latest init script changes: diff --git a/doc/update/11.3-to-11.4.md b/doc/update/11.3-to-11.4.md index 00dfb19b4b4..fddec45e57a 100644 --- a/doc/update/11.3-to-11.4.md +++ b/doc/update/11.3-to-11.4.md @@ -235,7 +235,7 @@ There might be configuration options available for [`gitlab.yml`][yaml]. View th ```sh cd /home/git/gitlab -git diff origin/11-1-stable:config/gitlab.yml.example origin/11-4-stable:config/gitlab.yml.example +git diff origin/11-3-stable:config/gitlab.yml.example origin/11-4-stable:config/gitlab.yml.example ``` #### Nginx configuration @@ -246,10 +246,10 @@ Ensure you're still up-to-date with the latest NGINX configuration changes: cd /home/git/gitlab # For HTTPS configurations -git diff origin/11-1-stable:lib/support/nginx/gitlab-ssl origin/11-4-stable:lib/support/nginx/gitlab-ssl +git diff origin/11-3-stable:lib/support/nginx/gitlab-ssl origin/11-4-stable:lib/support/nginx/gitlab-ssl # For HTTP configurations -git diff origin/11-1-stable:lib/support/nginx/gitlab origin/11-4-stable:lib/support/nginx/gitlab +git diff origin/11-3-stable:lib/support/nginx/gitlab origin/11-4-stable:lib/support/nginx/gitlab ``` If you are using Strict-Transport-Security in your installation to continue using it you must enable it in your Nginx @@ -283,7 +283,7 @@ There might be new configuration options available for [`gitlab.default.example` ```sh cd /home/git/gitlab -git diff origin/11-1-stable:lib/support/init.d/gitlab.default.example origin/11-4-stable:lib/support/init.d/gitlab.default.example +git diff origin/11-3-stable:lib/support/init.d/gitlab.default.example origin/11-4-stable:lib/support/init.d/gitlab.default.example ``` Ensure you're still up-to-date with the latest init script changes: diff --git a/doc/user/permissions.md b/doc/user/permissions.md index 1fd230a41aa..c4a2d5f66e5 100644 --- a/doc/user/permissions.md +++ b/doc/user/permissions.md @@ -95,7 +95,7 @@ The following table depicts the various user permission levels in a project. | Manage GitLab Pages | | | | ✓ | ✓ | | Manage GitLab Pages domains and certificates | | | | ✓ | ✓ | | Remove GitLab Pages | | | | | ✓ | -| View GitLab Pages protected by [access control](../administration/pages/index.md#access-control) | ✓ | ✓ | ✓ | ✓ | ✓ | +| View GitLab Pages protected by [access control](project/pages/introduction.md#gitlab-pages-access-control-core-only) | ✓ | ✓ | ✓ | ✓ | ✓ | | Manage clusters | | | | ✓ | ✓ | | Manage license policy **[ULTIMATE]** | | | | ✓ | ✓ | | Edit comments (posted by any user) | | | | ✓ | ✓ | diff --git a/doc/user/project/clusters/runbooks/img/authorize-jupyter.png b/doc/user/project/clusters/runbooks/img/authorize-jupyter.png Binary files differnew file mode 100644 index 00000000000..64f95ed45f0 --- /dev/null +++ b/doc/user/project/clusters/runbooks/img/authorize-jupyter.png diff --git a/doc/user/project/clusters/runbooks/img/demo-runbook.png b/doc/user/project/clusters/runbooks/img/demo-runbook.png Binary files differnew file mode 100644 index 00000000000..25c9df4126d --- /dev/null +++ b/doc/user/project/clusters/runbooks/img/demo-runbook.png diff --git a/doc/user/project/clusters/runbooks/img/gitlab-variables.png b/doc/user/project/clusters/runbooks/img/gitlab-variables.png Binary files differnew file mode 100644 index 00000000000..f76ed21145f --- /dev/null +++ b/doc/user/project/clusters/runbooks/img/gitlab-variables.png diff --git a/doc/user/project/clusters/runbooks/img/helm-install.png b/doc/user/project/clusters/runbooks/img/helm-install.png Binary files differnew file mode 100644 index 00000000000..e39094bcbf7 --- /dev/null +++ b/doc/user/project/clusters/runbooks/img/helm-install.png diff --git a/doc/user/project/clusters/runbooks/img/ingress-install.png b/doc/user/project/clusters/runbooks/img/ingress-install.png Binary files differnew file mode 100644 index 00000000000..093c61f2d0e --- /dev/null +++ b/doc/user/project/clusters/runbooks/img/ingress-install.png diff --git a/doc/user/project/clusters/runbooks/img/jupyterhub-install.png b/doc/user/project/clusters/runbooks/img/jupyterhub-install.png Binary files differnew file mode 100644 index 00000000000..2115ec9745b --- /dev/null +++ b/doc/user/project/clusters/runbooks/img/jupyterhub-install.png diff --git a/doc/user/project/clusters/runbooks/img/postgres-query.png b/doc/user/project/clusters/runbooks/img/postgres-query.png Binary files differnew file mode 100644 index 00000000000..3880438c97a --- /dev/null +++ b/doc/user/project/clusters/runbooks/img/postgres-query.png diff --git a/doc/user/project/clusters/runbooks/img/sample-runbook.png b/doc/user/project/clusters/runbooks/img/sample-runbook.png Binary files differnew file mode 100644 index 00000000000..c12ce8990a4 --- /dev/null +++ b/doc/user/project/clusters/runbooks/img/sample-runbook.png diff --git a/doc/user/project/clusters/runbooks/index.md b/doc/user/project/clusters/runbooks/index.md index 3b81e439119..e1b8dc07b50 100644 --- a/doc/user/project/clusters/runbooks/index.md +++ b/doc/user/project/clusters/runbooks/index.md @@ -10,8 +10,8 @@ Historically, runbooks took the form of a decision tree or a detailed step-by-step guide depending on the condition or system. Modern implementations have introduced the concept of an "executable -runbooks", where along with a well define process, operators can execute -code blocks or database queries against a given environment. +runbooks", where, along with a well-defined process, operators can execute +pre-written code blocks or database queries against a given environment. ## Nurtch Executable Runbooks @@ -45,5 +45,93 @@ To create an executable runbook, you will need: Nurtch is the company behind the [Rubix library](https://github.com/Nurtch/rubix). Rubix is an open-source python library that makes it easy to perform common DevOps tasks inside Jupyter Notebooks. Tasks such as plotting Cloudwatch metrics and rolling your ECS/Kubernetes app are simplified -down to a couple of lines of code. Check the [Nurtch Documentation](http://docs.nurtch.com/en/latest) +down to a couple of lines of code. See the [Nurtch Documentation](http://docs.nurtch.com/en/latest) for more information. + +## Configure an executable runbook with GitLab + +Follow this step-by-step guide to configure an executable runbook in GitLab using +the components outlined above and the preloaded demo runbook. + +### 1. Add a Kubernetes cluster + +Follow the steps outlined in [Adding and creating a new GKE cluster via GitLab](https://docs.gitlab.com/ee/user/project/clusters/#adding-and-creating-a-new-gke-cluster-via-gitlab) +to add a Kubernetes cluster to your project. + +### 2. Install Helm Tiller, Ingress, and JupyterHub + +Once the cluster has been provisioned in GKE, click the **Install** button next to the **Helm Tiller** app. + +![install helm](img/helm-install.png) + +Once Tiller has been installed successfully, click the **Install** button next to the **Ingress** app. + +![install ingress](img/ingress-install.png) + +Once Ingress has been installed successfully, click the **Install** button next to the **JupyterHub** app. + +![install jupyterhub](img/jupyterhub-install.png) + +### 3. Login to JupyterHub and start the server + +Once JupyterHub has been installed successfully, navigate to the displayed **Jupyter Hostname** URL and click +**Sign in with GitLab**. Authentication is automatically enabled for any user of the GitLab instance via OAuth2. This +will redirect to GitLab in order to authorize JupyterHub to use your GitLab account. Click **Authorize**. + +![authorize jupyter](img/authorize-jupyter.png) + +Once the application has been authorized you will taken back to the JupyterHub application. Click **Start My Server**. +The server will take a couple of seconds to start. + +### 4. Configure access + +In order for the runbook to access your GitLab project, you will need to enter a +[GitLab Access Token](https://docs.gitlab.com/ee/user/profile/personal_access_tokens.html) +as well as your Project ID in the **Setup** section of the demo runbook. + +Double-click the **DevOps-Runbook-Demo** folder located on the left panel. + +![demo runbook](img/demo-runbook.png) + +Double-click the "Nurtch-DevOps-Demo.ipynb" runbook. + +![sample runbook](img/sample-runbook.png) + +The contents on the runbook will be displayed on the right side of the screen. Under the "Setup" section, you will find +entries for both your `PRIVATE_TOKEN` and your `PROJECT_ID`. Enter both these values, conserving the single quotes as follows: + +```sql +PRIVATE_TOKEN = 'n671WNGecHugsdEDPsyo' +PROJECT_ID = '1234567' +``` + +Update the `VARIABLE_NAME` on the last line of this section to match the name of the variable you are using for your +access token. In this example our variable name is `PRIVATE_TOKEN`. + +```sql +VARIABLE_VALUE = project.variables.get('PRIVATE_TOKEN').value +``` + +### 5. Configure an operation + +For this example we'll use the "**Run SQL queries in Notebook**" section in the sample runbook to query +a postgres database. The first 4 lines of the section define the variables that are required for this query to function. + +```sql +%env DB_USER={project.variables.get('DB_USER').value} +%env DB_PASSWORD={project.variables.get('DB_PASSWORD').value} +%env DB_ENDPOINT={project.variables.get('DB_ENDPOINT').value} +%env DB_NAME={project.variables.get('DB_NAME').value} +``` + +Create the matching variables in your project's **Settings >> CI/CD >> Variables** + +![gitlab variables](img/gitlab-variables.png) + +Back in Jupyter, click the "Run SQL queries in Notebook" heading and the click *Run*. The results will be +displayed in-line as follows: + +![postgres query](img/postgres-query.png) + +You can try other operations such as running shell scripts or interacting with a Kubernetes cluster. Visit the +[Nurtch Documentation](http://docs.nurtch.com/) for more information.
\ No newline at end of file diff --git a/doc/user/project/integrations/prometheus.md b/doc/user/project/integrations/prometheus.md index 0b61a41aab0..7d0e567cae7 100644 --- a/doc/user/project/integrations/prometheus.md +++ b/doc/user/project/integrations/prometheus.md @@ -56,7 +56,7 @@ The [NGINX Ingress](../clusters/index.md#installing-applications) that is deploy Integration with Prometheus requires the following: 1. GitLab 9.0 or higher -1. Prometheus must be configured to collect one of the [supported metrics](prometheus_library/metrics.md) +1. Prometheus must be configured to collect one of the [supported metrics](prometheus_library/index.md) 1. Each metric must be have a label to indicate the environment 1. GitLab must have network connectivity to the Prometheus server @@ -65,7 +65,7 @@ Integration with Prometheus requires the following: Installing and configuring Prometheus to monitor applications is fairly straight forward. 1. [Install Prometheus](https://prometheus.io/docs/introduction/install/) -1. Set up one of the [supported monitoring targets](prometheus_library/metrics.md) +1. Set up one of the [supported monitoring targets](prometheus_library/index.md) 1. Configure the Prometheus server to [collect their metrics](https://prometheus.io/docs/operating/configuration/#scrape_config) #### Configuration in GitLab diff --git a/doc/user/project/integrations/prometheus_library/cloudwatch.md b/doc/user/project/integrations/prometheus_library/cloudwatch.md index bf6c0dc0e7e..66f1b587070 100644 --- a/doc/user/project/integrations/prometheus_library/cloudwatch.md +++ b/doc/user/project/integrations/prometheus_library/cloudwatch.md @@ -27,4 +27,4 @@ A sample Cloudwatch Exporter configuration file, configured for basic AWS ELB mo ## Specifying the Environment label In order to isolate and only display relevant metrics for a given environment -however, GitLab needs a method to detect which labels are associated. To do this, GitLab will [look for an `environment` label](metrics.md#identifying-environments). +however, GitLab needs a method to detect which labels are associated. To do this, GitLab will [look for an `environment` label](index.md#identifying-environments). diff --git a/doc/user/project/integrations/prometheus_library/haproxy.md b/doc/user/project/integrations/prometheus_library/haproxy.md index cd398f7c0fd..abb0c01ad18 100644 --- a/doc/user/project/integrations/prometheus_library/haproxy.md +++ b/doc/user/project/integrations/prometheus_library/haproxy.md @@ -21,4 +21,4 @@ To get started with NGINX monitoring, you should install and configure the [HAPr ## Specifying the Environment label In order to isolate and only display relevant metrics for a given environment -however, GitLab needs a method to detect which labels are associated. To do this, GitLab will [look for an `environment` label](metrics.md#identifying-environments). +however, GitLab needs a method to detect which labels are associated. To do this, GitLab will [look for an `environment` label](index.md#identifying-environments). diff --git a/doc/user/project/integrations/prometheus_library/index.md b/doc/user/project/integrations/prometheus_library/index.md new file mode 100644 index 00000000000..9b9b4f6c8ca --- /dev/null +++ b/doc/user/project/integrations/prometheus_library/index.md @@ -0,0 +1,33 @@ +# Prometheus Metrics library + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8935) in GitLab 9.0. + +GitLab offers automatic detection of select [Prometheus exporters](https://prometheus.io/docs/instrumenting/exporters/). + +## Exporters + +Currently supported exporters are: + +- [Kubernetes](kubernetes.md) +- [NGINX](nginx.md) +- [NGINX Ingress Controller](nginx_ingress.md) +- [HAProxy](haproxy.md) +- [Amazon Cloud Watch](cloudwatch.md) + +We have tried to surface the most important metrics for each exporter, and will +be continuing to add support for additional exporters in future releases. If you +would like to add support for other official exporters, contributions are welcome. + +## Identifying Environments + +GitLab retrieves performance data from the configured Prometheus server, and +attempts to identifying the presence of known metrics. Once identified, GitLab +then needs to be able to map the data to a particular environment. + +In order to isolate and only display relevant metrics for a given environment, +GitLab needs a method to detect which labels are associated. To do that, +GitLab uses the defined queries and fills in the environment specific variables. +Typically this involves looking for the +[`$CI_ENVIRONMENT_SLUG`](../../../../ci/variables/README.md#predefined-variables-environment-variables), +but may also include other information such as the project's Kubernetes namespace. +Each search query is defined in the [exporter specific documentation](#exporters). diff --git a/doc/user/project/integrations/prometheus_library/metrics.md b/doc/user/project/integrations/prometheus_library/metrics.md index ec16902fcc8..37a5388d2fc 100644 --- a/doc/user/project/integrations/prometheus_library/metrics.md +++ b/doc/user/project/integrations/prometheus_library/metrics.md @@ -1,19 +1 @@ -# Prometheus Metrics library - -> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/8935) in GitLab 9.0 - -GitLab offers automatic detection of select [Prometheus exporters](https://prometheus.io/docs/instrumenting/exporters/). Currently supported exporters are: -* [Kubernetes](kubernetes.md) -* [NGINX](nginx.md) -* [NGINX Ingress Controller](nginx_ingress.md) -* [HAProxy](haproxy.md) -* [Amazon Cloud Watch](cloudwatch.md) - -We have tried to surface the most important metrics for each exporter, and will be continuing to add support for additional exporters in future releases. If you would like to add support for other official exporters, [contributions](#adding-to-the-library) are welcome. - -## Identifying Environments - -GitLab retrieves performance data from the configured Prometheus server, and attempts to identifying the presence of known metrics. Once identified, GitLab then needs to be able to map the data to a particular environment. - -In order to isolate and only display relevant metrics for a given environment, GitLab needs a method to detect which labels are associated. To do that, -GitLab uses the defined queries and fills in the environment specific variables. Typically this involves looking for the [$CI_ENVIRONMENT_SLUG](../../../../ci/variables/README.md#predefined-variables-environment-variables), but may also include other information such as the project's Kubernetes namespace. Each search query is defined in the [exporter specific documentation](#prometheus-metrics-library). +This document was moved to [another location](index.md). diff --git a/doc/user/project/integrations/prometheus_library/nginx.md b/doc/user/project/integrations/prometheus_library/nginx.md index 557487e1a75..c4fea178ab5 100644 --- a/doc/user/project/integrations/prometheus_library/nginx.md +++ b/doc/user/project/integrations/prometheus_library/nginx.md @@ -27,4 +27,4 @@ If you are using NGINX as your Kubernetes ingress, GitLab will [automatically de ## Specifying the Environment label In order to isolate and only display relevant metrics for a given environment -however, GitLab needs a method to detect which labels are associated. To do this, GitLab will [look for an `environment` label](metrics.md#identifying-environments). +however, GitLab needs a method to detect which labels are associated. To do this, GitLab will [look for an `environment` label](index.md#identifying-environments). diff --git a/doc/user/project/labels.md b/doc/user/project/labels.md index 3ae6dbe585e..f7119f3bf3c 100644 --- a/doc/user/project/labels.md +++ b/doc/user/project/labels.md @@ -19,6 +19,7 @@ A permission level of `Developer` or higher is required to create labels. ### New project label To create a **project label**, navigate to **Issues > Labels** in the project. +This page only shows project labels in this project and group labels of this project's parent group. Click the **New label** button. Enter the title, an optional description, and the background color. Click **Create label** to create the label. @@ -33,6 +34,7 @@ GitLab will add the following default labels to the project: ### New group label To create a **group label**, follow similar steps from above to project labels. Navigate to **Issues > Labels** in the group and create it from there. +This page only shows group labels in this group. Group labels appear in every label list page of the group's child projects. diff --git a/doc/user/project/merge_requests/img/merge_request_diff_file_navigation.png b/doc/user/project/merge_requests/img/merge_request_diff_file_navigation.png Binary files differindex 3b3bf88df31..1cdac5ef573 100644 --- a/doc/user/project/merge_requests/img/merge_request_diff_file_navigation.png +++ b/doc/user/project/merge_requests/img/merge_request_diff_file_navigation.png diff --git a/doc/user/project/merge_requests/img/merge_request_pipeline.png b/doc/user/project/merge_requests/img/merge_request_pipeline.png Binary files differnew file mode 100644 index 00000000000..183d9cb910b --- /dev/null +++ b/doc/user/project/merge_requests/img/merge_request_pipeline.png diff --git a/doc/user/project/merge_requests/index.md b/doc/user/project/merge_requests/index.md index 8a68185798b..a0e7c1c99d5 100644 --- a/doc/user/project/merge_requests/index.md +++ b/doc/user/project/merge_requests/index.md @@ -231,9 +231,10 @@ have been marked as a **Work In Progress**. ## Merge request diff file navigation -The diff view has a file tree for file navigation. As you scroll through -diffs with a large number of files, you can easily jump to any changed file -using the file tree. +When reviewing changes in the **Changes** tab the diff can be navigated using +the file tree or file list. As you scroll through large diffs with many +changes, you can quickly jump to any changed file using the file tree or file +list. ![Merge request diff file navigation](img/merge_request_diff_file_navigation.png) @@ -258,6 +259,34 @@ all your changes will be available to preview by anyone with the Review Apps lin [Read more about Review Apps.](../../../ci/review_apps/index.md) +## Pipeline status in merge requests + +If you've set up [GitLab CI/CD](../../../ci/README.md) in your project, +you will be able to see: + +- Both pre and post-merge pipelines and the environment information if any. +- Which deployments are in progress. + +If there's an [environment](../../../ci/environments.md) and the application is +successfully deployed to it, the deployed environment and the link to the +Review App will be shown as well. + +### Post-merge pipeline status + +When a merge request is merged, you can see the post-merge pipeline status of +the branch the merge request was merged into. For example, when a merge request +is merged into the master branch and then triggers a deployment to the staging +environment. + +Deployments that are ongoing will be shown, as well as the deploying/deployed state +for environments. If it's the first time the branch is deployed, the link +will return a `404` error until done. During the deployment, the stop button will +be disabled. If the pipeline fails to deploy, the deployment info will be hidden. + +![Merge request pipeline](img/merge_request_pipeline.png) + +For more information, [read about pipelines](../../../ci/pipelines.md). + ## Bulk editing merge requests Find out about [bulk editing merge requests](../../project/bulk_editing.md). diff --git a/doc/user/project/pages/getting_started_part_three.md b/doc/user/project/pages/getting_started_part_three.md index 89b9621b8b9..26891348b0c 100644 --- a/doc/user/project/pages/getting_started_part_three.md +++ b/doc/user/project/pages/getting_started_part_three.md @@ -1,5 +1,5 @@ --- -last_updated: 2018-08-16 +last_updated: 2018-11-19 author: Marcia Ramos author_gitlab: marcia level: beginner @@ -183,7 +183,7 @@ you can use the following setup: - In Cloudflare, create a DNS `A` record pointing `domain.com` to `35.185.44.232` - In GitLab, add the domain to GitLab Pages - In Cloudflare, create a DNS `TXT` record to verify your domain -- In Cloudflare, create a DNS `CNAME` record poiting `www` to `domain.com` +- In Cloudflare, create a DNS `CNAME` record pointing `www` to `domain.com` ## SSL/TLS Certificates diff --git a/doc/user/project/pages/introduction.md b/doc/user/project/pages/introduction.md index fe4d15adfa1..9f9b64ec20d 100644 --- a/doc/user/project/pages/introduction.md +++ b/doc/user/project/pages/introduction.md @@ -441,6 +441,46 @@ The rest of the guide still applies. See also: [GitLab Pages from A to Z: Part 1 - Static sites and GitLab Pages domains](getting_started_part_one.md#gitlab-pages-domain). +## GitLab Pages access control **[CORE ONLY]** + +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/issues/33422) in GitLab 11.5. + +NOTE: **Note:** +GitLab Pages access control is not activated on GitLab.com. + +You can enable Pages access control on your project, so that only +[members of your project](../../permissions.md#project-members-permissions) +(at least Guest) can access your website: + +1. Navigate to your project's **Settings > General > Permissions**. +1. Toggle the **Pages** button to enable the access control. + + NOTE: **Note:** + If you don't see the toggle button, that means that it's not enabled. + Ask your administrator to [enable it](../../../administration/pages/index.md#access-control). + +1. The Pages access control dropdown allows you to set who can view pages hosted + with GitLab Pages, depending on your project's visibility: + + - If your project is private: + - **Only project members**: Only project members will be able to browse the website. + - **Everyone**: Everyone, both logged into and logged out of GitLab, will be able to browse the website, no matter their project membership. + - If your project is internal: + - **Only project members**: Only project members will be able to browse the website. + - **Everyone with access**: Everyone logged into GitLab will be able to browse the website, no matter their project membership. + - **Everyone**: Everyone, both logged into and logged out of GitLab, will be able to browse the website, no matter their project membership. + - If your project is public: + - **Only project members**: Only project members will be able to browse the website. + - **Everyone with access**: Everyone, both logged into and logged out of GitLab, will be able to browse the website, no matter their project membership. + +1. Click **Save changes**. + +--- + +The next time someone tries to access your website and the access control is +enabled, they will be presented with a page to sign into GitLab and verify they +can access the website. + ## Limitations When using Pages under the general domain of a GitLab instance (`*.example.io`), diff --git a/doc/user/project/quick_actions.md b/doc/user/project/quick_actions.md index 0a4542b71ed..85a03d125dd 100644 --- a/doc/user/project/quick_actions.md +++ b/doc/user/project/quick_actions.md @@ -53,6 +53,7 @@ discussions, and descriptions: | `/target_branch <Local branch Name>` | Set target branch | | ✓ | | `/wip` | Toggle the Work In Progress status | | ✓ | | `/merge` | Merge (when pipeline succeeds) | | ✓ | +| `/create_merge_request <branch name>` | Create a new merge request starting from the current issue | ✓ | | ## Quick actions for commit messages diff --git a/doc/user/project/settings/img/sharing_and_permissions_settings.png b/doc/user/project/settings/img/sharing_and_permissions_settings.png Binary files differindex f5e3e32f95c..6cb89c6ea1d 100644 --- a/doc/user/project/settings/img/sharing_and_permissions_settings.png +++ b/doc/user/project/settings/img/sharing_and_permissions_settings.png diff --git a/doc/user/project/web_ide/index.md b/doc/user/project/web_ide/index.md index 9429b1268f0..e6b1f6b6aae 100644 --- a/doc/user/project/web_ide/index.md +++ b/doc/user/project/web_ide/index.md @@ -22,6 +22,27 @@ searching. The file finder is launched using the keyboard shortcut `Command-p`, `Control-p`, or `t` (when editor is not in focus). Type the filename or file path fragments to start seeing results. +## Syntax highligting + +As expected from an IDE, syntax highlighting for many languages within +the Web IDE will make your direct editing even easier. + +The Web IDE currently provides: + +- Basic syntax colorization for a variety of programming, scripting and markup +languages such as XML, PHP, C#, C++, Markdown, Java, VB, Batch, Python, Ruby +and Objective-C. +- IntelliSense and validation support (displaying errors and warnings, providing +smart completions, formatting, and outlining) for some languages. For example: +TypeScript, JavaScript, CSS, LESS, SCSS, JSON and HTML. + +Because the Web IDE is based on the [Monaco Editor](https://microsoft.github.io/monaco-editor/), +you can find a more complete list of supported languages in the +[Monaco languages](https://github.com/Microsoft/monaco-languages) repository. + +NOTE: **Note:** +Single file editing is based on the [Ace Editor](https://ace.c9.io). + ## Stage and commit changes After making your changes, click the Commit button in the bottom left to diff --git a/doc/workflow/repository_mirroring.md b/doc/workflow/repository_mirroring.md index 4225d1aa31d..7eb324e3ece 100644 --- a/doc/workflow/repository_mirroring.md +++ b/doc/workflow/repository_mirroring.md @@ -135,23 +135,25 @@ If the mirror updates successfully, it will be enqueued once again with a small If the mirror fails (for example, a branch diverged from upstream), the project's backoff period is increased each time it fails, up to a maximum amount of time. -### SSH authentication **[STARTER]** +### SSH authentication -> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2551) in [GitLab Starter](https://about.gitlab.com/pricing/) 9.5. +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/2551) for Push mirroring in [GitLab Starter](https://about.gitlab.com/pricing/) 9.5. +> [Introduced](https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/22982) for Pull mirroring in [GitLab Core](https://about.gitlab.com/pricing/) 11.6 SSH authentication is mutual: - You have to prove to the server that you're allowed to access the repository. - The server also has to prove to *you* that it's who it claims to be. -You provide your credentials as a password or public key. The server that the source repository -resides on provides its credentials as a "host key", the fingerprint of which needs to be verified manually. +You provide your credentials as a password or public key. The server that the +other repository resides on provides its credentials as a "host key", the +fingerprint of which needs to be verified manually. If you're mirroring over SSH (that is, using an `ssh://` URL), you can authenticate using: - Password-based authentication, just as over HTTPS. -- Public key authentication. This is often more secure than password authentication, especially when - the source repository supports [Deploy Keys](../ssh/README.md#deploy-keys). +- Public key authentication. This is often more secure than password authentication, + especially when the other repository supports [Deploy Keys](../ssh/README.md#deploy-keys). To get started: @@ -171,9 +173,9 @@ If you click the: - **Detect host keys** button, GitLab will fetch the host keys from the server and display the fingerprints. - **Input host keys manually** button, a field is displayed where you can paste in host keys. -You now need to verify that the fingerprints are those you expect. GitLab.com -and other code hosting sites publish their fingerprints in the open for you -to check: +Assuming you used the former, you now need to verify that the fingerprints are +those you expect. GitLab.com and other code hosting sites publish their +fingerprints in the open for you to check: - [AWS CodeCommit](http://docs.aws.amazon.com/codecommit/latest/userguide/regions.html#regions-fingerprints) - [Bitbucket](https://confluence.atlassian.com/bitbucket/use-the-ssh-protocol-with-bitbucket-cloud-221449711.html#UsetheSSHprotocolwithBitbucketCloud-KnownhostorBitbucket%27spublickeyfingerprints) @@ -184,7 +186,8 @@ to check: - [SourceForge](https://sourceforge.net/p/forge/documentation/SSH%20Key%20Fingerprints/) Other providers will vary. If you're running self-managed GitLab, or otherwise -have access to the source server, you can securely gather the key fingerprints: +have access to the server for the other repository, you can securely gather the +key fingerprints: ```sh $ cat /etc/ssh/ssh_host*pub | ssh-keygen -E md5 -l -f - @@ -196,25 +199,27 @@ $ cat /etc/ssh/ssh_host*pub | ssh-keygen -E md5 -l -f - NOTE: **Note:** You may need to exclude `-E md5` for some older versions of SSH. -When pulling changes from the source repository, GitLab will now check that at least one of the stored -host keys matches before connecting. This can prevent malicious code from being injected into your -mirror, or your password being stolen. +When mirroring the repository, GitLab will now check that at least one of the +stored host keys matches before connecting. This can prevent malicious code from +being injected into your mirror, or your password being stolen. ### SSH public key authentication -To use SSH public key authentication, you'll also need to choose that option from the **Authentication method** -dropdown. GitLab will generate a 4096-bit RSA key and display the public component of that key to you. +To use SSH public key authentication, you'll also need to choose that option +from the **Authentication method** dropdown. GitLab will generate a 4096-bit RSA +key and display the public component of that key to you. -You then need to add the public SSH key to the source repository configuration. If: +You then need to add the public SSH key to the other repository's configuration: -- The source is hosted on GitLab, you should add the public SSH key as a [Deploy Key](../ssh/README.md#deploy-keys). -- The source is hosted elsewhere, you may need to add the key to your user's `authorized_keys` file. - Paste the entire public SSH key into the file on its own line and save it. +- If the other repository is hosted on GitLab, you should add the public SSH key + as a [Deploy Key](../ssh/README.md#deploy-keys). +- If the other repository is hosted elsewhere, you may need to add the key to + your user's `authorized_keys` file. Paste the entire public SSH key into the + file on its own line and save it. -Once the public key is set up on the source repository, click the **Mirror repository** button and -your mirror will begin working. - -If you need to change the key at any time, you can click the **Regenerate key** button to do so. You'll have to update the source repository with the new key to keep the mirror running. +If you need to change the key at any time, you can remove and re-add the mirror +to generate a new key. You'll have to update the other repository with the new +key to keep the mirror running. ### Overwrite diverged branches **[STARTER]** diff --git a/lib/gitlab.rb b/lib/gitlab.rb index 2bb09684441..2ef54658a11 100644 --- a/lib/gitlab.rb +++ b/lib/gitlab.rb @@ -53,4 +53,8 @@ module Gitlab def self.pre_release? VERSION.include?('pre') end + + def self.version_info + Gitlab::VersionInfo.parse(Gitlab::VERSION) + end end diff --git a/lib/gitlab/auth/saml/auth_hash.rb b/lib/gitlab/auth/saml/auth_hash.rb index 316354fd50c..1af9fa40c3a 100644 --- a/lib/gitlab/auth/saml/auth_hash.rb +++ b/lib/gitlab/auth/saml/auth_hash.rb @@ -28,7 +28,7 @@ module Gitlab end def extract_authn_context(document) - REXML::XPath.first(document, "//saml:AuthnStatement/saml:AuthnContext/saml:AuthnContextClassRef/text()").to_s + REXML::XPath.first(document, "//*[name()='saml:AuthnStatement' or name()='saml2:AuthnStatement']/*[name()='saml:AuthnContext' or name()='saml2:AuthnContext']/*[name()='saml:AuthnContextClassRef' or name()='saml2:AuthnContextClassRef']/text()").to_s end end end diff --git a/lib/gitlab/cache/ci/project_pipeline_status.rb b/lib/gitlab/cache/ci/project_pipeline_status.rb index dfbb83f7bb9..78b0eaac8cd 100644 --- a/lib/gitlab/cache/ci/project_pipeline_status.rb +++ b/lib/gitlab/cache/ci/project_pipeline_status.rb @@ -42,7 +42,7 @@ module Gitlab end def self.cache_key_for_project(project) - "#{Gitlab::Redis::Cache::CACHE_NAMESPACE}:projects/#{project.id}/pipeline_status/#{project.commit&.sha}" + "#{Gitlab::Redis::Cache::CACHE_NAMESPACE}:project:#{project.id}:pipeline_status:#{project.commit&.sha}" end def self.update_for_pipeline(pipeline) diff --git a/lib/gitlab/ci/config/entry/retry.rb b/lib/gitlab/ci/config/entry/retry.rb index e39cc5de229..ee82ab10f9c 100644 --- a/lib/gitlab/ci/config/entry/retry.rb +++ b/lib/gitlab/ci/config/entry/retry.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Ci class Config diff --git a/lib/gitlab/ci/variables/collection/item.rb b/lib/gitlab/ci/variables/collection/item.rb index fdf852e8788..cf8958e34c2 100644 --- a/lib/gitlab/ci/variables/collection/item.rb +++ b/lib/gitlab/ci/variables/collection/item.rb @@ -6,8 +6,8 @@ module Gitlab class Collection class Item def initialize(key:, value:, public: true, file: false) - raise ArgumentError, "`value` must be of type String, while it was: #{value.class}" unless - value.is_a?(String) || value.nil? + raise ArgumentError, "`#{key}` must be of type String, while it was: #{value.class}" unless + value.is_a?(String) @variable = { key: key, value: value, public: public, file: file diff --git a/lib/gitlab/git/remote_mirror.rb b/lib/gitlab/git/remote_mirror.rb index e992d522e7f..df3cd422527 100644 --- a/lib/gitlab/git/remote_mirror.rb +++ b/lib/gitlab/git/remote_mirror.rb @@ -5,14 +5,24 @@ module Gitlab class RemoteMirror include Gitlab::Git::WrapsGitalyErrors - def initialize(repository, ref_name) + attr_reader :repository, :ref_name, :only_branches_matching, :ssh_key, :known_hosts + + def initialize(repository, ref_name, only_branches_matching: [], ssh_key: nil, known_hosts: nil) @repository = repository @ref_name = ref_name + @only_branches_matching = only_branches_matching + @ssh_key = ssh_key + @known_hosts = known_hosts end - def update(only_branches_matching: []) + def update wrapped_gitaly_errors do - @repository.gitaly_remote_client.update_remote_mirror(@ref_name, only_branches_matching) + repository.gitaly_remote_client.update_remote_mirror( + ref_name, + only_branches_matching, + ssh_key: ssh_key, + known_hosts: known_hosts + ) end end end diff --git a/lib/gitlab/gitaly_client/remote_service.rb b/lib/gitlab/gitaly_client/remote_service.rb index 24e8a5e16d3..81fac37ee68 100644 --- a/lib/gitlab/gitaly_client/remote_service.rb +++ b/lib/gitlab/gitaly_client/remote_service.rb @@ -68,13 +68,18 @@ module Gitlab encode_utf8(response.ref) end - def update_remote_mirror(ref_name, only_branches_matching) + def update_remote_mirror(ref_name, only_branches_matching, ssh_key: nil, known_hosts: nil) req_enum = Enumerator.new do |y| - y.yield Gitaly::UpdateRemoteMirrorRequest.new( + first_request = Gitaly::UpdateRemoteMirrorRequest.new( repository: @gitaly_repo, ref_name: ref_name ) + first_request.ssh_key = ssh_key if ssh_key.present? + first_request.known_hosts = known_hosts if known_hosts.present? + + y.yield(first_request) + current_size = 0 slices = only_branches_matching.slice_before do |branch_name| diff --git a/lib/gitlab/gitaly_client/repository_service.rb b/lib/gitlab/gitaly_client/repository_service.rb index f968ebc2cbf..12a0ee16649 100644 --- a/lib/gitlab/gitaly_client/repository_service.rb +++ b/lib/gitlab/gitaly_client/repository_service.rb @@ -69,7 +69,7 @@ module Gitlab no_tags: no_tags, timeout: timeout, no_prune: !prune ) - if ssh_auth&.ssh_import? + if ssh_auth&.ssh_mirror_url? if ssh_auth.ssh_key_auth? && ssh_auth.ssh_private_key.present? request.ssh_key = ssh_auth.ssh_private_key end diff --git a/lib/gitlab/hook_data/base_builder.rb b/lib/gitlab/hook_data/base_builder.rb index 1a91301e8be..d54175bce81 100644 --- a/lib/gitlab/hook_data/base_builder.rb +++ b/lib/gitlab/hook_data/base_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module HookData class BaseBuilder diff --git a/lib/gitlab/hook_data/issuable_builder.rb b/lib/gitlab/hook_data/issuable_builder.rb index 65389835ad7..0803df65632 100644 --- a/lib/gitlab/hook_data/issuable_builder.rb +++ b/lib/gitlab/hook_data/issuable_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module HookData class IssuableBuilder < BaseBuilder diff --git a/lib/gitlab/hook_data/issue_builder.rb b/lib/gitlab/hook_data/issue_builder.rb index dd63db969f6..c99353b9d49 100644 --- a/lib/gitlab/hook_data/issue_builder.rb +++ b/lib/gitlab/hook_data/issue_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module HookData class IssueBuilder < BaseBuilder diff --git a/lib/gitlab/hook_data/merge_request_builder.rb b/lib/gitlab/hook_data/merge_request_builder.rb index 3aa6a4f3767..ad38e26e40a 100644 --- a/lib/gitlab/hook_data/merge_request_builder.rb +++ b/lib/gitlab/hook_data/merge_request_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module HookData class MergeRequestBuilder < BaseBuilder diff --git a/lib/gitlab/hook_data/note_builder.rb b/lib/gitlab/hook_data/note_builder.rb index 81873e345d5..ae30ef6364b 100644 --- a/lib/gitlab/hook_data/note_builder.rb +++ b/lib/gitlab/hook_data/note_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module HookData class NoteBuilder < BaseBuilder diff --git a/lib/gitlab/hook_data/wiki_page_builder.rb b/lib/gitlab/hook_data/wiki_page_builder.rb index 59c94a61cf2..67f06b1ca46 100644 --- a/lib/gitlab/hook_data/wiki_page_builder.rb +++ b/lib/gitlab/hook_data/wiki_page_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module HookData class WikiPageBuilder < BaseBuilder diff --git a/lib/gitlab/i18n/metadata_entry.rb b/lib/gitlab/i18n/metadata_entry.rb index 36fc1bcdcb7..3764e379681 100644 --- a/lib/gitlab/i18n/metadata_entry.rb +++ b/lib/gitlab/i18n/metadata_entry.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module I18n class MetadataEntry diff --git a/lib/gitlab/i18n/po_linter.rb b/lib/gitlab/i18n/po_linter.rb index d8e7269a2c2..644ef8c8589 100644 --- a/lib/gitlab/i18n/po_linter.rb +++ b/lib/gitlab/i18n/po_linter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module I18n class PoLinter diff --git a/lib/gitlab/i18n/translation_entry.rb b/lib/gitlab/i18n/translation_entry.rb index 54adb98f42d..19c10b2e402 100644 --- a/lib/gitlab/i18n/translation_entry.rb +++ b/lib/gitlab/i18n/translation_entry.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module I18n class TranslationEntry diff --git a/lib/gitlab/import/logger.rb b/lib/gitlab/import/logger.rb index 8414954d141..ab3e822a4e9 100644 --- a/lib/gitlab/import/logger.rb +++ b/lib/gitlab/import/logger.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Import class Logger < ::Gitlab::JsonLogger diff --git a/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb b/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb index 7cbf653dd97..d39b6fe5955 100644 --- a/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb +++ b/lib/gitlab/import_export/after_export_strategies/base_after_export_strategy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport module AfterExportStrategies diff --git a/lib/gitlab/import_export/after_export_strategies/download_notification_strategy.rb b/lib/gitlab/import_export/after_export_strategies/download_notification_strategy.rb index 4371a7eff56..1b391314a74 100644 --- a/lib/gitlab/import_export/after_export_strategies/download_notification_strategy.rb +++ b/lib/gitlab/import_export/after_export_strategies/download_notification_strategy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport module AfterExportStrategies diff --git a/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb b/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb index 4f29bdcea2c..b30900f7c61 100644 --- a/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb +++ b/lib/gitlab/import_export/after_export_strategies/web_upload_strategy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport module AfterExportStrategies diff --git a/lib/gitlab/import_export/after_export_strategy_builder.rb b/lib/gitlab/import_export/after_export_strategy_builder.rb index 7eabcae2380..37394f46a99 100644 --- a/lib/gitlab/import_export/after_export_strategy_builder.rb +++ b/lib/gitlab/import_export/after_export_strategy_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class AfterExportStrategyBuilder diff --git a/lib/gitlab/import_export/attribute_cleaner.rb b/lib/gitlab/import_export/attribute_cleaner.rb index 7c9fc5c15bb..93b37b7bc5f 100644 --- a/lib/gitlab/import_export/attribute_cleaner.rb +++ b/lib/gitlab/import_export/attribute_cleaner.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class AttributeCleaner diff --git a/lib/gitlab/import_export/attributes_finder.rb b/lib/gitlab/import_export/attributes_finder.rb index 0c8fda07294..409243e68a5 100644 --- a/lib/gitlab/import_export/attributes_finder.rb +++ b/lib/gitlab/import_export/attributes_finder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class AttributesFinder diff --git a/lib/gitlab/import_export/avatar_restorer.rb b/lib/gitlab/import_export/avatar_restorer.rb index 17796430811..be1b97bd7a7 100644 --- a/lib/gitlab/import_export/avatar_restorer.rb +++ b/lib/gitlab/import_export/avatar_restorer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class AvatarRestorer diff --git a/lib/gitlab/import_export/avatar_saver.rb b/lib/gitlab/import_export/avatar_saver.rb index 6ffebf83dd2..47ca898c690 100644 --- a/lib/gitlab/import_export/avatar_saver.rb +++ b/lib/gitlab/import_export/avatar_saver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class AvatarSaver diff --git a/lib/gitlab/import_export/command_line_util.rb b/lib/gitlab/import_export/command_line_util.rb index 3adc44f8044..c9e2a6a78d9 100644 --- a/lib/gitlab/import_export/command_line_util.rb +++ b/lib/gitlab/import_export/command_line_util.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport module CommandLineUtil diff --git a/lib/gitlab/import_export/error.rb b/lib/gitlab/import_export/error.rb index 788eedf2686..454dc778b6b 100644 --- a/lib/gitlab/import_export/error.rb +++ b/lib/gitlab/import_export/error.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport Error = Class.new(StandardError) diff --git a/lib/gitlab/import_export/file_importer.rb b/lib/gitlab/import_export/file_importer.rb index 7fd66b4e244..05432f433e7 100644 --- a/lib/gitlab/import_export/file_importer.rb +++ b/lib/gitlab/import_export/file_importer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class FileImporter diff --git a/lib/gitlab/import_export/group_project_object_builder.rb b/lib/gitlab/import_export/group_project_object_builder.rb index 6c2af770119..1c62591ed5a 100644 --- a/lib/gitlab/import_export/group_project_object_builder.rb +++ b/lib/gitlab/import_export/group_project_object_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport # Given a class, it finds or creates a new object diff --git a/lib/gitlab/import_export/hash_util.rb b/lib/gitlab/import_export/hash_util.rb index d4adeeb3797..b6ce89a973b 100644 --- a/lib/gitlab/import_export/hash_util.rb +++ b/lib/gitlab/import_export/hash_util.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class HashUtil diff --git a/lib/gitlab/import_export/import_export.yml b/lib/gitlab/import_export/import_export.yml index 9790818ecaf..b40eac3de9a 100644 --- a/lib/gitlab/import_export/import_export.yml +++ b/lib/gitlab/import_export/import_export.yml @@ -154,6 +154,8 @@ excluded_attributes: - :encrypted_token_iv - :encrypted_url - :encrypted_url_iv + services: + - :template methods: labels: diff --git a/lib/gitlab/import_export/importer.rb b/lib/gitlab/import_export/importer.rb index 72d5b9b830c..767f1b5de0e 100644 --- a/lib/gitlab/import_export/importer.rb +++ b/lib/gitlab/import_export/importer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class Importer diff --git a/lib/gitlab/import_export/json_hash_builder.rb b/lib/gitlab/import_export/json_hash_builder.rb index b48f63bcd7e..477499e1688 100644 --- a/lib/gitlab/import_export/json_hash_builder.rb +++ b/lib/gitlab/import_export/json_hash_builder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport # Generates a hash that conforms with http://apidock.com/rails/Hash/to_json diff --git a/lib/gitlab/import_export/lfs_restorer.rb b/lib/gitlab/import_export/lfs_restorer.rb index b28c3c161b7..345c7880e30 100644 --- a/lib/gitlab/import_export/lfs_restorer.rb +++ b/lib/gitlab/import_export/lfs_restorer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class LfsRestorer diff --git a/lib/gitlab/import_export/lfs_saver.rb b/lib/gitlab/import_export/lfs_saver.rb index 29410e2331c..954f6f00078 100644 --- a/lib/gitlab/import_export/lfs_saver.rb +++ b/lib/gitlab/import_export/lfs_saver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class LfsSaver diff --git a/lib/gitlab/import_export/members_mapper.rb b/lib/gitlab/import_export/members_mapper.rb index bcbaf00e11b..6be95a16513 100644 --- a/lib/gitlab/import_export/members_mapper.rb +++ b/lib/gitlab/import_export/members_mapper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class MembersMapper diff --git a/lib/gitlab/import_export/merge_request_parser.rb b/lib/gitlab/import_export/merge_request_parser.rb index 62a1833b39c..040a70d6775 100644 --- a/lib/gitlab/import_export/merge_request_parser.rb +++ b/lib/gitlab/import_export/merge_request_parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class MergeRequestParser diff --git a/lib/gitlab/import_export/project_tree_restorer.rb b/lib/gitlab/import_export/project_tree_restorer.rb index 99581eb0416..8cd4efd91cc 100644 --- a/lib/gitlab/import_export/project_tree_restorer.rb +++ b/lib/gitlab/import_export/project_tree_restorer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class ProjectTreeRestorer diff --git a/lib/gitlab/import_export/project_tree_saver.rb b/lib/gitlab/import_export/project_tree_saver.rb index 5510c0b8b2f..29f2dc80813 100644 --- a/lib/gitlab/import_export/project_tree_saver.rb +++ b/lib/gitlab/import_export/project_tree_saver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class ProjectTreeSaver diff --git a/lib/gitlab/import_export/reader.rb b/lib/gitlab/import_export/reader.rb index e621c40fc7a..bc0d18e03fa 100644 --- a/lib/gitlab/import_export/reader.rb +++ b/lib/gitlab/import_export/reader.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class Reader diff --git a/lib/gitlab/import_export/relation_factory.rb b/lib/gitlab/import_export/relation_factory.rb index 2486b1e4921..097c7653754 100644 --- a/lib/gitlab/import_export/relation_factory.rb +++ b/lib/gitlab/import_export/relation_factory.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class RelationFactory @@ -211,7 +213,7 @@ module Gitlab def update_note_for_missing_author(author_name) @relation_hash['note'] = '*Blank note*' if @relation_hash['note'].blank? - @relation_hash['note'] += missing_author_note(@relation_hash['updated_at'], author_name) + @relation_hash['note'] = "#{@relation_hash['note']}#{missing_author_note(@relation_hash['updated_at'], author_name)}" end def admin_user? diff --git a/lib/gitlab/import_export/repo_restorer.rb b/lib/gitlab/import_export/repo_restorer.rb index 5a9bbceac67..921a06b4023 100644 --- a/lib/gitlab/import_export/repo_restorer.rb +++ b/lib/gitlab/import_export/repo_restorer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class RepoRestorer diff --git a/lib/gitlab/import_export/repo_saver.rb b/lib/gitlab/import_export/repo_saver.rb index 0c224bd1971..a60618dfcec 100644 --- a/lib/gitlab/import_export/repo_saver.rb +++ b/lib/gitlab/import_export/repo_saver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class RepoSaver diff --git a/lib/gitlab/import_export/saver.rb b/lib/gitlab/import_export/saver.rb index 59a74083395..72f575db095 100644 --- a/lib/gitlab/import_export/saver.rb +++ b/lib/gitlab/import_export/saver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class Saver diff --git a/lib/gitlab/import_export/shared.rb b/lib/gitlab/import_export/shared.rb index 6d7c36ce38b..c13e6c1d83b 100644 --- a/lib/gitlab/import_export/shared.rb +++ b/lib/gitlab/import_export/shared.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class Shared diff --git a/lib/gitlab/import_export/statistics_restorer.rb b/lib/gitlab/import_export/statistics_restorer.rb index bcdd9c12c85..3fafb01c37c 100644 --- a/lib/gitlab/import_export/statistics_restorer.rb +++ b/lib/gitlab/import_export/statistics_restorer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class StatisticsRestorer diff --git a/lib/gitlab/import_export/uploads_manager.rb b/lib/gitlab/import_export/uploads_manager.rb index 8511319cb1c..474e9d45566 100644 --- a/lib/gitlab/import_export/uploads_manager.rb +++ b/lib/gitlab/import_export/uploads_manager.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class UploadsManager diff --git a/lib/gitlab/import_export/uploads_restorer.rb b/lib/gitlab/import_export/uploads_restorer.rb index b4313ff4cb4..5f422dcbefa 100644 --- a/lib/gitlab/import_export/uploads_restorer.rb +++ b/lib/gitlab/import_export/uploads_restorer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class UploadsRestorer < UploadsSaver diff --git a/lib/gitlab/import_export/uploads_saver.rb b/lib/gitlab/import_export/uploads_saver.rb index 0275f686c5e..be1066c30b2 100644 --- a/lib/gitlab/import_export/uploads_saver.rb +++ b/lib/gitlab/import_export/uploads_saver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class UploadsSaver diff --git a/lib/gitlab/import_export/version_checker.rb b/lib/gitlab/import_export/version_checker.rb index bd3c3ee3b2f..6d978d00ea5 100644 --- a/lib/gitlab/import_export/version_checker.rb +++ b/lib/gitlab/import_export/version_checker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class VersionChecker diff --git a/lib/gitlab/import_export/version_saver.rb b/lib/gitlab/import_export/version_saver.rb index 7cf88298642..8230c0f1e77 100644 --- a/lib/gitlab/import_export/version_saver.rb +++ b/lib/gitlab/import_export/version_saver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class VersionSaver diff --git a/lib/gitlab/import_export/wiki_repo_saver.rb b/lib/gitlab/import_export/wiki_repo_saver.rb index 2fd62c0fc7b..7303bcf61a4 100644 --- a/lib/gitlab/import_export/wiki_repo_saver.rb +++ b/lib/gitlab/import_export/wiki_repo_saver.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class WikiRepoSaver < RepoSaver diff --git a/lib/gitlab/import_export/wiki_restorer.rb b/lib/gitlab/import_export/wiki_restorer.rb index f33bfb332ab..28b5e7449cd 100644 --- a/lib/gitlab/import_export/wiki_restorer.rb +++ b/lib/gitlab/import_export/wiki_restorer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ImportExport class WikiRestorer < RepoRestorer diff --git a/lib/gitlab/kubernetes/config_map.rb b/lib/gitlab/kubernetes/config_map.rb index 9e55dae137c..0bcaaa03974 100644 --- a/lib/gitlab/kubernetes/config_map.rb +++ b/lib/gitlab/kubernetes/config_map.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Kubernetes class ConfigMap diff --git a/lib/gitlab/kubernetes/helm.rb b/lib/gitlab/kubernetes/helm.rb index 5a22b5e3364..03d38ec78fd 100644 --- a/lib/gitlab/kubernetes/helm.rb +++ b/lib/gitlab/kubernetes/helm.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Kubernetes module Helm diff --git a/lib/gitlab/kubernetes/helm/api.rb b/lib/gitlab/kubernetes/helm/api.rb index 7c026ac9e68..fd3d187cbc3 100644 --- a/lib/gitlab/kubernetes/helm/api.rb +++ b/lib/gitlab/kubernetes/helm/api.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Kubernetes module Helm diff --git a/lib/gitlab/kubernetes/helm/base_command.rb b/lib/gitlab/kubernetes/helm/base_command.rb index f2ce24fefa1..2bcb428b25d 100644 --- a/lib/gitlab/kubernetes/helm/base_command.rb +++ b/lib/gitlab/kubernetes/helm/base_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Kubernetes module Helm diff --git a/lib/gitlab/kubernetes/helm/client_command.rb b/lib/gitlab/kubernetes/helm/client_command.rb index 72bafc07bf0..9940272a8bf 100644 --- a/lib/gitlab/kubernetes/helm/client_command.rb +++ b/lib/gitlab/kubernetes/helm/client_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Kubernetes module Helm diff --git a/lib/gitlab/kubernetes/helm/init_command.rb b/lib/gitlab/kubernetes/helm/init_command.rb index 6691080deca..88ed8572ffc 100644 --- a/lib/gitlab/kubernetes/helm/init_command.rb +++ b/lib/gitlab/kubernetes/helm/init_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Kubernetes module Helm diff --git a/lib/gitlab/kubernetes/helm/install_command.rb b/lib/gitlab/kubernetes/helm/install_command.rb index 52700b5dc09..961485005f7 100644 --- a/lib/gitlab/kubernetes/helm/install_command.rb +++ b/lib/gitlab/kubernetes/helm/install_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Kubernetes module Helm diff --git a/lib/gitlab/kubernetes/helm/pod.rb b/lib/gitlab/kubernetes/helm/pod.rb index e9c621d96f0..75484f80070 100644 --- a/lib/gitlab/kubernetes/helm/pod.rb +++ b/lib/gitlab/kubernetes/helm/pod.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Kubernetes module Helm diff --git a/lib/gitlab/kubernetes/namespace.rb b/lib/gitlab/kubernetes/namespace.rb index 783c8a24741..919f19c86d7 100644 --- a/lib/gitlab/kubernetes/namespace.rb +++ b/lib/gitlab/kubernetes/namespace.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Kubernetes class Namespace diff --git a/lib/gitlab/kubernetes/pod.rb b/lib/gitlab/kubernetes/pod.rb index f3842cdf762..81317e532b2 100644 --- a/lib/gitlab/kubernetes/pod.rb +++ b/lib/gitlab/kubernetes/pod.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Kubernetes module Pod diff --git a/lib/gitlab/legacy_github_import/base_formatter.rb b/lib/gitlab/legacy_github_import/base_formatter.rb index 11d1300e51e..0b19cf742ed 100644 --- a/lib/gitlab/legacy_github_import/base_formatter.rb +++ b/lib/gitlab/legacy_github_import/base_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class BaseFormatter diff --git a/lib/gitlab/legacy_github_import/branch_formatter.rb b/lib/gitlab/legacy_github_import/branch_formatter.rb index 80fe1d67209..1177751457f 100644 --- a/lib/gitlab/legacy_github_import/branch_formatter.rb +++ b/lib/gitlab/legacy_github_import/branch_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class BranchFormatter < BaseFormatter diff --git a/lib/gitlab/legacy_github_import/client.rb b/lib/gitlab/legacy_github_import/client.rb index d8ed0ebca9d..bc952147667 100644 --- a/lib/gitlab/legacy_github_import/client.rb +++ b/lib/gitlab/legacy_github_import/client.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class Client diff --git a/lib/gitlab/legacy_github_import/comment_formatter.rb b/lib/gitlab/legacy_github_import/comment_formatter.rb index d2c7a8ae9f4..d83cc4f6b3c 100644 --- a/lib/gitlab/legacy_github_import/comment_formatter.rb +++ b/lib/gitlab/legacy_github_import/comment_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class CommentFormatter < BaseFormatter diff --git a/lib/gitlab/legacy_github_import/importer.rb b/lib/gitlab/legacy_github_import/importer.rb index c5bde681365..43695451b87 100644 --- a/lib/gitlab/legacy_github_import/importer.rb +++ b/lib/gitlab/legacy_github_import/importer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class Importer diff --git a/lib/gitlab/legacy_github_import/issuable_formatter.rb b/lib/gitlab/legacy_github_import/issuable_formatter.rb index 7db4a54267e..1a0aefbbd62 100644 --- a/lib/gitlab/legacy_github_import/issuable_formatter.rb +++ b/lib/gitlab/legacy_github_import/issuable_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class IssuableFormatter < BaseFormatter diff --git a/lib/gitlab/legacy_github_import/issue_formatter.rb b/lib/gitlab/legacy_github_import/issue_formatter.rb index 4c8825ccf19..2f46e2e30d1 100644 --- a/lib/gitlab/legacy_github_import/issue_formatter.rb +++ b/lib/gitlab/legacy_github_import/issue_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class IssueFormatter < IssuableFormatter diff --git a/lib/gitlab/legacy_github_import/label_formatter.rb b/lib/gitlab/legacy_github_import/label_formatter.rb index e9663650903..89200e794d8 100644 --- a/lib/gitlab/legacy_github_import/label_formatter.rb +++ b/lib/gitlab/legacy_github_import/label_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class LabelFormatter < BaseFormatter diff --git a/lib/gitlab/legacy_github_import/milestone_formatter.rb b/lib/gitlab/legacy_github_import/milestone_formatter.rb index a565294384d..2fe1b4258d3 100644 --- a/lib/gitlab/legacy_github_import/milestone_formatter.rb +++ b/lib/gitlab/legacy_github_import/milestone_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class MilestoneFormatter < BaseFormatter diff --git a/lib/gitlab/legacy_github_import/project_creator.rb b/lib/gitlab/legacy_github_import/project_creator.rb index 5e96eb16754..ca1a1b8e9bd 100644 --- a/lib/gitlab/legacy_github_import/project_creator.rb +++ b/lib/gitlab/legacy_github_import/project_creator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class ProjectCreator diff --git a/lib/gitlab/legacy_github_import/pull_request_formatter.rb b/lib/gitlab/legacy_github_import/pull_request_formatter.rb index 94c2e99066a..5b847f13d4a 100644 --- a/lib/gitlab/legacy_github_import/pull_request_formatter.rb +++ b/lib/gitlab/legacy_github_import/pull_request_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class PullRequestFormatter < IssuableFormatter diff --git a/lib/gitlab/legacy_github_import/release_formatter.rb b/lib/gitlab/legacy_github_import/release_formatter.rb index 3ed9d4f76da..8c0c17780ca 100644 --- a/lib/gitlab/legacy_github_import/release_formatter.rb +++ b/lib/gitlab/legacy_github_import/release_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class ReleaseFormatter < BaseFormatter diff --git a/lib/gitlab/legacy_github_import/user_formatter.rb b/lib/gitlab/legacy_github_import/user_formatter.rb index 3794380e2d0..ec0e221b1ff 100644 --- a/lib/gitlab/legacy_github_import/user_formatter.rb +++ b/lib/gitlab/legacy_github_import/user_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class UserFormatter diff --git a/lib/gitlab/legacy_github_import/wiki_formatter.rb b/lib/gitlab/legacy_github_import/wiki_formatter.rb index 27f45875c7c..ea52be5ee0f 100644 --- a/lib/gitlab/legacy_github_import/wiki_formatter.rb +++ b/lib/gitlab/legacy_github_import/wiki_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module LegacyGithubImport class WikiFormatter diff --git a/lib/gitlab/manifest_import/manifest.rb b/lib/gitlab/manifest_import/manifest.rb index b69b9ac4b64..7208fe5bbc5 100644 --- a/lib/gitlab/manifest_import/manifest.rb +++ b/lib/gitlab/manifest_import/manifest.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Class to parse manifest file and build a list of repositories for import # # <manifest> diff --git a/lib/gitlab/manifest_import/project_creator.rb b/lib/gitlab/manifest_import/project_creator.rb index b5967c93735..837d65e5f7c 100644 --- a/lib/gitlab/manifest_import/project_creator.rb +++ b/lib/gitlab/manifest_import/project_creator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ManifestImport class ProjectCreator diff --git a/lib/gitlab/metrics/background_transaction.rb b/lib/gitlab/metrics/background_transaction.rb index 5919ebb1493..fe1722b1095 100644 --- a/lib/gitlab/metrics/background_transaction.rb +++ b/lib/gitlab/metrics/background_transaction.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics class BackgroundTransaction < Transaction diff --git a/lib/gitlab/metrics/delta.rb b/lib/gitlab/metrics/delta.rb index bcf28eed84d..ab2d9e46390 100644 --- a/lib/gitlab/metrics/delta.rb +++ b/lib/gitlab/metrics/delta.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics # Class for calculating the difference between two numeric values. diff --git a/lib/gitlab/metrics/influx_db.rb b/lib/gitlab/metrics/influx_db.rb index ce9d3ec3de4..1359e973590 100644 --- a/lib/gitlab/metrics/influx_db.rb +++ b/lib/gitlab/metrics/influx_db.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics module InfluxDb diff --git a/lib/gitlab/metrics/instrumentation.rb b/lib/gitlab/metrics/instrumentation.rb index 023e9963493..651e241362c 100644 --- a/lib/gitlab/metrics/instrumentation.rb +++ b/lib/gitlab/metrics/instrumentation.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics # Module for instrumenting methods. diff --git a/lib/gitlab/metrics/method_call.rb b/lib/gitlab/metrics/method_call.rb index f3290e3149c..85438011cb9 100644 --- a/lib/gitlab/metrics/method_call.rb +++ b/lib/gitlab/metrics/method_call.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics # Class for tracking timing information about method calls diff --git a/lib/gitlab/metrics/methods.rb b/lib/gitlab/metrics/methods.rb index f79eb0cd1bf..447d03bfca4 100644 --- a/lib/gitlab/metrics/methods.rb +++ b/lib/gitlab/metrics/methods.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rubocop:disable Style/ClassVars module Gitlab diff --git a/lib/gitlab/metrics/methods/metric_options.rb b/lib/gitlab/metrics/methods/metric_options.rb index 70e122d4e15..8e6ceb74c09 100644 --- a/lib/gitlab/metrics/methods/metric_options.rb +++ b/lib/gitlab/metrics/methods/metric_options.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics module Methods diff --git a/lib/gitlab/metrics/metric.rb b/lib/gitlab/metrics/metric.rb index bd0afe53c51..9e4d70a71ff 100644 --- a/lib/gitlab/metrics/metric.rb +++ b/lib/gitlab/metrics/metric.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics # Class for storing details of a single metric (label, value, etc). diff --git a/lib/gitlab/metrics/null_metric.rb b/lib/gitlab/metrics/null_metric.rb index aabada5c21a..7dbd2a1f8e3 100644 --- a/lib/gitlab/metrics/null_metric.rb +++ b/lib/gitlab/metrics/null_metric.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics # Mocks ::Prometheus::Client::Metric and all derived metrics diff --git a/lib/gitlab/metrics/prometheus.rb b/lib/gitlab/metrics/prometheus.rb index d41a855bff1..cab1edab48f 100644 --- a/lib/gitlab/metrics/prometheus.rb +++ b/lib/gitlab/metrics/prometheus.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'prometheus/client' module Gitlab diff --git a/lib/gitlab/metrics/rack_middleware.rb b/lib/gitlab/metrics/rack_middleware.rb index 2d45765df3f..9aa97515961 100644 --- a/lib/gitlab/metrics/rack_middleware.rb +++ b/lib/gitlab/metrics/rack_middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics # Rack middleware for tracking Rails and Grape requests. diff --git a/lib/gitlab/metrics/requests_rack_middleware.rb b/lib/gitlab/metrics/requests_rack_middleware.rb index 0dc19f31d03..74c956ab5af 100644 --- a/lib/gitlab/metrics/requests_rack_middleware.rb +++ b/lib/gitlab/metrics/requests_rack_middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics class RequestsRackMiddleware diff --git a/lib/gitlab/metrics/samplers/base_sampler.rb b/lib/gitlab/metrics/samplers/base_sampler.rb index 37f90c4673d..6a062e93f0f 100644 --- a/lib/gitlab/metrics/samplers/base_sampler.rb +++ b/lib/gitlab/metrics/samplers/base_sampler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'logger' module Gitlab diff --git a/lib/gitlab/metrics/samplers/influx_sampler.rb b/lib/gitlab/metrics/samplers/influx_sampler.rb index ad97632e4eb..c4c38b23a55 100644 --- a/lib/gitlab/metrics/samplers/influx_sampler.rb +++ b/lib/gitlab/metrics/samplers/influx_sampler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics module Samplers diff --git a/lib/gitlab/metrics/samplers/ruby_sampler.rb b/lib/gitlab/metrics/samplers/ruby_sampler.rb index 7b2b3bedf04..232a58a7d69 100644 --- a/lib/gitlab/metrics/samplers/ruby_sampler.rb +++ b/lib/gitlab/metrics/samplers/ruby_sampler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'prometheus/client/support/unicorn' module Gitlab diff --git a/lib/gitlab/metrics/samplers/unicorn_sampler.rb b/lib/gitlab/metrics/samplers/unicorn_sampler.rb index ea325651fbb..4c4ec026823 100644 --- a/lib/gitlab/metrics/samplers/unicorn_sampler.rb +++ b/lib/gitlab/metrics/samplers/unicorn_sampler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics module Samplers diff --git a/lib/gitlab/metrics/sidekiq_metrics_exporter.rb b/lib/gitlab/metrics/sidekiq_metrics_exporter.rb index 47b4af5d649..56e106b9612 100644 --- a/lib/gitlab/metrics/sidekiq_metrics_exporter.rb +++ b/lib/gitlab/metrics/sidekiq_metrics_exporter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'webrick' require 'prometheus/client/rack/exporter' diff --git a/lib/gitlab/metrics/sidekiq_middleware.rb b/lib/gitlab/metrics/sidekiq_middleware.rb index df4bdf16847..0b4485feea9 100644 --- a/lib/gitlab/metrics/sidekiq_middleware.rb +++ b/lib/gitlab/metrics/sidekiq_middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics # Sidekiq middleware for tracking jobs. diff --git a/lib/gitlab/metrics/subscribers/action_view.rb b/lib/gitlab/metrics/subscribers/action_view.rb index b600e8a2a50..c068f8017fd 100644 --- a/lib/gitlab/metrics/subscribers/action_view.rb +++ b/lib/gitlab/metrics/subscribers/action_view.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics module Subscribers diff --git a/lib/gitlab/metrics/subscribers/active_record.rb b/lib/gitlab/metrics/subscribers/active_record.rb index 04107296ae3..a02dd850582 100644 --- a/lib/gitlab/metrics/subscribers/active_record.rb +++ b/lib/gitlab/metrics/subscribers/active_record.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics module Subscribers diff --git a/lib/gitlab/metrics/subscribers/rails_cache.rb b/lib/gitlab/metrics/subscribers/rails_cache.rb index 250897a79c2..f633e1a9d7c 100644 --- a/lib/gitlab/metrics/subscribers/rails_cache.rb +++ b/lib/gitlab/metrics/subscribers/rails_cache.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics module Subscribers diff --git a/lib/gitlab/metrics/system.rb b/lib/gitlab/metrics/system.rb index e60e245cf89..426496855e3 100644 --- a/lib/gitlab/metrics/system.rb +++ b/lib/gitlab/metrics/system.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics # Module for gathering system/process statistics such as the memory usage. diff --git a/lib/gitlab/metrics/transaction.rb b/lib/gitlab/metrics/transaction.rb index 9f903e96585..468d7cb56fc 100644 --- a/lib/gitlab/metrics/transaction.rb +++ b/lib/gitlab/metrics/transaction.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics # Class for storing metrics information of a single transaction. diff --git a/lib/gitlab/metrics/web_transaction.rb b/lib/gitlab/metrics/web_transaction.rb index 723ca576aab..b2a43d46fb2 100644 --- a/lib/gitlab/metrics/web_transaction.rb +++ b/lib/gitlab/metrics/web_transaction.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Metrics class WebTransaction < Transaction @@ -40,7 +42,7 @@ module Gitlab # increasing the cardinality of our metrics, we limit the number of # possible suffixes. if suffix && ALLOWED_SUFFIXES.include?(suffix) - action += ".#{suffix}" + action = "#{action}.#{suffix}" end { controller: controller.class.name, action: action } diff --git a/lib/gitlab/middleware/go.rb b/lib/gitlab/middleware/go.rb index 6943567fb6d..d1a87c3b3bb 100644 --- a/lib/gitlab/middleware/go.rb +++ b/lib/gitlab/middleware/go.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # A dumb middleware that returns a Go HTML document if the go-get=1 query string # is used irrespective if the namespace/project exists module Gitlab diff --git a/lib/gitlab/middleware/multipart.rb b/lib/gitlab/middleware/multipart.rb index 10cb1e7127e..84c2f0d5720 100644 --- a/lib/gitlab/middleware/multipart.rb +++ b/lib/gitlab/middleware/multipart.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Gitlab::Middleware::Multipart - a Rack::Multipart replacement # # Rack::Multipart leaves behind tempfiles in /tmp and uses valuable Ruby diff --git a/lib/gitlab/middleware/rails_queue_duration.rb b/lib/gitlab/middleware/rails_queue_duration.rb index bc70b2459ef..96c6a0a7d28 100644 --- a/lib/gitlab/middleware/rails_queue_duration.rb +++ b/lib/gitlab/middleware/rails_queue_duration.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This Rack middleware is intended to measure the latency between # gitlab-workhorse forwarding a request to the Rails application and the # time this middleware is reached. diff --git a/lib/gitlab/middleware/read_only.rb b/lib/gitlab/middleware/read_only.rb index 7f63e39b3aa..83c52a6c6e0 100644 --- a/lib/gitlab/middleware/read_only.rb +++ b/lib/gitlab/middleware/read_only.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Middleware class ReadOnly diff --git a/lib/gitlab/middleware/read_only/controller.rb b/lib/gitlab/middleware/read_only/controller.rb index 8dca431c005..89941a9efa0 100644 --- a/lib/gitlab/middleware/read_only/controller.rb +++ b/lib/gitlab/middleware/read_only/controller.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Middleware class ReadOnly diff --git a/lib/gitlab/middleware/release_env.rb b/lib/gitlab/middleware/release_env.rb index bfe8e113b5e..849cf8f759b 100644 --- a/lib/gitlab/middleware/release_env.rb +++ b/lib/gitlab/middleware/release_env.rb @@ -1,4 +1,7 @@ -module Gitlab # rubocop:disable Naming/FileName +# rubocop:disable Naming/FileName +# frozen_string_literal: true + +module Gitlab module Middleware # Some of middleware would hold env for no good reason even after the # request had already been processed, and we could not garbage collect diff --git a/lib/gitlab/middleware/static.rb b/lib/gitlab/middleware/static.rb index aa1e9dc0fdb..972fed2134c 100644 --- a/lib/gitlab/middleware/static.rb +++ b/lib/gitlab/middleware/static.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Middleware class Static < ActionDispatch::Static diff --git a/lib/gitlab/performance_bar/peek_query_tracker.rb b/lib/gitlab/performance_bar/peek_query_tracker.rb index 37ff32b1296..ac392432427 100644 --- a/lib/gitlab/performance_bar/peek_query_tracker.rb +++ b/lib/gitlab/performance_bar/peek_query_tracker.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Inspired by https://github.com/peek/peek-pg/blob/master/lib/peek/views/pg.rb # PEEK_DB_CLIENT is a constant set in config/initializers/peek.rb module Gitlab diff --git a/lib/gitlab/popen/runner.rb b/lib/gitlab/popen/runner.rb index f44035a48bb..cd9ad270cd8 100644 --- a/lib/gitlab/popen/runner.rb +++ b/lib/gitlab/popen/runner.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Popen class Runner diff --git a/lib/gitlab/private_commit_email.rb b/lib/gitlab/private_commit_email.rb index bade2248ccd..536fc9dae3a 100644 --- a/lib/gitlab/private_commit_email.rb +++ b/lib/gitlab/private_commit_email.rb @@ -18,6 +18,10 @@ module Gitlab match[:id].to_i end + def user_ids_for_emails(emails) + emails.map { |email| user_id_for_email(email) }.compact.uniq + end + def for_user(user) hostname = Gitlab::CurrentSettings.current_application_settings.commit_email_hostname diff --git a/lib/gitlab/profiler/total_time_flat_printer.rb b/lib/gitlab/profiler/total_time_flat_printer.rb index 2fd0ec10ba8..2c105d2722b 100644 --- a/lib/gitlab/profiler/total_time_flat_printer.rb +++ b/lib/gitlab/profiler/total_time_flat_printer.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Profiler class TotalTimeFlatPrinter < RubyProf::FlatPrinter diff --git a/lib/gitlab/project_authorizations/with_nested_groups.rb b/lib/gitlab/project_authorizations/with_nested_groups.rb index 448c3f3a7d8..2372a316ab0 100644 --- a/lib/gitlab/project_authorizations/with_nested_groups.rb +++ b/lib/gitlab/project_authorizations/with_nested_groups.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ProjectAuthorizations # Calculating new project authorizations when supporting nested groups. diff --git a/lib/gitlab/project_authorizations/without_nested_groups.rb b/lib/gitlab/project_authorizations/without_nested_groups.rb index ed2287dcc7e..50b41b17649 100644 --- a/lib/gitlab/project_authorizations/without_nested_groups.rb +++ b/lib/gitlab/project_authorizations/without_nested_groups.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module ProjectAuthorizations # Calculating new project authorizations when not supporting nested groups. diff --git a/lib/gitlab/prometheus/additional_metrics_parser.rb b/lib/gitlab/prometheus/additional_metrics_parser.rb index a240d090074..bd4ca578840 100644 --- a/lib/gitlab/prometheus/additional_metrics_parser.rb +++ b/lib/gitlab/prometheus/additional_metrics_parser.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Prometheus module AdditionalMetricsParser diff --git a/lib/gitlab/prometheus/metric.rb b/lib/gitlab/prometheus/metric.rb index 13cc59df795..7ebfc2e25a9 100644 --- a/lib/gitlab/prometheus/metric.rb +++ b/lib/gitlab/prometheus/metric.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Prometheus class Metric diff --git a/lib/gitlab/prometheus/metric_group.rb b/lib/gitlab/prometheus/metric_group.rb index d696a8fc00c..8f30cdee232 100644 --- a/lib/gitlab/prometheus/metric_group.rb +++ b/lib/gitlab/prometheus/metric_group.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Prometheus class MetricGroup diff --git a/lib/gitlab/prometheus/parsing_error.rb b/lib/gitlab/prometheus/parsing_error.rb index 49cc0e16080..20b5ef5ce55 100644 --- a/lib/gitlab/prometheus/parsing_error.rb +++ b/lib/gitlab/prometheus/parsing_error.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Prometheus ParsingError = Class.new(StandardError) diff --git a/lib/gitlab/prometheus/queries/additional_metrics_deployment_query.rb b/lib/gitlab/prometheus/queries/additional_metrics_deployment_query.rb index fa86d2dfd6c..ab6ef7d5466 100644 --- a/lib/gitlab/prometheus/queries/additional_metrics_deployment_query.rb +++ b/lib/gitlab/prometheus/queries/additional_metrics_deployment_query.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Prometheus module Queries diff --git a/lib/gitlab/prometheus/queries/additional_metrics_environment_query.rb b/lib/gitlab/prometheus/queries/additional_metrics_environment_query.rb index 09f8f1103d2..34b705138ba 100644 --- a/lib/gitlab/prometheus/queries/additional_metrics_environment_query.rb +++ b/lib/gitlab/prometheus/queries/additional_metrics_environment_query.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Prometheus module Queries diff --git a/lib/gitlab/prometheus/queries/base_query.rb b/lib/gitlab/prometheus/queries/base_query.rb index 29cab6e9c15..9ff414d5236 100644 --- a/lib/gitlab/prometheus/queries/base_query.rb +++ b/lib/gitlab/prometheus/queries/base_query.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Prometheus module Queries diff --git a/lib/gitlab/prometheus/queries/deployment_query.rb b/lib/gitlab/prometheus/queries/deployment_query.rb index 3a609a795ba..fc32c4353f0 100644 --- a/lib/gitlab/prometheus/queries/deployment_query.rb +++ b/lib/gitlab/prometheus/queries/deployment_query.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Prometheus module Queries diff --git a/lib/gitlab/prometheus/queries/environment_query.rb b/lib/gitlab/prometheus/queries/environment_query.rb index 4d8b136d7af..56195f85a70 100644 --- a/lib/gitlab/prometheus/queries/environment_query.rb +++ b/lib/gitlab/prometheus/queries/environment_query.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Prometheus module Queries diff --git a/lib/gitlab/prometheus/queries/matched_metric_query.rb b/lib/gitlab/prometheus/queries/matched_metric_query.rb index d920e9a749f..32294756aa2 100644 --- a/lib/gitlab/prometheus/queries/matched_metric_query.rb +++ b/lib/gitlab/prometheus/queries/matched_metric_query.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Prometheus module Queries diff --git a/lib/gitlab/prometheus/queries/query_additional_metrics.rb b/lib/gitlab/prometheus/queries/query_additional_metrics.rb index 3be35f189d0..43508af96a7 100644 --- a/lib/gitlab/prometheus/queries/query_additional_metrics.rb +++ b/lib/gitlab/prometheus/queries/query_additional_metrics.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Prometheus module Queries diff --git a/lib/gitlab/query_limiting/active_support_subscriber.rb b/lib/gitlab/query_limiting/active_support_subscriber.rb index 3c4ff5d1928..065862174bb 100644 --- a/lib/gitlab/query_limiting/active_support_subscriber.rb +++ b/lib/gitlab/query_limiting/active_support_subscriber.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module QueryLimiting class ActiveSupportSubscriber < ActiveSupport::Subscriber diff --git a/lib/gitlab/query_limiting/transaction.rb b/lib/gitlab/query_limiting/transaction.rb index 66d7d9275cf..e8fad067fa6 100644 --- a/lib/gitlab/query_limiting/transaction.rb +++ b/lib/gitlab/query_limiting/transaction.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module QueryLimiting class Transaction @@ -68,7 +70,7 @@ module Gitlab def error_message header = 'Too many SQL queries were executed' - header += " in #{action}" if action + header = "#{header} in #{action}" if action "#{header}: a maximum of #{THRESHOLD} is allowed but #{count} SQL queries were executed" end diff --git a/lib/gitlab/quick_actions/command_definition.rb b/lib/gitlab/quick_actions/command_definition.rb index c682eb22890..259345b8a9a 100644 --- a/lib/gitlab/quick_actions/command_definition.rb +++ b/lib/gitlab/quick_actions/command_definition.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module QuickActions class CommandDefinition diff --git a/lib/gitlab/quick_actions/dsl.rb b/lib/gitlab/quick_actions/dsl.rb index 192c7ec2ff5..a3aab92061b 100644 --- a/lib/gitlab/quick_actions/dsl.rb +++ b/lib/gitlab/quick_actions/dsl.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module QuickActions module Dsl diff --git a/lib/gitlab/quick_actions/extractor.rb b/lib/gitlab/quick_actions/extractor.rb index 59f8dd889aa..ff9bb293b47 100644 --- a/lib/gitlab/quick_actions/extractor.rb +++ b/lib/gitlab/quick_actions/extractor.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module QuickActions # This class takes an array of commands that should be extracted from a diff --git a/lib/gitlab/quick_actions/spend_time_and_date_separator.rb b/lib/gitlab/quick_actions/spend_time_and_date_separator.rb index 7328c517a30..f5176376a60 100644 --- a/lib/gitlab/quick_actions/spend_time_and_date_separator.rb +++ b/lib/gitlab/quick_actions/spend_time_and_date_separator.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module QuickActions # This class takes spend command argument diff --git a/lib/gitlab/quick_actions/substitution_definition.rb b/lib/gitlab/quick_actions/substitution_definition.rb index 688056e5d73..2f78ea05cf0 100644 --- a/lib/gitlab/quick_actions/substitution_definition.rb +++ b/lib/gitlab/quick_actions/substitution_definition.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module QuickActions class SubstitutionDefinition < CommandDefinition diff --git a/lib/gitlab/redis/cache.rb b/lib/gitlab/redis/cache.rb index a991933e910..6e8403ad878 100644 --- a/lib/gitlab/redis/cache.rb +++ b/lib/gitlab/redis/cache.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # please require all dependencies below: require_relative 'wrapper' unless defined?(::Rails) && ::Rails.root.present? diff --git a/lib/gitlab/redis/queues.rb b/lib/gitlab/redis/queues.rb index e1695aafbeb..8b42c269dd0 100644 --- a/lib/gitlab/redis/queues.rb +++ b/lib/gitlab/redis/queues.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # please require all dependencies below: require_relative 'wrapper' unless defined?(::Gitlab::Redis::Wrapper) diff --git a/lib/gitlab/redis/shared_state.rb b/lib/gitlab/redis/shared_state.rb index e5a0fdae7ef..9066606ca21 100644 --- a/lib/gitlab/redis/shared_state.rb +++ b/lib/gitlab/redis/shared_state.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # please require all dependencies below: require_relative 'wrapper' unless defined?(::Gitlab::Redis::Wrapper) diff --git a/lib/gitlab/redis/wrapper.rb b/lib/gitlab/redis/wrapper.rb index 4178b436acf..07a1e20b076 100644 --- a/lib/gitlab/redis/wrapper.rb +++ b/lib/gitlab/redis/wrapper.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This file should only be used by sub-classes, not directly by any clients of the sub-classes # please require all dependencies below: require 'active_support/core_ext/hash/keys' diff --git a/lib/gitlab/repository_cache.rb b/lib/gitlab/repository_cache.rb index 56007574b1b..6b0808f5304 100644 --- a/lib/gitlab/repository_cache.rb +++ b/lib/gitlab/repository_cache.rb @@ -7,13 +7,13 @@ module Gitlab def initialize(repository, extra_namespace: nil, backend: Rails.cache) @repository = repository - @namespace = "#{repository.full_path}:#{repository.project.id}" + @namespace = "project:#{repository.project.id}" @namespace = "#{@namespace}:#{extra_namespace}" if extra_namespace @backend = backend end def cache_key(type) - "#{type}:#{namespace}" + "#{namespace}:#{type}" end def expire(key) diff --git a/lib/gitlab/request_profiler/middleware.rb b/lib/gitlab/request_profiler/middleware.rb index ef42b0557e0..7615f6f443b 100644 --- a/lib/gitlab/request_profiler/middleware.rb +++ b/lib/gitlab/request_profiler/middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'ruby-prof' module Gitlab diff --git a/lib/gitlab/request_profiler/profile.rb b/lib/gitlab/request_profiler/profile.rb index f89d56903ef..46996ef8c51 100644 --- a/lib/gitlab/request_profiler/profile.rb +++ b/lib/gitlab/request_profiler/profile.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module RequestProfiler class Profile diff --git a/lib/gitlab/sanitizers/svg.rb b/lib/gitlab/sanitizers/svg.rb index 8304b9a482c..0d4e6be2129 100644 --- a/lib/gitlab/sanitizers/svg.rb +++ b/lib/gitlab/sanitizers/svg.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Sanitizers module SVG diff --git a/lib/gitlab/sanitizers/svg/whitelist.rb b/lib/gitlab/sanitizers/svg/whitelist.rb index d50f826f924..b4da24b3215 100644 --- a/lib/gitlab/sanitizers/svg/whitelist.rb +++ b/lib/gitlab/sanitizers/svg/whitelist.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Generated from: # SVG element list: https://www.w3.org/TR/SVG/eltindex.html # SVG Attribute list: https://www.w3.org/TR/SVG/attindex.html diff --git a/lib/gitlab/search/parsed_query.rb b/lib/gitlab/search/parsed_query.rb index 23595f23f01..c4fb0199558 100644 --- a/lib/gitlab/search/parsed_query.rb +++ b/lib/gitlab/search/parsed_query.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Search class ParsedQuery diff --git a/lib/gitlab/search/query.rb b/lib/gitlab/search/query.rb index 8583bce7792..7f69083a492 100644 --- a/lib/gitlab/search/query.rb +++ b/lib/gitlab/search/query.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Search class Query < SimpleDelegator diff --git a/lib/gitlab/serializer/ci/variables.rb b/lib/gitlab/serializer/ci/variables.rb index 292c8de6229..9abf3a54f37 100644 --- a/lib/gitlab/serializer/ci/variables.rb +++ b/lib/gitlab/serializer/ci/variables.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Serializer module Ci diff --git a/lib/gitlab/serializer/pagination.rb b/lib/gitlab/serializer/pagination.rb index 6bb00d8ae21..eb242cc7c20 100644 --- a/lib/gitlab/serializer/pagination.rb +++ b/lib/gitlab/serializer/pagination.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Serializer class Pagination diff --git a/lib/gitlab/sherlock/collection.rb b/lib/gitlab/sherlock/collection.rb index 66bd6258521..ce3a376cf75 100644 --- a/lib/gitlab/sherlock/collection.rb +++ b/lib/gitlab/sherlock/collection.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Sherlock # A collection of transactions recorded by Sherlock. diff --git a/lib/gitlab/sherlock/file_sample.rb b/lib/gitlab/sherlock/file_sample.rb index 89072b01f2e..604b6df12cc 100644 --- a/lib/gitlab/sherlock/file_sample.rb +++ b/lib/gitlab/sherlock/file_sample.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Sherlock class FileSample diff --git a/lib/gitlab/sherlock/line_profiler.rb b/lib/gitlab/sherlock/line_profiler.rb index b5f9d040047..209ba784f9c 100644 --- a/lib/gitlab/sherlock/line_profiler.rb +++ b/lib/gitlab/sherlock/line_profiler.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Sherlock # Class for profiling code on a per line basis. diff --git a/lib/gitlab/sherlock/line_sample.rb b/lib/gitlab/sherlock/line_sample.rb index eb1948eb6d6..c92fa9ea1ff 100644 --- a/lib/gitlab/sherlock/line_sample.rb +++ b/lib/gitlab/sherlock/line_sample.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Sherlock class LineSample diff --git a/lib/gitlab/sherlock/location.rb b/lib/gitlab/sherlock/location.rb index 5ac265618ad..4bba60f3490 100644 --- a/lib/gitlab/sherlock/location.rb +++ b/lib/gitlab/sherlock/location.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Sherlock class Location diff --git a/lib/gitlab/sherlock/middleware.rb b/lib/gitlab/sherlock/middleware.rb index 4c88e33699a..747cb0f9142 100644 --- a/lib/gitlab/sherlock/middleware.rb +++ b/lib/gitlab/sherlock/middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Sherlock # Rack middleware used for tracking request metrics. diff --git a/lib/gitlab/sherlock/query.rb b/lib/gitlab/sherlock/query.rb index 02ddc3f47eb..11561eec32a 100644 --- a/lib/gitlab/sherlock/query.rb +++ b/lib/gitlab/sherlock/query.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Sherlock class Query @@ -48,7 +50,7 @@ module Gitlab end unless @query.end_with?(';') - @query += ';' + @query = "#{@query};" end end diff --git a/lib/gitlab/sherlock/transaction.rb b/lib/gitlab/sherlock/transaction.rb index 400a552bf99..d04624977dc 100644 --- a/lib/gitlab/sherlock/transaction.rb +++ b/lib/gitlab/sherlock/transaction.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Sherlock class Transaction diff --git a/lib/gitlab/sidekiq_logging/json_formatter.rb b/lib/gitlab/sidekiq_logging/json_formatter.rb index 98f8222fd03..88888c5994e 100644 --- a/lib/gitlab/sidekiq_logging/json_formatter.rb +++ b/lib/gitlab/sidekiq_logging/json_formatter.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SidekiqLogging class JSONFormatter diff --git a/lib/gitlab/sidekiq_logging/structured_logger.rb b/lib/gitlab/sidekiq_logging/structured_logger.rb index 9a89ae70b98..e86db8db3a1 100644 --- a/lib/gitlab/sidekiq_logging/structured_logger.rb +++ b/lib/gitlab/sidekiq_logging/structured_logger.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SidekiqLogging class StructuredLogger diff --git a/lib/gitlab/sidekiq_middleware/arguments_logger.rb b/lib/gitlab/sidekiq_middleware/arguments_logger.rb index 82a59a7a87e..2859aa5f4a6 100644 --- a/lib/gitlab/sidekiq_middleware/arguments_logger.rb +++ b/lib/gitlab/sidekiq_middleware/arguments_logger.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SidekiqMiddleware class ArgumentsLogger diff --git a/lib/gitlab/sidekiq_middleware/request_store_middleware.rb b/lib/gitlab/sidekiq_middleware/request_store_middleware.rb index b1fa0e3cb4e..8824f81e8e3 100644 --- a/lib/gitlab/sidekiq_middleware/request_store_middleware.rb +++ b/lib/gitlab/sidekiq_middleware/request_store_middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SidekiqMiddleware class RequestStoreMiddleware diff --git a/lib/gitlab/sidekiq_middleware/shutdown.rb b/lib/gitlab/sidekiq_middleware/shutdown.rb index b232ac4da33..19f3be83bce 100644 --- a/lib/gitlab/sidekiq_middleware/shutdown.rb +++ b/lib/gitlab/sidekiq_middleware/shutdown.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'mutex_m' module Gitlab diff --git a/lib/gitlab/sidekiq_status/client_middleware.rb b/lib/gitlab/sidekiq_status/client_middleware.rb index 00983b3284a..bfd5038557d 100644 --- a/lib/gitlab/sidekiq_status/client_middleware.rb +++ b/lib/gitlab/sidekiq_status/client_middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SidekiqStatus class ClientMiddleware diff --git a/lib/gitlab/sidekiq_status/server_middleware.rb b/lib/gitlab/sidekiq_status/server_middleware.rb index ceab10b8301..01bc58fd2be 100644 --- a/lib/gitlab/sidekiq_status/server_middleware.rb +++ b/lib/gitlab/sidekiq_status/server_middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SidekiqStatus class ServerMiddleware diff --git a/lib/gitlab/sidekiq_versioning/manager.rb b/lib/gitlab/sidekiq_versioning/manager.rb index 308be0fdf76..e5852b43003 100644 --- a/lib/gitlab/sidekiq_versioning/manager.rb +++ b/lib/gitlab/sidekiq_versioning/manager.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SidekiqVersioning module Manager diff --git a/lib/gitlab/slash_commands/base_command.rb b/lib/gitlab/slash_commands/base_command.rb index 0c76378d51c..fcc120112f2 100644 --- a/lib/gitlab/slash_commands/base_command.rb +++ b/lib/gitlab/slash_commands/base_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands class BaseCommand diff --git a/lib/gitlab/slash_commands/command.rb b/lib/gitlab/slash_commands/command.rb index c82320a6036..474c09b9c4d 100644 --- a/lib/gitlab/slash_commands/command.rb +++ b/lib/gitlab/slash_commands/command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands class Command < BaseCommand diff --git a/lib/gitlab/slash_commands/deploy.rb b/lib/gitlab/slash_commands/deploy.rb index b308fd9637f..157d924f99f 100644 --- a/lib/gitlab/slash_commands/deploy.rb +++ b/lib/gitlab/slash_commands/deploy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands class Deploy < BaseCommand diff --git a/lib/gitlab/slash_commands/help.rb b/lib/gitlab/slash_commands/help.rb index 81f3707e03e..dbe15baa3d7 100644 --- a/lib/gitlab/slash_commands/help.rb +++ b/lib/gitlab/slash_commands/help.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands class Help < BaseCommand diff --git a/lib/gitlab/slash_commands/issue_command.rb b/lib/gitlab/slash_commands/issue_command.rb index 3d96982b820..4c8dc4b1784 100644 --- a/lib/gitlab/slash_commands/issue_command.rb +++ b/lib/gitlab/slash_commands/issue_command.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands class IssueCommand < BaseCommand diff --git a/lib/gitlab/slash_commands/issue_move.rb b/lib/gitlab/slash_commands/issue_move.rb index 3985e635983..d2f1f130b38 100644 --- a/lib/gitlab/slash_commands/issue_move.rb +++ b/lib/gitlab/slash_commands/issue_move.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands class IssueMove < IssueCommand diff --git a/lib/gitlab/slash_commands/issue_new.rb b/lib/gitlab/slash_commands/issue_new.rb index 6396b828dc7..48379031537 100644 --- a/lib/gitlab/slash_commands/issue_new.rb +++ b/lib/gitlab/slash_commands/issue_new.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands class IssueNew < IssueCommand diff --git a/lib/gitlab/slash_commands/issue_search.rb b/lib/gitlab/slash_commands/issue_search.rb index ee78f0f832e..0a705de4484 100644 --- a/lib/gitlab/slash_commands/issue_search.rb +++ b/lib/gitlab/slash_commands/issue_search.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands class IssueSearch < IssueCommand diff --git a/lib/gitlab/slash_commands/issue_show.rb b/lib/gitlab/slash_commands/issue_show.rb index ffa5184e5cb..5f5fa32ff20 100644 --- a/lib/gitlab/slash_commands/issue_show.rb +++ b/lib/gitlab/slash_commands/issue_show.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands class IssueShow < IssueCommand diff --git a/lib/gitlab/slash_commands/presenters/access.rb b/lib/gitlab/slash_commands/presenters/access.rb index 81f7cd3ffe8..fa163cb098e 100644 --- a/lib/gitlab/slash_commands/presenters/access.rb +++ b/lib/gitlab/slash_commands/presenters/access.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands module Presenters diff --git a/lib/gitlab/slash_commands/presenters/base.rb b/lib/gitlab/slash_commands/presenters/base.rb index e13808a2720..73814aa180f 100644 --- a/lib/gitlab/slash_commands/presenters/base.rb +++ b/lib/gitlab/slash_commands/presenters/base.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands module Presenters diff --git a/lib/gitlab/slash_commands/presenters/deploy.rb b/lib/gitlab/slash_commands/presenters/deploy.rb index ebae0f57f9b..7d852eb1f9a 100644 --- a/lib/gitlab/slash_commands/presenters/deploy.rb +++ b/lib/gitlab/slash_commands/presenters/deploy.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands module Presenters diff --git a/lib/gitlab/slash_commands/presenters/help.rb b/lib/gitlab/slash_commands/presenters/help.rb index ab855319077..480d7aa6a30 100644 --- a/lib/gitlab/slash_commands/presenters/help.rb +++ b/lib/gitlab/slash_commands/presenters/help.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands module Presenters diff --git a/lib/gitlab/slash_commands/presenters/issue_base.rb b/lib/gitlab/slash_commands/presenters/issue_base.rb index 31c1e97efba..b6db103b82b 100644 --- a/lib/gitlab/slash_commands/presenters/issue_base.rb +++ b/lib/gitlab/slash_commands/presenters/issue_base.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands module Presenters diff --git a/lib/gitlab/slash_commands/presenters/issue_move.rb b/lib/gitlab/slash_commands/presenters/issue_move.rb index 03921729941..ca0644ede95 100644 --- a/lib/gitlab/slash_commands/presenters/issue_move.rb +++ b/lib/gitlab/slash_commands/presenters/issue_move.rb @@ -1,4 +1,6 @@ # coding: utf-8 +# frozen_string_literal: true + module Gitlab module SlashCommands module Presenters diff --git a/lib/gitlab/slash_commands/presenters/issue_new.rb b/lib/gitlab/slash_commands/presenters/issue_new.rb index 5964bfe9960..ac78745ae70 100644 --- a/lib/gitlab/slash_commands/presenters/issue_new.rb +++ b/lib/gitlab/slash_commands/presenters/issue_new.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands module Presenters diff --git a/lib/gitlab/slash_commands/presenters/issue_search.rb b/lib/gitlab/slash_commands/presenters/issue_search.rb index 4e27d668685..0d497efec0e 100644 --- a/lib/gitlab/slash_commands/presenters/issue_search.rb +++ b/lib/gitlab/slash_commands/presenters/issue_search.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands module Presenters diff --git a/lib/gitlab/slash_commands/presenters/issue_show.rb b/lib/gitlab/slash_commands/presenters/issue_show.rb index 562f15f403c..5a2c79a928e 100644 --- a/lib/gitlab/slash_commands/presenters/issue_show.rb +++ b/lib/gitlab/slash_commands/presenters/issue_show.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SlashCommands module Presenters @@ -38,10 +40,10 @@ module Gitlab end def text - message = "**#{status_text(@resource)}**" + message = ["**#{status_text(@resource)}**"] if @resource.upvotes.zero? && @resource.downvotes.zero? && @resource.user_notes_count.zero? - return message + return message.join end message << " · " @@ -49,7 +51,7 @@ module Gitlab message << ":-1: #{@resource.downvotes} " unless @resource.downvotes.zero? message << ":speech_balloon: #{@resource.user_notes_count}" unless @resource.user_notes_count.zero? - message + message.join end def pretext diff --git a/lib/gitlab/slash_commands/result.rb b/lib/gitlab/slash_commands/result.rb index 3669dedf0fe..607c9c8dec1 100644 --- a/lib/gitlab/slash_commands/result.rb +++ b/lib/gitlab/slash_commands/result.rb @@ -1,4 +1,7 @@ -module Gitlab # rubocop:disable Naming/FileName +# rubocop:disable Naming/FileName +# frozen_string_literal: true + +module Gitlab module SlashCommands Result = Struct.new(:type, :message) end diff --git a/lib/gitlab/sql/cte.rb b/lib/gitlab/sql/cte.rb index f357829ba3f..7817a2a1ce2 100644 --- a/lib/gitlab/sql/cte.rb +++ b/lib/gitlab/sql/cte.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SQL # Class for easily building CTE statements. diff --git a/lib/gitlab/sql/glob.rb b/lib/gitlab/sql/glob.rb index 5e89e12b2b1..f3421bd95d2 100644 --- a/lib/gitlab/sql/glob.rb +++ b/lib/gitlab/sql/glob.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SQL module Glob diff --git a/lib/gitlab/sql/pattern.rb b/lib/gitlab/sql/pattern.rb index 53744bad1f4..92388262035 100644 --- a/lib/gitlab/sql/pattern.rb +++ b/lib/gitlab/sql/pattern.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SQL module Pattern diff --git a/lib/gitlab/sql/recursive_cte.rb b/lib/gitlab/sql/recursive_cte.rb index 16ec002f139..ec1f00a3a91 100644 --- a/lib/gitlab/sql/recursive_cte.rb +++ b/lib/gitlab/sql/recursive_cte.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SQL # Class for easily building recursive CTE statements. diff --git a/lib/gitlab/sql/union.rb b/lib/gitlab/sql/union.rb index c99b262f1ca..d24d5116167 100644 --- a/lib/gitlab/sql/union.rb +++ b/lib/gitlab/sql/union.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module SQL # Class for building SQL UNION statements. diff --git a/lib/gitlab/template/base_template.rb b/lib/gitlab/template/base_template.rb index 699d747892c..0b4cc571dc0 100644 --- a/lib/gitlab/template/base_template.rb +++ b/lib/gitlab/template/base_template.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Template class BaseTemplate diff --git a/lib/gitlab/template/dockerfile_template.rb b/lib/gitlab/template/dockerfile_template.rb index 20b054b0bd8..3b516bb862a 100644 --- a/lib/gitlab/template/dockerfile_template.rb +++ b/lib/gitlab/template/dockerfile_template.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Template class DockerfileTemplate < BaseTemplate diff --git a/lib/gitlab/template/finders/base_template_finder.rb b/lib/gitlab/template/finders/base_template_finder.rb index a5105439b12..93c229af143 100644 --- a/lib/gitlab/template/finders/base_template_finder.rb +++ b/lib/gitlab/template/finders/base_template_finder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Template module Finders diff --git a/lib/gitlab/template/finders/global_template_finder.rb b/lib/gitlab/template/finders/global_template_finder.rb index b08d9a99e99..76bb9eb611e 100644 --- a/lib/gitlab/template/finders/global_template_finder.rb +++ b/lib/gitlab/template/finders/global_template_finder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Searches and reads file present on GitLab installation directory module Gitlab module Template @@ -21,7 +23,7 @@ module Gitlab end def list_files_for(dir) - dir << '/' unless dir.end_with?('/') + dir = "#{dir}/" unless dir.end_with?('/') Dir.glob(File.join(dir, "*#{@extension}")).select { |f| f =~ self.class.filter_regex(@extension) } end diff --git a/lib/gitlab/template/finders/repo_template_finder.rb b/lib/gitlab/template/finders/repo_template_finder.rb index 9140ace879f..b92cefefb8f 100644 --- a/lib/gitlab/template/finders/repo_template_finder.rb +++ b/lib/gitlab/template/finders/repo_template_finder.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # Searches and reads files present on each GitLab project repository module Gitlab module Template @@ -33,7 +35,7 @@ module Gitlab def list_files_for(dir) return [] unless @commit - dir << '/' unless dir.end_with?('/') + dir = "#{dir}/" unless dir.end_with?('/') entries = @repository.tree(:head, dir).entries diff --git a/lib/gitlab/template/gitignore_template.rb b/lib/gitlab/template/gitignore_template.rb index 8d2a9d2305c..72a1b7460c2 100644 --- a/lib/gitlab/template/gitignore_template.rb +++ b/lib/gitlab/template/gitignore_template.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Template class GitignoreTemplate < BaseTemplate diff --git a/lib/gitlab/template/gitlab_ci_yml_template.rb b/lib/gitlab/template/gitlab_ci_yml_template.rb index deae53cc61b..fbefb5f7f0e 100644 --- a/lib/gitlab/template/gitlab_ci_yml_template.rb +++ b/lib/gitlab/template/gitlab_ci_yml_template.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Template class GitlabCiYmlTemplate < BaseTemplate diff --git a/lib/gitlab/template/issue_template.rb b/lib/gitlab/template/issue_template.rb index c6fa8d3eafc..01b191733d4 100644 --- a/lib/gitlab/template/issue_template.rb +++ b/lib/gitlab/template/issue_template.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Template class IssueTemplate < BaseTemplate diff --git a/lib/gitlab/template/merge_request_template.rb b/lib/gitlab/template/merge_request_template.rb index f826c02f3b5..357b31cd82e 100644 --- a/lib/gitlab/template/merge_request_template.rb +++ b/lib/gitlab/template/merge_request_template.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Template class MergeRequestTemplate < BaseTemplate diff --git a/lib/gitlab/testing/request_blocker_middleware.rb b/lib/gitlab/testing/request_blocker_middleware.rb index 53333b9b06b..513cbe839ba 100644 --- a/lib/gitlab/testing/request_blocker_middleware.rb +++ b/lib/gitlab/testing/request_blocker_middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rubocop:disable Style/ClassVars # This is inspired by http://www.salsify.com/blog/engineering/tearing-capybara-ajax-tests diff --git a/lib/gitlab/testing/request_inspector_middleware.rb b/lib/gitlab/testing/request_inspector_middleware.rb index c251e78f5c5..36cdfebcc28 100644 --- a/lib/gitlab/testing/request_inspector_middleware.rb +++ b/lib/gitlab/testing/request_inspector_middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # rubocop:disable Style/ClassVars module Gitlab @@ -35,7 +37,7 @@ module Gitlab request_headers = env_http_headers(env) status, headers, body = @app.call(env) - full_body = '' + full_body = +'' body.each { |b| full_body << b } request = OpenStruct.new( diff --git a/lib/gitlab/utils/merge_hash.rb b/lib/gitlab/utils/merge_hash.rb index 385141d44d0..fc237861e2f 100644 --- a/lib/gitlab/utils/merge_hash.rb +++ b/lib/gitlab/utils/merge_hash.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Utils module MergeHash diff --git a/lib/gitlab/utils/override.rb b/lib/gitlab/utils/override.rb index d00921e6cdc..c412961ea3f 100644 --- a/lib/gitlab/utils/override.rb +++ b/lib/gitlab/utils/override.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Utils module Override diff --git a/lib/gitlab/utils/strong_memoize.rb b/lib/gitlab/utils/strong_memoize.rb index fe091f4611b..aa1f8e2fdda 100644 --- a/lib/gitlab/utils/strong_memoize.rb +++ b/lib/gitlab/utils/strong_memoize.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Utils module StrongMemoize diff --git a/lib/gitlab/verify/batch_verifier.rb b/lib/gitlab/verify/batch_verifier.rb index 167ba1b3149..dbda19a4a66 100644 --- a/lib/gitlab/verify/batch_verifier.rb +++ b/lib/gitlab/verify/batch_verifier.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Verify class BatchVerifier diff --git a/lib/gitlab/verify/job_artifacts.rb b/lib/gitlab/verify/job_artifacts.rb index dbadfbde9e3..3b90c8b1a8e 100644 --- a/lib/gitlab/verify/job_artifacts.rb +++ b/lib/gitlab/verify/job_artifacts.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Verify class JobArtifacts < BatchVerifier diff --git a/lib/gitlab/verify/lfs_objects.rb b/lib/gitlab/verify/lfs_objects.rb index d3f58a73ac7..20dbb7addff 100644 --- a/lib/gitlab/verify/lfs_objects.rb +++ b/lib/gitlab/verify/lfs_objects.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Verify class LfsObjects < BatchVerifier diff --git a/lib/gitlab/verify/rake_task.rb b/lib/gitlab/verify/rake_task.rb index e190eaddc79..3efed311237 100644 --- a/lib/gitlab/verify/rake_task.rb +++ b/lib/gitlab/verify/rake_task.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Verify class RakeTask diff --git a/lib/gitlab/verify/uploads.rb b/lib/gitlab/verify/uploads.rb index 201fcc7de7f..875e8a120e9 100644 --- a/lib/gitlab/verify/uploads.rb +++ b/lib/gitlab/verify/uploads.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module Verify class Uploads < BatchVerifier diff --git a/lib/gitlab/view/presenter/base.rb b/lib/gitlab/view/presenter/base.rb index c3fd6d317aa..5e70afe730a 100644 --- a/lib/gitlab/view/presenter/base.rb +++ b/lib/gitlab/view/presenter/base.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module View module Presenter diff --git a/lib/gitlab/view/presenter/delegated.rb b/lib/gitlab/view/presenter/delegated.rb index 387ff0f5d43..4a90ab758fb 100644 --- a/lib/gitlab/view/presenter/delegated.rb +++ b/lib/gitlab/view/presenter/delegated.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module View module Presenter diff --git a/lib/gitlab/view/presenter/factory.rb b/lib/gitlab/view/presenter/factory.rb index 570f0723e39..302697ff8eb 100644 --- a/lib/gitlab/view/presenter/factory.rb +++ b/lib/gitlab/view/presenter/factory.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module View module Presenter diff --git a/lib/gitlab/view/presenter/simple.rb b/lib/gitlab/view/presenter/simple.rb index b7653a0f3cc..31dcd1d4c4c 100644 --- a/lib/gitlab/view/presenter/simple.rb +++ b/lib/gitlab/view/presenter/simple.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + module Gitlab module View module Presenter diff --git a/lib/gitlab/webpack/dev_server_middleware.rb b/lib/gitlab/webpack/dev_server_middleware.rb index 529f7d6a8d6..fda41da5a94 100644 --- a/lib/gitlab/webpack/dev_server_middleware.rb +++ b/lib/gitlab/webpack/dev_server_middleware.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + # This Rack middleware is intended to proxy the webpack assets directory to the # webpack-dev-server. It is only intended for use in development. diff --git a/lib/gitlab/webpack/manifest.rb b/lib/gitlab/webpack/manifest.rb index 0c343e5bc1d..1d2aff5e5b4 100644 --- a/lib/gitlab/webpack/manifest.rb +++ b/lib/gitlab/webpack/manifest.rb @@ -1,3 +1,5 @@ +# frozen_string_literal: true + require 'webpack/rails/manifest' module Gitlab diff --git a/locale/gitlab.pot b/locale/gitlab.pot index f18821adb5f..b65b0a0a920 100644 --- a/locale/gitlab.pot +++ b/locale/gitlab.pot @@ -483,6 +483,9 @@ msgstr "" msgid "Amount of time (in hours) that users are allowed to skip forced configuration of two-factor authentication" msgstr "" +msgid "An SSH key will be automatically generated when the form is submitted. For more information, please refer to the documentation." +msgstr "" + msgid "An application called %{link_to_client} is requesting access to your GitLab account." msgstr "" @@ -531,6 +534,9 @@ msgstr "" msgid "An error occurred when toggling the notification subscription" msgstr "" +msgid "An error occurred while detecting host keys" +msgstr "" + msgid "An error occurred while dismissing the alert. Refresh the page and try again." msgstr "" @@ -645,6 +651,9 @@ msgstr "" msgid "Are you sure you want to lose unsaved changes?" msgstr "" +msgid "Are you sure you want to regenerate the public key? You will have to update the public key on the remote server before mirroring will work again." +msgstr "" + msgid "Are you sure you want to remove %{group_name}?" msgstr "" @@ -1073,6 +1082,9 @@ msgstr "" msgid "CI / CD" msgstr "" +msgid "CI / CD Charts" +msgstr "" + msgid "CI / CD Settings" msgstr "" @@ -1169,6 +1181,9 @@ msgstr "" msgid "Changes are shown as if the <b>source</b> revision was being merged into the <b>target</b> revision." msgstr "" +msgid "Changes suppressed. Click to show." +msgstr "" + msgid "Charts" msgstr "" @@ -1953,6 +1968,9 @@ msgstr "" msgid "Contribution" msgstr "" +msgid "Contribution Charts" +msgstr "" + msgid "Contribution guide" msgstr "" @@ -1992,6 +2010,12 @@ msgstr "" msgid "Copy SSH clone URL" msgstr "" +msgid "Copy SSH public key" +msgstr "" + +msgid "Copy SSH public key to clipboard" +msgstr "" + msgid "Copy URL to clipboard" msgstr "" @@ -2211,6 +2235,9 @@ msgstr "" msgid "Define a custom pattern with cron syntax" msgstr "" +msgid "Define environments in the deploy stage(s) in <code>.gitlab-ci.yml</code> to track deployments here." +msgstr "" + msgid "DelayedJobs|Are you sure you want to run %{jobName} immediately? Otherwise this job will run automatically after it's timer finishes." msgstr "" @@ -2393,6 +2420,9 @@ msgstr "" msgid "Details" msgstr "" +msgid "Detect host keys" +msgstr "" + msgid "Diff content limits" msgstr "" @@ -2510,6 +2540,9 @@ msgstr "" msgid "Edit application" msgstr "" +msgid "Edit environment" +msgstr "" + msgid "Edit files in the editor and commit changes here" msgstr "" @@ -2588,6 +2621,9 @@ msgstr "" msgid "Environments" msgstr "" +msgid "Environments allow you to track deployments of your application %{link_to_read_more}." +msgstr "" + msgid "Environments|An error occurred while fetching the environments." msgstr "" @@ -2657,6 +2693,9 @@ msgstr "" msgid "Environments|Stop environment" msgstr "" +msgid "Environments|Stopping" +msgstr "" + msgid "Environments|Updated" msgstr "" @@ -2792,6 +2831,9 @@ msgstr "" msgid "Explore public groups" msgstr "" +msgid "External URL" +msgstr "" + msgid "Facebook" msgstr "" @@ -2840,6 +2882,18 @@ msgstr "" msgid "Fields on this page are now uneditable, you can configure" msgstr "" +msgid "File added" +msgstr "" + +msgid "File deleted" +msgstr "" + +msgid "File mode changed from %{a_mode} to %{b_mode}" +msgstr "" + +msgid "File moved" +msgstr "" + msgid "File templates" msgstr "" @@ -2870,6 +2924,9 @@ msgstr "" msgid "Find the newly extracted <code>Takeout/Google Code Project Hosting/GoogleCodeProjectHosting.json</code> file." msgstr "" +msgid "Fingerprints" +msgstr "" + msgid "Finished" msgstr "" @@ -3215,6 +3272,12 @@ msgstr "" msgid "Help page text and support page url." msgstr "" +msgid "Here is the public SSH key that needs to be added to the remote server. For more information, please refer to the documentation." +msgstr "" + +msgid "Hide host keys manual input" +msgstr "" + msgid "Hide payload" msgstr "" @@ -3379,6 +3442,9 @@ msgstr "" msgid "Inline" msgstr "" +msgid "Input host keys manually" +msgstr "" + msgid "Input your repository URL" msgstr "" @@ -3424,6 +3490,12 @@ msgstr "" msgid "Invite" msgstr "" +msgid "Invoke Count" +msgstr "" + +msgid "Invoke Time" +msgstr "" + msgid "Issue" msgstr "" @@ -3881,6 +3953,9 @@ msgstr "" msgid "Metrics and profiling" msgstr "" +msgid "Metrics for environment" +msgstr "" + msgid "Metrics|Check out the CI/CD documentation on deploying to an environment" msgstr "" @@ -4025,6 +4100,9 @@ msgstr "" msgid "New Application" msgstr "" +msgid "New Environment" +msgstr "" + msgid "New Group" msgstr "" @@ -4057,6 +4135,9 @@ msgstr "" msgid "New directory" msgstr "" +msgid "New environment" +msgstr "" + msgid "New file" msgstr "" @@ -4147,6 +4228,9 @@ msgstr "" msgid "No other labels with such name or description" msgstr "" +msgid "No preview for this file type" +msgstr "" + msgid "No prioritised labels with such name or description" msgstr "" @@ -4434,6 +4518,9 @@ msgstr "" msgid "Personal Access Token" msgstr "" +msgid "Pick a name" +msgstr "" + msgid "Pipeline" msgstr "" @@ -5130,6 +5217,9 @@ msgstr "" msgid "Read more" msgstr "" +msgid "Read more about environments" +msgstr "" + msgid "Read more about project permissions <strong>%{link_to_help}</strong>" msgstr "" @@ -5150,12 +5240,18 @@ msgid_plural "Refreshing in %d seconds to show the updated status..." msgstr[0] "" msgstr[1] "" +msgid "Regenerate key" +msgstr "" + msgid "Regex pattern" msgstr "" msgid "Register / Sign In" msgstr "" +msgid "Register U2F device" +msgstr "" + msgid "Register and see your runners for this group." msgstr "" @@ -5401,6 +5497,12 @@ msgstr "" msgid "SSH Keys" msgstr "" +msgid "SSH host keys" +msgstr "" + +msgid "SSH public key" +msgstr "" + msgid "SSL Verification" msgstr "" @@ -5503,6 +5605,12 @@ msgstr "" msgid "Secret" msgstr "" +msgid "See metrics" +msgstr "" + +msgid "See the affected projects in the GitLab admin panel" +msgstr "" + msgid "Select" msgstr "" @@ -5554,6 +5662,9 @@ msgstr "" msgid "Send email" msgstr "" +msgid "Send report" +msgstr "" + msgid "Send usage data" msgstr "" @@ -5596,6 +5707,9 @@ msgstr "" msgid "Set up a specific Runner automatically" msgstr "" +msgid "Set up new U2F device" +msgstr "" + msgid "Set up your project to automatically push and/or pull changes to/from another repository. Branches, tags, and commits will be synced automatically." msgstr "" @@ -5676,6 +5790,9 @@ msgstr "" msgid "Sign in / Register" msgstr "" +msgid "Sign in via 2FA code" +msgstr "" + msgid "Sign out" msgstr "" @@ -5961,9 +6078,6 @@ msgstr "" msgid "Subscribed" msgstr "" -msgid "Summary of issues, merge requests, push events, and comments (Timezone: %{utcFormatted})" -msgstr "" - msgid "Switch branch/tag" msgstr "" @@ -6077,6 +6191,9 @@ msgstr "" msgid "Templates" msgstr "" +msgid "Terminal for environment" +msgstr "" + msgid "Terms of Service Agreement and Privacy Policy" msgstr "" @@ -6227,6 +6344,9 @@ msgstr "" msgid "Third party offers" msgstr "" +msgid "This %{viewer} could not be displayed because %{reason}." +msgstr "" + msgid "This GitLab instance does not provide any shared Runners yet. Instance administrators can register shared Runners in the admin area." msgstr "" @@ -6245,6 +6365,9 @@ msgstr "" msgid "This diff is collapsed." msgstr "" +msgid "This diff was suppressed by a .gitattributes entry." +msgstr "" + msgid "This directory" msgstr "" @@ -6600,6 +6723,9 @@ msgstr "" msgid "To move or copy an entire GitLab project from another GitLab installation to this one, navigate to the original project's settings page, generate an export file, and upload it here." msgstr "" +msgid "To preserve performance only <strong>%{display_size} of ${real_size}</strong> files are displayed." +msgstr "" + msgid "To start serving your jobs you can add Runners to your group" msgstr "" @@ -6621,6 +6747,9 @@ msgstr "" msgid "Toggle Sidebar" msgstr "" +msgid "Toggle comments for this file" +msgstr "" + msgid "Toggle commit description" msgstr "" @@ -6681,6 +6810,12 @@ msgstr "" msgid "Try again" msgstr "" +msgid "Try again?" +msgstr "" + +msgid "Trying to communicate with your device. Plug it in (if you haven't already) and press the button on the device now." +msgstr "" + msgid "Twitter" msgstr "" @@ -6837,9 +6972,6 @@ msgstr "" msgid "UserProfile|Personal projects" msgstr "" -msgid "UserProfile|Recent contributions" -msgstr "" - msgid "UserProfile|Report abuse" msgstr "" @@ -6885,6 +7017,12 @@ msgstr "" msgid "View app" msgstr "" +msgid "View deployment" +msgstr "" + +msgid "View details: %{details_url}" +msgstr "" + msgid "View file @ " msgstr "" @@ -6948,6 +7086,9 @@ msgstr "" msgid "We don't have enough data to show this stage." msgstr "" +msgid "We heard back from your U2F device. You have been authenticated." +msgstr "" + msgid "We want to be sure it is you, please confirm you are not a robot." msgstr "" @@ -7137,6 +7278,9 @@ msgstr "" msgid "You are on a read-only GitLab instance." msgstr "" +msgid "You are receiving this message because you are a GitLab administrator for %{url}." +msgstr "" + msgid "You can %{linkStart}view the blob%{linkEnd} instead." msgstr "" @@ -7182,6 +7326,9 @@ msgstr "" msgid "You don't have any authorized applications" msgstr "" +msgid "You don't have any deployments right now." +msgstr "" + msgid "You have no permissions" msgstr "" @@ -7197,6 +7344,9 @@ msgstr "" msgid "You need permission." msgstr "" +msgid "You need to register a two-factor authentication app before you can set up a U2F device." +msgstr "" + msgid "You will loose all changes you've made to this file. This action cannot be undone." msgstr "" @@ -7257,12 +7407,18 @@ msgstr "" msgid "Your Todos" msgstr "" +msgid "Your U2F device needs to be set up. Plug it in (if not already) and click the button on the left." +msgstr "" + msgid "Your applications (%{size})" msgstr "" msgid "Your authorized applications" msgstr "" +msgid "Your browser doesn't support U2F. Please use Google Chrome desktop (version 41 or newer)." +msgstr "" + msgid "Your changes can be committed to %{branch_name} because a merge request is open." msgstr "" @@ -7272,6 +7428,9 @@ msgstr "" msgid "Your comment will not be visible to the public." msgstr "" +msgid "Your device was successfully set up! Give it a name and register it with the GitLab server." +msgstr "" + msgid "Your groups" msgstr "" @@ -7281,6 +7440,9 @@ msgstr "" msgid "Your projects" msgstr "" +msgid "a deleted user" +msgstr "" + msgid "ago" msgstr "" @@ -7313,6 +7475,9 @@ msgid_plural "days" msgstr[0] "" msgstr[1] "" +msgid "deleted" +msgstr "" + msgid "deploy token" msgstr "" @@ -7325,6 +7490,9 @@ msgstr "" msgid "enabled" msgstr "" +msgid "error code:" +msgstr "" + msgid "estimateCommand|%{slash_command} will update the estimated time with the latest command." msgstr "" diff --git a/package.json b/package.json index 09a47caa194..380f44946dc 100644 --- a/package.json +++ b/package.json @@ -24,8 +24,8 @@ "@babel/plugin-syntax-dynamic-import": "^7.0.0", "@babel/plugin-syntax-import-meta": "^7.0.0", "@babel/preset-env": "^7.1.0", + "@gitlab/svgs": "^1.38.0", "@gitlab/ui": "^1.11.0", - "@gitlab/svgs": "^1.35.0", "autosize": "^4.0.0", "axios": "^0.17.1", "babel-loader": "^8.0.4", @@ -111,7 +111,7 @@ "xterm": "^3.5.0" }, "devDependencies": { - "@gitlab/eslint-config": "^1.1.0", + "@gitlab/eslint-config": "^1.2.0", "axios-mock-adapter": "^1.15.0", "babel-plugin-istanbul": "^5.1.0", "babel-plugin-rewire": "^1.2.0", @@ -139,7 +139,7 @@ "karma-sourcemap-loader": "^0.3.7", "karma-webpack": "^4.0.0-beta.0", "nodemon": "^1.18.4", - "prettier": "1.14.3", + "prettier": "1.15.2", "webpack-dev-server": "^3.1.8" } } diff --git a/qa/qa/resource/user.rb b/qa/qa/resource/user.rb index 16f0b311fa9..9be88ba4211 100644 --- a/qa/qa/resource/user.rb +++ b/qa/qa/resource/user.rb @@ -76,6 +76,17 @@ module QA } end + def self.fabricate_or_use(username, password) + if Runtime::Env.signup_disabled? + self.new.tap do |user| + user.username = username + user.password = password + end + else + self.fabricate! + end + end + private def fetch_id(username) diff --git a/qa/qa/runtime/env.rb b/qa/qa/runtime/env.rb index c4500f9be90..1154eaca6a9 100644 --- a/qa/qa/runtime/env.rb +++ b/qa/qa/runtime/env.rb @@ -75,6 +75,22 @@ module QA ENV['GITLAB_FORKER_PASSWORD'] end + def gitlab_qa_username_1 + ENV['GITLAB_QA_USERNAME_1'] || 'gitlab-qa-user1' + end + + def gitlab_qa_password_1 + ENV['GITLAB_QA_PASSWORD_1'] + end + + def gitlab_qa_username_2 + ENV['GITLAB_QA_USERNAME_2'] || 'gitlab-qa-user2' + end + + def gitlab_qa_password_2 + ENV['GITLAB_QA_PASSWORD_2'] + end + def ldap_username ENV['GITLAB_LDAP_USERNAME'] end diff --git a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb index bef89d5be24..4070a225260 100644 --- a/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb +++ b/qa/qa/specs/features/browser_ui/1_manage/project/add_project_member_spec.rb @@ -7,7 +7,7 @@ module QA Runtime::Browser.visit(:gitlab, Page::Main::Login) Page::Main::Login.perform(&:sign_in_using_credentials) - user = Resource::User.fabricate! + user = Resource::User.fabricate_or_use(Runtime::Env.gitlab_qa_username_1, Runtime::Env.gitlab_qa_password_1) project = Resource::Project.fabricate! do |resource| resource.name = 'add-member-project' diff --git a/spec/controllers/application_controller_spec.rb b/spec/controllers/application_controller_spec.rb index 4e91068ab88..efc3ce74627 100644 --- a/spec/controllers/application_controller_spec.rb +++ b/spec/controllers/application_controller_spec.rb @@ -650,7 +650,7 @@ describe ApplicationController do describe '#access_denied' do controller(described_class) do def index - access_denied!(params[:message]) + access_denied!(params[:message], params[:status]) end end @@ -669,6 +669,12 @@ describe ApplicationController do expect(response).to have_gitlab_http_status(403) end + + it 'renders a status passed to access denied' do + get :index, status: 401 + + expect(response).to have_gitlab_http_status(401) + end end context 'when invalid UTF-8 parameters are received' do diff --git a/spec/controllers/projects/mirrors_controller_spec.rb b/spec/controllers/projects/mirrors_controller_spec.rb index 00c1e617e3a..976f480930c 100644 --- a/spec/controllers/projects/mirrors_controller_spec.rb +++ b/spec/controllers/projects/mirrors_controller_spec.rb @@ -15,6 +15,31 @@ describe Projects::MirrorsController do end.to change { RemoteMirror.count }.to(1) end end + + context 'setting up SSH public-key authentication' do + let(:ssh_mirror_attributes) do + { + 'auth_method' => 'ssh_public_key', + 'url' => 'ssh://git@example.com', + 'ssh_known_hosts' => 'test' + } + end + + it 'processes a successful update' do + sign_in(project.owner) + do_put(project, remote_mirrors_attributes: { '0' => ssh_mirror_attributes }) + + expect(response).to redirect_to(project_settings_repository_path(project, anchor: 'js-push-remote-settings')) + + expect(RemoteMirror.count).to eq(1) + expect(RemoteMirror.first).to have_attributes( + auth_method: 'ssh_public_key', + url: 'ssh://git@example.com', + ssh_public_key: match(/\Assh-rsa /), + ssh_known_hosts: 'test' + ) + end + end end describe '#update' do diff --git a/spec/factories/clusters/kubernetes_namespaces.rb b/spec/factories/clusters/kubernetes_namespaces.rb index 3a4f5193550..6ad93fb0f45 100644 --- a/spec/factories/clusters/kubernetes_namespaces.rb +++ b/spec/factories/clusters/kubernetes_namespaces.rb @@ -3,7 +3,6 @@ FactoryBot.define do factory :cluster_kubernetes_namespace, class: Clusters::KubernetesNamespace do association :cluster, :project, :provided_by_gcp - namespace { |n| "environment#{n}" } after(:build) do |kubernetes_namespace| cluster_project = kubernetes_namespace.cluster.cluster_project diff --git a/spec/features/calendar_spec.rb b/spec/features/calendar_spec.rb index a1f93bd3fbd..8cb9b57a049 100644 --- a/spec/features/calendar_spec.rb +++ b/spec/features/calendar_spec.rb @@ -64,7 +64,7 @@ describe 'Contributions Calendar', :js do end def selected_day_activities(visible: true) - find('.tab-pane#activity .user-calendar-activities', visible: visible).text + find('#js-overview .user-calendar-activities', visible: visible).text end before do @@ -74,16 +74,16 @@ describe 'Contributions Calendar', :js do describe 'calendar day selection' do before do visit user.username - page.find('.js-activity-tab a').click + page.find('.js-overview-tab a').click wait_for_requests end it 'displays calendar' do - expect(find('.tab-pane#activity')).to have_css('.js-contrib-calendar') + expect(find('#js-overview')).to have_css('.js-contrib-calendar') end describe 'select calendar day' do - let(:cells) { page.all('.tab-pane#activity .user-contrib-cell') } + let(:cells) { page.all('#js-overview .user-contrib-cell') } before do cells[0].click @@ -109,7 +109,7 @@ describe 'Contributions Calendar', :js do describe 'deselect calendar day' do before do cells[0].click - page.find('.js-activity-tab a').click + page.find('.js-overview-tab a').click wait_for_requests end @@ -124,7 +124,7 @@ describe 'Contributions Calendar', :js do shared_context 'visit user page' do before do visit user.username - page.find('.js-activity-tab a').click + page.find('.js-overview-tab a').click wait_for_requests end end @@ -133,12 +133,12 @@ describe 'Contributions Calendar', :js do include_context 'visit user page' it 'displays calendar activity square color for 1 contribution' do - expect(find('.tab-pane#activity')).to have_selector(get_cell_color_selector(contribution_count), count: 1) + expect(find('#js-overview')).to have_selector(get_cell_color_selector(contribution_count), count: 1) end it 'displays calendar activity square on the correct date' do today = Date.today.strftime(date_format) - expect(find('.tab-pane#activity')).to have_selector(get_cell_date_selector(contribution_count, today), count: 1) + expect(find('#js-overview')).to have_selector(get_cell_date_selector(contribution_count, today), count: 1) end end @@ -153,7 +153,7 @@ describe 'Contributions Calendar', :js do include_context 'visit user page' it 'displays calendar activity log' do - expect(find('.tab-pane#activity .content_list .event-target-title')).to have_content issue_title + expect(find('#js-overview .overview-content-list .event-target-title')).to have_content issue_title end end end @@ -185,17 +185,17 @@ describe 'Contributions Calendar', :js do include_context 'visit user page' it 'displays calendar activity squares for both days' do - expect(find('.tab-pane#activity')).to have_selector(get_cell_color_selector(1), count: 2) + expect(find('#js-overview')).to have_selector(get_cell_color_selector(1), count: 2) end it 'displays calendar activity square for yesterday' do yesterday = Date.yesterday.strftime(date_format) - expect(find('.tab-pane#activity')).to have_selector(get_cell_date_selector(1, yesterday), count: 1) + expect(find('#js-overview')).to have_selector(get_cell_date_selector(1, yesterday), count: 1) end it 'displays calendar activity square for today' do today = Date.today.strftime(date_format) - expect(find('.tab-pane#activity')).to have_selector(get_cell_date_selector(1, today), count: 1) + expect(find('#js-overview')).to have_selector(get_cell_date_selector(1, today), count: 1) end end end diff --git a/spec/features/issues/gfm_autocomplete_spec.rb b/spec/features/issues/gfm_autocomplete_spec.rb index 605860b90cd..7c591dacce5 100644 --- a/spec/features/issues/gfm_autocomplete_spec.rb +++ b/spec/features/issues/gfm_autocomplete_spec.rb @@ -1,6 +1,10 @@ require 'rails_helper' describe 'GFM autocomplete', :js do + let(:issue_xss_title) { 'This will execute alert<img src=x onerror=alert(2)<img src=x onerror=alert(1)>' } + let(:user_xss_title) { 'eve <img src=x onerror=alert(2)<img src=x onerror=alert(1)>' } + + let(:user_xss) { create(:user, name: user_xss_title, username: 'xss.user') } let(:user) { create(:user, name: '💃speciąl someone💃', username: 'someone.special') } let(:project) { create(:project) } let(:label) { create(:label, project: project, title: 'special+') } @@ -9,6 +13,8 @@ describe 'GFM autocomplete', :js do before do project.add_maintainer(user) + project.add_maintainer(user_xss) + sign_in(user) visit project_issue_path(project, issue) @@ -35,9 +41,8 @@ describe 'GFM autocomplete', :js do expect(page).to have_selector('.atwho-container') end - it 'opens autocomplete menu when field starts with text with item escaping HTML characters' do - alert_title = 'This will execute alert<img src=x onerror=alert(2)<img src=x onerror=alert(1)>' - create(:issue, project: project, title: alert_title) + it 'opens autocomplete menu for Issues when field starts with text with item escaping HTML characters' do + create(:issue, project: project, title: issue_xss_title) page.within '.timeline-content-form' do find('#note-body').native.send_keys('#') @@ -46,7 +51,19 @@ describe 'GFM autocomplete', :js do expect(page).to have_selector('.atwho-container') page.within '.atwho-container #at-view-issues' do - expect(page.all('li').first.text).to include(alert_title) + expect(page.all('li').first.text).to include(issue_xss_title) + end + end + + it 'opens autocomplete menu for Username when field starts with text with item escaping HTML characters' do + page.within '.timeline-content-form' do + find('#note-body').native.send_keys('@ev') + end + + expect(page).to have_selector('.atwho-container') + + page.within '.atwho-container #at-view-users' do + expect(find('li').text).to have_content(user_xss.username) end end @@ -107,7 +124,7 @@ describe 'GFM autocomplete', :js do wait_for_requests - expect(find('#at-view-64')).to have_selector('.cur:first-of-type') + expect(find('#at-view-users')).to have_selector('.cur:first-of-type') end it 'includes items for assignee dropdowns with non-ASCII characters in name' do @@ -120,7 +137,7 @@ describe 'GFM autocomplete', :js do wait_for_requests - expect(find('#at-view-64')).to have_content(user.name) + expect(find('#at-view-users')).to have_content(user.name) end it 'selects the first item for non-assignee dropdowns if a query is entered' do diff --git a/spec/features/issues/user_creates_branch_and_merge_request_spec.rb b/spec/features/issues/user_creates_branch_and_merge_request_spec.rb index 297cd808460..32bc851f00f 100644 --- a/spec/features/issues/user_creates_branch_and_merge_request_spec.rb +++ b/spec/features/issues/user_creates_branch_and_merge_request_spec.rb @@ -76,7 +76,7 @@ describe 'User creates branch and merge request on issue page', :js do visit project_issue_path(project, issue) - expect(page).to have_content('created branch 1-cherry-coloured-funk') + expect(page).to have_content("created merge request !1 to address this issue") expect(page).to have_content('mentioned in merge request !1') end @@ -106,7 +106,7 @@ describe 'User creates branch and merge request on issue page', :js do visit project_issue_path(project, issue) - expect(page).to have_content('created branch custom-branch-name') + expect(page).to have_content("created merge request !1 to address this issue") expect(page).to have_content('mentioned in merge request !1') end diff --git a/spec/features/issues/user_uses_quick_actions_spec.rb b/spec/features/issues/user_uses_quick_actions_spec.rb index 5926e442f24..27cffdc5f8b 100644 --- a/spec/features/issues/user_uses_quick_actions_spec.rb +++ b/spec/features/issues/user_uses_quick_actions_spec.rb @@ -303,5 +303,63 @@ describe 'Issues > User uses quick actions', :js do end end end + + describe 'create a merge request starting from an issue' do + let(:project) { create(:project, :public, :repository) } + let(:issue) { create(:issue, project: project) } + + def expect_mr_quickaction(success) + expect(page).to have_content 'Commands applied' + + if success + expect(page).to have_content 'created merge request' + else + expect(page).not_to have_content 'created merge request' + end + end + + it "doesn't create a merge request when the branch name is invalid" do + add_note("/create_merge_request invalid branch name") + + wait_for_requests + + expect_mr_quickaction(false) + end + + it "doesn't create a merge request when a branch with that name already exists" do + add_note("/create_merge_request feature") + + wait_for_requests + + expect_mr_quickaction(false) + end + + it 'creates a new merge request using issue iid and title as branch name when the branch name is empty' do + add_note("/create_merge_request") + + wait_for_requests + + expect_mr_quickaction(true) + + created_mr = project.merge_requests.last + expect(created_mr.source_branch).to eq(issue.to_branch_name) + + visit project_merge_request_path(project, created_mr) + expect(page).to have_content %{WIP: Resolve "#{issue.title}"} + end + + it 'creates a merge request using the given branch name' do + branch_name = '1-feature' + add_note("/create_merge_request #{branch_name}") + + expect_mr_quickaction(true) + + created_mr = project.merge_requests.last + expect(created_mr.source_branch).to eq(branch_name) + + visit project_merge_request_path(project, created_mr) + expect(page).to have_content %{WIP: Resolve "#{issue.title}"} + end + end end end diff --git a/spec/features/projects/settings/repository_settings_spec.rb b/spec/features/projects/settings/repository_settings_spec.rb index 377a75cbcb3..401aac9478d 100644 --- a/spec/features/projects/settings/repository_settings_spec.rb +++ b/spec/features/projects/settings/repository_settings_spec.rb @@ -132,6 +132,27 @@ describe 'Projects > Settings > Repository settings' do it 'shows push mirror settings', :js do expect(page).to have_selector('#mirror_direction') end + + it 'generates an SSH public key on submission', :js do + fill_in 'url', with: 'ssh://user@localhost/project.git' + select 'SSH public key', from: 'Authentication method' + + direction_select = find('#mirror_direction') + + # In CE, this select box is disabled, but in EE, it is enabled + if direction_select.disabled? + expect(direction_select.value).to eq('push') + else + direction_select.select('Push') + end + + Sidekiq::Testing.fake! do + click_button 'Mirror repository' + end + + expect(page).to have_content('Mirroring settings were successfully updated') + expect(page).to have_selector('[title="Copy SSH public key"]') + end end end end diff --git a/spec/features/users/login_spec.rb b/spec/features/users/login_spec.rb index 44758f862a8..ad856bd062e 100644 --- a/spec/features/users/login_spec.rb +++ b/spec/features/users/login_spec.rb @@ -2,6 +2,7 @@ require 'spec_helper' describe 'Login' do include TermsHelper + include UserLoginHelper before do stub_authentication_activity_metrics(debug: true) @@ -546,29 +547,6 @@ describe 'Login' do ensure_tab_pane_correctness(false) end end - - def ensure_tab_pane_correctness(visit_path = true) - if visit_path - visit new_user_session_path - end - - ensure_tab_pane_counts - ensure_one_active_tab - ensure_one_active_pane - end - - def ensure_tab_pane_counts - tabs_count = page.all('[role="tab"]').size - expect(page).to have_selector('[role="tabpanel"]', count: tabs_count) - end - - def ensure_one_active_tab - expect(page).to have_selector('ul.new-session-tabs > li > a.active', count: 1) - end - - def ensure_one_active_pane - expect(page).to have_selector('.tab-pane.active', count: 1) - end end context 'when terms are enforced' do diff --git a/spec/features/users/overview_spec.rb b/spec/features/users/overview_spec.rb index b0ff53f9ccb..34ed771340f 100644 --- a/spec/features/users/overview_spec.rb +++ b/spec/features/users/overview_spec.rb @@ -54,15 +54,15 @@ describe 'Overview tab on a user profile', :js do end end - describe 'user has 10 activities' do + describe 'user has 11 activities' do before do - 10.times { push_code_contribution } + 11.times { push_code_contribution } end include_context 'visit overview tab' - it 'displays 5 entries in the list of activities' do - expect(find('#js-overview')).to have_selector('.event-item', count: 5) + it 'displays 10 entries in the list of activities' do + expect(find('#js-overview')).to have_selector('.event-item', count: 10) end it 'shows a link to the activity list' do diff --git a/spec/finders/group_descendants_finder_spec.rb b/spec/finders/group_descendants_finder_spec.rb index c64abdc3619..c28fd7cad11 100644 --- a/spec/finders/group_descendants_finder_spec.rb +++ b/spec/finders/group_descendants_finder_spec.rb @@ -74,6 +74,13 @@ describe GroupDescendantsFinder do end end + it 'sorts elements by latest created as default' do + project1 = create(:project, namespace: group, created_at: 1.hour.ago) + project2 = create(:project, namespace: group) + + expect(subject.execute).to eq([project2, project1]) + end + context 'sorting by name' do let!(:project1) { create(:project, namespace: group, name: 'a', path: 'project-a') } let!(:project2) { create(:project, namespace: group, name: 'z', path: 'project-z') } diff --git a/spec/finders/pending_todos_finder_spec.rb b/spec/finders/pending_todos_finder_spec.rb index 32fad5e225f..b41b1b46a93 100644 --- a/spec/finders/pending_todos_finder_spec.rb +++ b/spec/finders/pending_todos_finder_spec.rb @@ -46,7 +46,7 @@ describe PendingTodosFinder do create(:todo, :pending, user: user, target: note) - todos = described_class.new(user, target_type: issue.class).execute + todos = described_class.new(user, target_type: issue.class.name).execute expect(todos).to eq([todo]) end diff --git a/spec/fixtures/authentication/saml2_response.xml b/spec/fixtures/authentication/saml2_response.xml new file mode 100644 index 00000000000..67dea7209e9 --- /dev/null +++ b/spec/fixtures/authentication/saml2_response.xml @@ -0,0 +1,56 @@ +<?xml version="1.0" encoding="UTF-8"?> +<saml2p:Response xmlns:saml2p="urn:oasis:names:tc:SAML:2.0:protocol" xmlns:xs="http://www.w3.org/2001/XMLSchema" Destination="https://example.hello.com/access/saml" ID="jVFQbyEpSfUwqhZtJtarIaGoshwuAQMDwLoiMhzJXsv" InResponseTo="cfeooghajnhofcmogakmlhpkohnmikicnfhdnjlc" IssueInstant="2011-06-21T13:54:38.661Z" Version="2.0"> + <saml2:Issuer xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion">https://idm.orademo.com</saml2:Issuer> + <ds:Signature xmlns:ds="http://www.w3.org/2000/09/xmldsig#"> + <ds:SignedInfo> + <ds:CanonicalizationMethod Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"/> + <ds:SignatureMethod Algorithm="http://www.w3.org/2000/09/xmldsig#rsa-sha1"/> + <ds:Reference URI="#jVFQbyEpSfUwqhZtJtarIaGoshwuAQMDwLoiMhzJXsv"> + <ds:Transforms> + <ds:Transform Algorithm="http://www.w3.org/2000/09/xmldsig#enveloped-signature"/> + <ds:Transform Algorithm="http://www.w3.org/2001/10/xml-exc-c14n#"> + <ec:InclusiveNamespaces xmlns:ec="http://www.w3.org/2001/10/xml-exc-c14n#" PrefixList="xs"/> + </ds:Transform> + </ds:Transforms> + <ds:DigestMethod Algorithm="http://www.w3.org/2000/09/xmldsig#sha1"/> + <ds:DigestValue>uHuSry39P16Yh7srS32xESmj4Lw=</ds:DigestValue> + </ds:Reference> + </ds:SignedInfo> + <ds:SignatureValue>fdghdfggfd=</ds:SignatureValue> + <ds:KeyInfo> + <ds:X509Data> + <ds:X509Certificate>dfghjkl</ds:X509Certificate> + </ds:X509Data> + </ds:KeyInfo> + </ds:Signature> + <saml2p:Status> + <saml2p:StatusCode Value="urn:oasis:names:tc:SAML:2.0:status:Success"/> + </saml2p:Status> + <saml2:Assertion xmlns:saml2="urn:oasis:names:tc:SAML:2.0:assertion" ID="emmCjammnYdAbMWDuMAJeZvQIMBayeeYqqwvQoDclKE" IssueInstant="2011-06-21T13:54:38.676Z" Version="2.0"> + <saml2:Issuer>https://idm.orademo.com</saml2:Issuer> + <saml2:Subject> + <saml2:NameID Format="urn:oasis:names:tc:SAML:1.1:nameid-format:emailAddress" NameQualifier="idp.example.org">someone@example.org</saml2:NameID> + <saml2:SubjectConfirmation Method="urn:oasis:names:tc:SAML:2.0:cm:bearer"> + <saml2:SubjectConfirmationData InResponseTo="cfeooghajnhofcmogakmlhpkohnmikicnfhdnjlc" NotOnOrAfter="2011-06-21T14:09:38.676Z" Recipient="https://example.hello.com/access/saml"/> + </saml2:SubjectConfirmation> + </saml2:Subject> + <saml2:Conditions NotBefore="2011-06-21T13:54:38.683Z" NotOnOrAfter="2011-06-21T14:09:38.683Z"> + <saml2:AudienceRestriction> + <saml2:Audience>hello.com</saml2:Audience> + </saml2:AudienceRestriction> + </saml2:Conditions> + <saml2:AuthnStatement AuthnInstant="2011-06-21T13:54:38.685Z" SessionIndex="perdkjfskdjfksdiertusfsdfsddeurtherukjdfgkdffg"> + <saml2:AuthnContext> + <saml2:AuthnContextClassRef>urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport</saml2:AuthnContextClassRef> + </saml2:AuthnContext> + </saml2:AuthnStatement> + <saml2:AttributeStatement> + <saml2:Attribute Name="FirstName"> + <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Someone</saml2:AttributeValue> + </saml2:Attribute> + <saml2:Attribute Name="LastName"> + <saml2:AttributeValue xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xsi:type="xs:string">Special</saml2:AttributeValue> + </saml2:Attribute> + </saml2:AttributeStatement> + </saml2:Assertion> +</saml2p:Response> diff --git a/spec/helpers/auth_helper_spec.rb b/spec/helpers/auth_helper_spec.rb index 120b23e66ac..f0c2e4768ec 100644 --- a/spec/helpers/auth_helper_spec.rb +++ b/spec/helpers/auth_helper_spec.rb @@ -42,6 +42,16 @@ describe AuthHelper do end end + describe 'form_based_auth_provider_has_active_class?' do + it 'selects main LDAP server' do + allow(helper).to receive(:auth_providers) { [:twitter, :ldapprimary, :ldapsecondary, :kerberos] } + expect(helper.form_based_auth_provider_has_active_class?(:twitter)).to be(false) + expect(helper.form_based_auth_provider_has_active_class?(:ldapprimary)).to be(true) + expect(helper.form_based_auth_provider_has_active_class?(:ldapsecondary)).to be(false) + expect(helper.form_based_auth_provider_has_active_class?(:kerberos)).to be(false) + end + end + describe 'enabled_button_based_providers' do before do allow(helper).to receive(:auth_providers) { [:twitter, :github] } diff --git a/spec/javascripts/behaviors/shortcuts/shortcuts_issuable_spec.js b/spec/javascripts/behaviors/shortcuts/shortcuts_issuable_spec.js index bc25549cbed..b709b937180 100644 --- a/spec/javascripts/behaviors/shortcuts/shortcuts_issuable_spec.js +++ b/spec/javascripts/behaviors/shortcuts/shortcuts_issuable_spec.js @@ -1,3 +1,7 @@ +/* eslint-disable + no-underscore-dangle +*/ + import $ from 'jquery'; import initCopyAsGFM from '~/behaviors/markdown/copy_as_gfm'; import ShortcutsIssuable from '~/behaviors/shortcuts/shortcuts_issuable'; @@ -27,13 +31,17 @@ describe('ShortcutsIssuable', function() { describe('replyWithSelectedText', () => { // Stub window.gl.utils.getSelectedFragment to return a node with the provided HTML. - const stubSelection = html => { - window.gl.utils.getSelectedFragment = () => { + const stubSelection = (html, invalidNode) => { + ShortcutsIssuable.__Rewire__('getSelectedFragment', () => { + const documentFragment = document.createDocumentFragment(); const node = document.createElement('div'); + node.innerHTML = html; + if (!invalidNode) node.className = 'md'; - return node; - }; + documentFragment.appendChild(node); + return documentFragment; + }); }; describe('with empty selection', () => { it('does not return an error', () => { @@ -105,5 +113,133 @@ describe('ShortcutsIssuable', function() { ); }); }); + + describe('with an invalid selection', () => { + beforeEach(() => { + stubSelection('<p>Selected text.</p>', true); + }); + + it('does not add anything to the input', () => { + ShortcutsIssuable.replyWithSelectedText(true); + + expect($(FORM_SELECTOR).val()).toBe(''); + }); + + it('triggers `focus`', () => { + const spy = spyOn(document.querySelector(FORM_SELECTOR), 'focus'); + ShortcutsIssuable.replyWithSelectedText(true); + + expect(spy).toHaveBeenCalled(); + }); + }); + + describe('with a semi-valid selection', () => { + beforeEach(() => { + stubSelection('<div class="md">Selected text.</div><p>Invalid selected text.</p>', true); + }); + + it('only adds the valid part to the input', () => { + ShortcutsIssuable.replyWithSelectedText(true); + + expect($(FORM_SELECTOR).val()).toBe('> Selected text.\n\n'); + }); + + it('triggers `focus`', () => { + const spy = spyOn(document.querySelector(FORM_SELECTOR), 'focus'); + ShortcutsIssuable.replyWithSelectedText(true); + + expect(spy).toHaveBeenCalled(); + }); + + it('triggers `input`', () => { + let triggered = false; + $(FORM_SELECTOR).on('input', () => { + triggered = true; + }); + + ShortcutsIssuable.replyWithSelectedText(true); + + expect(triggered).toBe(true); + }); + }); + + describe('with a selection in a valid block', () => { + beforeEach(() => { + ShortcutsIssuable.__Rewire__('getSelectedFragment', () => { + const documentFragment = document.createDocumentFragment(); + const node = document.createElement('div'); + const originalNode = document.createElement('body'); + originalNode.innerHTML = `<div class="issue"> + <div class="otherElem">Text...</div> + <div class="md"><p><em>Selected text.</em></p></div> + </div>`; + documentFragment.originalNodes = [originalNode.querySelector('em')]; + + node.innerHTML = '<em>Selected text.</em>'; + + documentFragment.appendChild(node); + + return documentFragment; + }); + }); + + it('adds the quoted selection to the input', () => { + ShortcutsIssuable.replyWithSelectedText(true); + + expect($(FORM_SELECTOR).val()).toBe('> _Selected text._\n\n'); + }); + + it('triggers `focus`', () => { + const spy = spyOn(document.querySelector(FORM_SELECTOR), 'focus'); + ShortcutsIssuable.replyWithSelectedText(true); + + expect(spy).toHaveBeenCalled(); + }); + + it('triggers `input`', () => { + let triggered = false; + $(FORM_SELECTOR).on('input', () => { + triggered = true; + }); + + ShortcutsIssuable.replyWithSelectedText(true); + + expect(triggered).toBe(true); + }); + }); + + describe('with a selection in an invalid block', () => { + beforeEach(() => { + ShortcutsIssuable.__Rewire__('getSelectedFragment', () => { + const documentFragment = document.createDocumentFragment(); + const node = document.createElement('div'); + const originalNode = document.createElement('body'); + originalNode.innerHTML = `<div class="issue"> + <div class="otherElem"><div><b>Selected text.</b></div></div> + <div class="md"><p><em>Valid text</em></p></div> + </div>`; + documentFragment.originalNodes = [originalNode.querySelector('b')]; + + node.innerHTML = '<b>Selected text.</b>'; + + documentFragment.appendChild(node); + + return documentFragment; + }); + }); + + it('does not add anything to the input', () => { + ShortcutsIssuable.replyWithSelectedText(true); + + expect($(FORM_SELECTOR).val()).toBe(''); + }); + + it('triggers `focus`', () => { + const spy = spyOn(document.querySelector(FORM_SELECTOR), 'focus'); + ShortcutsIssuable.replyWithSelectedText(true); + + expect(spy).toHaveBeenCalled(); + }); + }); }); }); diff --git a/spec/javascripts/ide/stores/actions/merge_request_spec.js b/spec/javascripts/ide/stores/actions/merge_request_spec.js index 3a4e0d7507f..d8e9260e932 100644 --- a/spec/javascripts/ide/stores/actions/merge_request_spec.js +++ b/spec/javascripts/ide/stores/actions/merge_request_spec.js @@ -262,16 +262,28 @@ describe('IDE store merge request actions', () => { bar: {}, }; - spyOn(store, 'dispatch').and.callFake(type => { + const originalDispatch = store.dispatch; + + spyOn(store, 'dispatch').and.callFake((type, payload) => { switch (type) { case 'getMergeRequestData': return Promise.resolve(testMergeRequest); case 'getMergeRequestChanges': return Promise.resolve(testMergeRequestChanges); - default: + case 'getFiles': + case 'getMergeRequestVersions': + case 'getBranchData': + case 'setFileMrChange': return Promise.resolve(); + default: + return originalDispatch(type, payload); } }); + spyOn(service, 'getFileData').and.callFake(() => + Promise.resolve({ + headers: {}, + }), + ); }); it('dispatch actions for merge request data', done => { @@ -303,7 +315,17 @@ describe('IDE store merge request actions', () => { }); it('updates activity bar view and gets file data, if changes are found', done => { - testMergeRequestChanges.changes = [{ new_path: 'foo' }, { new_path: 'bar' }]; + store.state.entries.foo = { + url: 'test', + }; + store.state.entries.bar = { + url: 'test', + }; + + testMergeRequestChanges.changes = [ + { new_path: 'foo', path: 'foo' }, + { new_path: 'bar', path: 'bar' }, + ]; openMergeRequest(store, mr) .then(() => { @@ -321,8 +343,11 @@ describe('IDE store merge request actions', () => { expect(store.dispatch).toHaveBeenCalledWith('getFileData', { path: change.new_path, makeFileActive: i === 0, + openFile: true, }); }); + + expect(store.state.openFiles.length).toBe(testMergeRequestChanges.changes.length); }) .then(done) .catch(done.fail); diff --git a/spec/javascripts/lib/utils/common_utils_spec.js b/spec/javascripts/lib/utils/common_utils_spec.js index 0fb90c3b78c..1c7691f865a 100644 --- a/spec/javascripts/lib/utils/common_utils_spec.js +++ b/spec/javascripts/lib/utils/common_utils_spec.js @@ -425,14 +425,16 @@ describe('common_utils', () => { }); it('rejects the backOff promise after timing out', done => { - commonUtils.backOff(next => next(), 64000).catch(errBackoffResp => { - const timeouts = window.setTimeout.calls.allArgs().map(([, timeout]) => timeout); + commonUtils + .backOff(next => next(), 64000) + .catch(errBackoffResp => { + const timeouts = window.setTimeout.calls.allArgs().map(([, timeout]) => timeout); - expect(timeouts).toEqual([2000, 4000, 8000, 16000, 32000, 32000]); - expect(errBackoffResp instanceof Error).toBe(true); - expect(errBackoffResp.message).toBe('BACKOFF_TIMEOUT'); - done(); - }); + expect(timeouts).toEqual([2000, 4000, 8000, 16000, 32000, 32000]); + expect(errBackoffResp instanceof Error).toBe(true); + expect(errBackoffResp.message).toBe('BACKOFF_TIMEOUT'); + done(); + }); }); }); diff --git a/spec/javascripts/lib/utils/text_markdown_spec.js b/spec/javascripts/lib/utils/text_markdown_spec.js index b9e805628f8..f71d27eb4e4 100644 --- a/spec/javascripts/lib/utils/text_markdown_spec.js +++ b/spec/javascripts/lib/utils/text_markdown_spec.js @@ -86,6 +86,29 @@ describe('init markdown', () => { expect(textArea.value).toEqual(`${initialValue}* `); }); + + it('places the cursor inside the tags', () => { + const start = 'lorem '; + const end = ' ipsum'; + const tag = '*'; + + textArea.value = `${start}${end}`; + textArea.setSelectionRange(start.length, start.length); + + insertMarkdownText({ + textArea, + text: textArea.value, + tag, + blockTag: null, + selected: '', + wrap: true, + }); + + expect(textArea.value).toEqual(`${start}**${end}`); + + // cursor placement should be between tags + expect(textArea.selectionStart).toBe(start.length + tag.length); + }); }); describe('with selection', () => { @@ -98,16 +121,22 @@ describe('init markdown', () => { }); it('applies the tag to the selected value', () => { + const selectedIndex = text.indexOf(selected); + const tag = '*'; + insertMarkdownText({ textArea, text: textArea.value, - tag: '*', + tag, blockTag: null, selected, wrap: true, }); expect(textArea.value).toEqual(text.replace(selected, `*${selected}*`)); + + // cursor placement should be after selection + 2 tag lengths + expect(textArea.selectionStart).toBe(selectedIndex + selected.length + 2 * tag.length); }); it('replaces the placeholder in the tag', () => { diff --git a/spec/javascripts/performance_bar/components/detailed_metric_spec.js b/spec/javascripts/performance_bar/components/detailed_metric_spec.js index a3b93280b4b..e91685e50c5 100644 --- a/spec/javascripts/performance_bar/components/detailed_metric_spec.js +++ b/spec/javascripts/performance_bar/components/detailed_metric_spec.js @@ -67,7 +67,7 @@ describe('detailedMetric', () => { vm.$el .querySelectorAll('.performance-bar-modal td:nth-child(3)') .forEach((request, index) => { - expect(request.innerText).toContain(requestDetails[index].request); + expect(request.innerText).toEqual(requestDetails[index].request); }); }); diff --git a/spec/javascripts/shared/popover_spec.js b/spec/javascripts/shared/popover_spec.js index 85bde075b77..cc2b2014d38 100644 --- a/spec/javascripts/shared/popover_spec.js +++ b/spec/javascripts/shared/popover_spec.js @@ -112,8 +112,8 @@ describe('popover', () => { length: 0, }; - spyOn($.fn, 'init').and.callFake( - selector => (selector === '.popover:hover' ? fakeJquery : $.fn), + spyOn($.fn, 'init').and.callFake(selector => + selector === '.popover:hover' ? fakeJquery : $.fn, ); spyOn(togglePopover, 'call'); mouseleave(); @@ -126,8 +126,8 @@ describe('popover', () => { length: 1, }; - spyOn($.fn, 'init').and.callFake( - selector => (selector === '.popover:hover' ? fakeJquery : $.fn), + spyOn($.fn, 'init').and.callFake(selector => + selector === '.popover:hover' ? fakeJquery : $.fn, ); spyOn(togglePopover, 'call'); mouseleave(); diff --git a/spec/javascripts/signin_tabs_memoizer_spec.js b/spec/javascripts/signin_tabs_memoizer_spec.js index b688a299052..52da6a79939 100644 --- a/spec/javascripts/signin_tabs_memoizer_spec.js +++ b/spec/javascripts/signin_tabs_memoizer_spec.js @@ -51,8 +51,8 @@ describe('SigninTabsMemoizer', () => { const fakeTab = { click: () => {}, }; - spyOn(document, 'querySelector').and.callFake( - selector => (selector === `${tabSelector} a[href="#bogus"]` ? null : fakeTab), + spyOn(document, 'querySelector').and.callFake(selector => + selector === `${tabSelector} a[href="#bogus"]` ? null : fakeTab, ); spyOn(fakeTab, 'click'); diff --git a/spec/javascripts/vue_mr_widget/components/mr_widget_rebase_spec.js b/spec/javascripts/vue_mr_widget/components/mr_widget_rebase_spec.js index 14d6e8d7556..300133dc602 100644 --- a/spec/javascripts/vue_mr_widget/components/mr_widget_rebase_spec.js +++ b/spec/javascripts/vue_mr_widget/components/mr_widget_rebase_spec.js @@ -44,7 +44,10 @@ describe('Merge request widget rebase component', () => { .textContent.trim(); expect(text).toContain('Fast-forward merge is not possible.'); - expect(text).toContain('Rebase the source branch onto the target branch or merge target'); + expect(text.replace(/\s\s+/g, ' ')).toContain( + 'Rebase the source branch onto the target branch or merge target', + ); + expect(text).toContain('branch into source branch to allow this merge request to be merged.'); }); @@ -78,7 +81,7 @@ describe('Merge request widget rebase component', () => { expect(text).toContain('Fast-forward merge is not possible.'); expect(text).toContain('Rebase the source branch onto'); expect(text).toContain('foo'); - expect(text).toContain('to allow this merge request to be merged.'); + expect(text.replace(/\s\s+/g, ' ')).toContain('to allow this merge request to be merged.'); }); }); diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_missing_branch_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_missing_branch_spec.js index 096301837c4..5fd8093bf5c 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_missing_branch_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_missing_branch_spec.js @@ -33,7 +33,7 @@ describe('MRWidgetMissingBranch', () => { expect(el.classList.contains('mr-widget-body')).toBeTruthy(); expect(el.querySelector('button').getAttribute('disabled')).toBeTruthy(); - expect(content).toContain('source branch does not exist.'); + expect(content.replace(/\s\s+/g, ' ')).toContain('source branch does not exist.'); expect(content).toContain('Please restore it or use a different source branch'); }); }); diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_nothing_to_merge_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_nothing_to_merge_spec.js index babb8cea0ab..bd0bd36ebc2 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_nothing_to_merge_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_nothing_to_merge_spec.js @@ -19,7 +19,9 @@ describe('NothingToMerge', () => { "Currently there are no changes in this merge request's source branch", ); - expect(vm.$el.innerText).toContain('Please push new commits or use a different branch.'); + expect(vm.$el.innerText.replace(/\s\s+/g, ' ')).toContain( + 'Please push new commits or use a different branch.', + ); }); it('should not show new blob link if there is no link available', () => { diff --git a/spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js b/spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js index 88937df2f7b..7b1d589dcf8 100644 --- a/spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js +++ b/spec/javascripts/vue_mr_widget/components/states/mr_widget_wip_spec.js @@ -85,7 +85,9 @@ describe('Wip', () => { expect(el.innerText).toContain('This is a Work in Progress'); expect(el.querySelector('button').getAttribute('disabled')).toBeTruthy(); expect(el.querySelector('button').innerText).toContain('Merge'); - expect(el.querySelector('.js-remove-wip').innerText).toContain('Resolve WIP status'); + expect(el.querySelector('.js-remove-wip').innerText.replace(/\s\s+/g, ' ')).toContain( + 'Resolve WIP status', + ); }); it('should not show removeWIP button is user cannot update MR', done => { diff --git a/spec/javascripts/vue_shared/components/expand_button_spec.js b/spec/javascripts/vue_shared/components/expand_button_spec.js index 98fee9a74a5..2af4abc299a 100644 --- a/spec/javascripts/vue_shared/components/expand_button_spec.js +++ b/spec/javascripts/vue_shared/components/expand_button_spec.js @@ -18,7 +18,7 @@ describe('expand button', () => { vm.$destroy(); }); - it('renders a collpased button', () => { + it('renders a collapsed button', () => { expect(vm.$children[0].iconTestClass).toEqual('ic-ellipsis_h'); }); diff --git a/spec/lib/gitlab/auth/saml/auth_hash_spec.rb b/spec/lib/gitlab/auth/saml/auth_hash_spec.rb index 76f49e778fb..3620e1afe25 100644 --- a/spec/lib/gitlab/auth/saml/auth_hash_spec.rb +++ b/spec/lib/gitlab/auth/saml/auth_hash_spec.rb @@ -82,6 +82,17 @@ describe Gitlab::Auth::Saml::AuthHash do end end + context 'with SAML 2.0 response_object' do + before do + auth_hash_data[:extra][:response_object] = { document: + saml_xml(File.read('spec/fixtures/authentication/saml2_response.xml')) } + end + + it 'can extract authn_context' do + expect(saml_auth_hash.authn_context).to eq 'urn:oasis:names:tc:SAML:2.0:ac:classes:PasswordProtectedTransport' + end + end + context 'without response_object' do it 'returns an empty string' do expect(saml_auth_hash.authn_context).to be_nil diff --git a/spec/lib/gitlab/ci/variables/collection/item_spec.rb b/spec/lib/gitlab/ci/variables/collection/item_spec.rb index 46874662edd..e1e0582cd11 100644 --- a/spec/lib/gitlab/ci/variables/collection/item_spec.rb +++ b/spec/lib/gitlab/ci/variables/collection/item_spec.rb @@ -36,7 +36,7 @@ describe Gitlab::Ci::Variables::Collection::Item do shared_examples 'raises error for invalid type' do it do expect { described_class.new(key: variable_key, value: variable_value) } - .to raise_error ArgumentError, /`value` must be of type String, while it was:/ + .to raise_error ArgumentError, /`#{variable_key}` must be of type String, while it was:/ end end @@ -46,7 +46,7 @@ describe Gitlab::Ci::Variables::Collection::Item do let(:variable_value) { nil } let(:expected_value) { nil } - it_behaves_like 'creates variable' + it_behaves_like 'raises error for invalid type' end context "when it's an empty string" do diff --git a/spec/lib/gitlab/git/remote_mirror_spec.rb b/spec/lib/gitlab/git/remote_mirror_spec.rb new file mode 100644 index 00000000000..dc63eef7814 --- /dev/null +++ b/spec/lib/gitlab/git/remote_mirror_spec.rb @@ -0,0 +1,28 @@ +require 'spec_helper' + +describe Gitlab::Git::RemoteMirror do + describe '#update' do + let(:project) { create(:project, :repository) } + let(:repository) { project.repository } + let(:ref_name) { 'foo' } + let(:options) { { only_branches_matching: ['master'], ssh_key: 'KEY', known_hosts: 'KNOWN HOSTS' } } + + subject(:remote_mirror) { described_class.new(repository, ref_name, **options) } + + it 'delegates to the Gitaly client' do + expect(repository.gitaly_remote_client) + .to receive(:update_remote_mirror) + .with(ref_name, ['master'], ssh_key: 'KEY', known_hosts: 'KNOWN HOSTS') + + remote_mirror.update + end + + it 'wraps gitaly errors' do + expect(repository.gitaly_remote_client) + .to receive(:update_remote_mirror) + .and_raise(StandardError) + + expect { remote_mirror.update }.to raise_error(StandardError) + end + end +end diff --git a/spec/lib/gitlab/gitaly_client/remote_service_spec.rb b/spec/lib/gitlab/gitaly_client/remote_service_spec.rb index 9030a49983d..aff47599ad6 100644 --- a/spec/lib/gitlab/gitaly_client/remote_service_spec.rb +++ b/spec/lib/gitlab/gitaly_client/remote_service_spec.rb @@ -68,6 +68,8 @@ describe Gitlab::GitalyClient::RemoteService do describe '#update_remote_mirror' do let(:ref_name) { 'remote_mirror_1' } let(:only_branches_matching) { ['my-branch', 'master'] } + let(:ssh_key) { 'KEY' } + let(:known_hosts) { 'KNOWN HOSTS' } it 'sends an update_remote_mirror message' do expect_any_instance_of(Gitaly::RemoteService::Stub) @@ -75,7 +77,7 @@ describe Gitlab::GitalyClient::RemoteService do .with(kind_of(Enumerator), kind_of(Hash)) .and_return(double(:update_remote_mirror_response)) - client.update_remote_mirror(ref_name, only_branches_matching) + client.update_remote_mirror(ref_name, only_branches_matching, ssh_key: ssh_key, known_hosts: known_hosts) end end diff --git a/spec/lib/gitlab/gitaly_client/repository_service_spec.rb b/spec/lib/gitlab/gitaly_client/repository_service_spec.rb index d605fcbafee..46ca2340389 100644 --- a/spec/lib/gitlab/gitaly_client/repository_service_spec.rb +++ b/spec/lib/gitlab/gitaly_client/repository_service_spec.rb @@ -130,7 +130,7 @@ describe Gitlab::GitalyClient::RepositoryService do end context 'SSH auth' do - where(:ssh_import, :ssh_key_auth, :ssh_private_key, :ssh_known_hosts, :expected_params) do + where(:ssh_mirror_url, :ssh_key_auth, :ssh_private_key, :ssh_known_hosts, :expected_params) do false | false | 'key' | 'known_hosts' | {} false | true | 'key' | 'known_hosts' | {} true | false | 'key' | 'known_hosts' | { known_hosts: 'known_hosts' } @@ -145,7 +145,7 @@ describe Gitlab::GitalyClient::RepositoryService do let(:ssh_auth) do double( :ssh_auth, - ssh_import?: ssh_import, + ssh_mirror_url?: ssh_mirror_url, ssh_key_auth?: ssh_key_auth, ssh_private_key: ssh_private_key, ssh_known_hosts: ssh_known_hosts diff --git a/spec/lib/gitlab/import_export/project.json b/spec/lib/gitlab/import_export/project.json index 3f2281f213f..58949f76bd6 100644 --- a/spec/lib/gitlab/import_export/project.json +++ b/spec/lib/gitlab/import_export/project.json @@ -2556,7 +2556,7 @@ "merge_request_diff_id": 27, "relative_order": 0, "sha": "bb5206fee213d983da88c47f9cf4cc6caf9c66dc", - "message": "Feature conflcit added\n\nSigned-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>\n", + "message": "Feature conflict added\n\nSigned-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>\n", "authored_date": "2014-08-06T08:35:52.000+02:00", "author_name": "Dmitriy Zaporozhets", "author_email": "dmitriy.zaporozhets@gmail.com", @@ -3605,7 +3605,7 @@ "merge_request_diff_id": 14, "relative_order": 8, "sha": "08f22f255f082689c0d7d39d19205085311542bc", - "message": "remove emtpy file.(beacase git ignore empty file)\nadd whitespace test file.\n", + "message": "remove empty file.(beacase git ignore empty file)\nadd whitespace test file.\n", "authored_date": "2015-11-13T06:00:16.000+01:00", "author_name": "윤민식", "author_email": "minsik.yoon@samsung.com", @@ -4290,7 +4290,7 @@ "merge_request_diff_id": 13, "relative_order": 8, "sha": "08f22f255f082689c0d7d39d19205085311542bc", - "message": "remove emtpy file.(beacase git ignore empty file)\nadd whitespace test file.\n", + "message": "remove empty file.(beacase git ignore empty file)\nadd whitespace test file.\n", "authored_date": "2015-11-13T06:00:16.000+01:00", "author_name": "윤민식", "author_email": "minsik.yoon@samsung.com", @@ -4799,7 +4799,7 @@ "merge_request_diff_id": 12, "relative_order": 8, "sha": "08f22f255f082689c0d7d39d19205085311542bc", - "message": "remove emtpy file.(beacase git ignore empty file)\nadd whitespace test file.\n", + "message": "remove empty file.(beacase git ignore empty file)\nadd whitespace test file.\n", "authored_date": "2015-11-13T06:00:16.000+01:00", "author_name": "윤민식", "author_email": "minsik.yoon@samsung.com", @@ -5507,7 +5507,7 @@ "merge_request_diff_id": 10, "relative_order": 8, "sha": "08f22f255f082689c0d7d39d19205085311542bc", - "message": "remove emtpy file.(beacase git ignore empty file)\nadd whitespace test file.\n", + "message": "remove empty file.(beacase git ignore empty file)\nadd whitespace test file.\n", "authored_date": "2015-11-13T06:00:16.000+01:00", "author_name": "윤민식", "author_email": "minsik.yoon@samsung.com", diff --git a/spec/lib/gitlab/import_export/project.light.json b/spec/lib/gitlab/import_export/project.light.json index ba2248073f5..2971ca0f0f8 100644 --- a/spec/lib/gitlab/import_export/project.light.json +++ b/spec/lib/gitlab/import_export/project.light.json @@ -101,6 +101,28 @@ ] } ], + "services": [ + { + "id": 100, + "title": "JetBrains TeamCity CI", + "project_id": 5, + "created_at": "2016-06-14T15:01:51.315Z", + "updated_at": "2016-06-14T15:01:51.315Z", + "active": false, + "properties": {}, + "template": true, + "push_events": true, + "issues_events": true, + "merge_requests_events": true, + "tag_push_events": true, + "note_events": true, + "job_events": true, + "type": "TeamcityService", + "category": "ci", + "default": false, + "wiki_page_events": true + } + ], "snippets": [], "hooks": [] } diff --git a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb index 365bfae0d88..7171e12a849 100644 --- a/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb +++ b/spec/lib/gitlab/import_export/project_tree_restorer_spec.rb @@ -297,7 +297,8 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do issues: 1, labels: 1, milestones: 1, - first_issue_labels: 1 + first_issue_labels: 1, + services: 1 context 'project.json file access check' do it 'does not read a symlink' do @@ -382,6 +383,12 @@ describe Gitlab::ImportExport::ProjectTreeRestorer do project_tree_restorer.instance_variable_set(:@path, "spec/lib/gitlab/import_export/project.light.json") end + it 'does not import any templated services' do + restored_project_json + + expect(project.services.where(template: true).count).to eq(0) + end + it 'imports labels' do create(:group_label, name: 'Another label', group: project.group) diff --git a/spec/lib/gitlab/private_commit_email_spec.rb b/spec/lib/gitlab/private_commit_email_spec.rb index bc86cd3842a..10bf624bbdd 100644 --- a/spec/lib/gitlab/private_commit_email_spec.rb +++ b/spec/lib/gitlab/private_commit_email_spec.rb @@ -4,6 +4,9 @@ require 'spec_helper' describe Gitlab::PrivateCommitEmail do let(:hostname) { Gitlab::CurrentSettings.current_application_settings.commit_email_hostname } + let(:id) { 1 } + let(:valid_email) { "#{id}-foo@#{hostname}" } + let(:invalid_email) { "#{id}-foo@users.noreply.bar.com" } context '.regex' do subject { described_class.regex } @@ -16,18 +19,25 @@ describe Gitlab::PrivateCommitEmail do end context '.user_id_for_email' do - let(:id) { 1 } - it 'parses user id from email' do - email = "#{id}-foo@#{hostname}" - - expect(described_class.user_id_for_email(email)).to eq(id) + expect(described_class.user_id_for_email(valid_email)).to eq(id) end it 'returns nil on invalid commit email' do - email = "#{id}-foo@users.noreply.bar.com" + expect(described_class.user_id_for_email(invalid_email)).to be_nil + end + end + + context '.user_ids_for_email' do + it 'returns deduplicated user IDs for each valid email' do + result = described_class.user_ids_for_emails([valid_email, valid_email, invalid_email]) + + expect(result).to eq([id]) + end - expect(described_class.user_id_for_email(email)).to be_nil + it 'returns an empty array with no valid emails' do + result = described_class.user_ids_for_emails([invalid_email]) + expect(result).to eq([]) end end diff --git a/spec/lib/gitlab/repository_cache_spec.rb b/spec/lib/gitlab/repository_cache_spec.rb index 741ee12633f..1b9a8b4ab0d 100644 --- a/spec/lib/gitlab/repository_cache_spec.rb +++ b/spec/lib/gitlab/repository_cache_spec.rb @@ -4,14 +4,14 @@ describe Gitlab::RepositoryCache do let(:backend) { double('backend').as_null_object } let(:project) { create(:project) } let(:repository) { project.repository } - let(:namespace) { "#{repository.full_path}:#{project.id}" } + let(:namespace) { "project:#{project.id}" } let(:cache) { described_class.new(repository, backend: backend) } describe '#cache_key' do subject { cache.cache_key(:foo) } it 'includes the namespace' do - expect(subject).to eq "foo:#{namespace}" + expect(subject).to eq "#{namespace}:foo" end context 'with a given namespace' do @@ -22,7 +22,7 @@ describe Gitlab::RepositoryCache do end it 'includes the full namespace' do - expect(subject).to eq "foo:#{namespace}:#{extra_namespace}" + expect(subject).to eq "#{namespace}:#{extra_namespace}:foo" end end end @@ -30,21 +30,21 @@ describe Gitlab::RepositoryCache do describe '#expire' do it 'expires the given key from the cache' do cache.expire(:foo) - expect(backend).to have_received(:delete).with("foo:#{namespace}") + expect(backend).to have_received(:delete).with("#{namespace}:foo") end end describe '#fetch' do it 'fetches the given key from the cache' do cache.fetch(:bar) - expect(backend).to have_received(:fetch).with("bar:#{namespace}") + expect(backend).to have_received(:fetch).with("#{namespace}:bar") end it 'accepts a block' do p = -> {} cache.fetch(:baz, &p) - expect(backend).to have_received(:fetch).with("baz:#{namespace}", &p) + expect(backend).to have_received(:fetch).with("#{namespace}:baz", &p) end end @@ -67,7 +67,7 @@ describe Gitlab::RepositoryCache do end it 'caches the value' do - expect(backend).to receive(:write).with("#{key}:#{namespace}", true) + expect(backend).to receive(:write).with("#{namespace}:#{key}", true) cache.fetch_without_caching_false(key) { true } end @@ -83,7 +83,7 @@ describe Gitlab::RepositoryCache do end it 'does not cache the value' do - expect(backend).not_to receive(:write).with("#{key}:#{namespace}", true) + expect(backend).not_to receive(:write).with("#{namespace}:#{key}", true) cache.fetch_without_caching_false(key, &p) end @@ -92,7 +92,7 @@ describe Gitlab::RepositoryCache do context 'when the cached value is truthy' do before do - backend.write("#{key}:#{namespace}", true) + backend.write("#{namespace}:#{key}", true) end it 'returns the cached value' do @@ -116,7 +116,7 @@ describe Gitlab::RepositoryCache do context 'when the cached value is falsey' do before do - backend.write("#{key}:#{namespace}", false) + backend.write("#{namespace}:#{key}", false) end it 'returns the result of the block' do @@ -126,7 +126,7 @@ describe Gitlab::RepositoryCache do end it 'writes the truthy value to the cache' do - expect(backend).to receive(:write).with("#{key}:#{namespace}", 'block result') + expect(backend).to receive(:write).with("#{namespace}:#{key}", 'block result') cache.fetch_without_caching_false(key) { 'block result' } end diff --git a/spec/models/ci/build_spec.rb b/spec/models/ci/build_spec.rb index 6849bc6db7a..d02c3a5765f 100644 --- a/spec/models/ci/build_spec.rb +++ b/spec/models/ci/build_spec.rb @@ -1928,12 +1928,26 @@ describe Ci::Build do describe '#repo_url' do subject { build.repo_url } - it { is_expected.to be_a(String) } - it { is_expected.to end_with(".git") } - it { is_expected.to start_with(project.web_url[0..6]) } - it { is_expected.to include(build.token) } - it { is_expected.to include('gitlab-ci-token') } - it { is_expected.to include(project.web_url[7..-1]) } + context 'when token is set' do + before do + build.ensure_token + end + + it { is_expected.to be_a(String) } + it { is_expected.to end_with(".git") } + it { is_expected.to start_with(project.web_url[0..6]) } + it { is_expected.to include(build.token) } + it { is_expected.to include('gitlab-ci-token') } + it { is_expected.to include(project.web_url[7..-1]) } + end + + context 'when token is empty' do + before do + build.token = nil + end + + it { is_expected.to be_nil} + end end describe '#stuck?' do @@ -2043,7 +2057,8 @@ describe Ci::Build do end context 'use from gitlab-ci.yml' do - let(:pipeline) { create(:ci_pipeline) } + let(:project) { create(:project, :repository) } + let(:pipeline) { create(:ci_pipeline, project: project) } before do stub_ci_pipeline_yaml_file(config) @@ -2085,56 +2100,6 @@ describe Ci::Build do describe '#variables' do let(:container_registry_enabled) { false } - let(:gitlab_version_info) { Gitlab::VersionInfo.parse(Gitlab::VERSION) } - let(:predefined_variables) do - [ - { key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true }, - { key: 'CI_PIPELINE_URL', value: project.web_url + "/pipelines/#{pipeline.id}", public: true }, - { key: 'CI_JOB_ID', value: build.id.to_s, public: true }, - { key: 'CI_JOB_URL', value: project.web_url + "/-/jobs/#{build.id}", public: true }, - { key: 'CI_JOB_TOKEN', value: build.token, public: false }, - { key: 'CI_BUILD_ID', value: build.id.to_s, public: true }, - { key: 'CI_BUILD_TOKEN', value: build.token, public: false }, - { key: 'CI_REGISTRY_USER', value: 'gitlab-ci-token', public: true }, - { key: 'CI_REGISTRY_PASSWORD', value: build.token, public: false }, - { key: 'CI_REPOSITORY_URL', value: build.repo_url, public: false }, - { key: 'CI', value: 'true', public: true }, - { key: 'GITLAB_CI', value: 'true', public: true }, - { key: 'GITLAB_FEATURES', value: project.licensed_features.join(','), public: true }, - { key: 'CI_SERVER_NAME', value: 'GitLab', public: true }, - { key: 'CI_SERVER_VERSION', value: Gitlab::VERSION, public: true }, - { key: 'CI_SERVER_VERSION_MAJOR', value: gitlab_version_info.major.to_s, public: true }, - { key: 'CI_SERVER_VERSION_MINOR', value: gitlab_version_info.minor.to_s, public: true }, - { key: 'CI_SERVER_VERSION_PATCH', value: gitlab_version_info.patch.to_s, public: true }, - { key: 'CI_SERVER_REVISION', value: Gitlab.revision, public: true }, - { key: 'CI_JOB_NAME', value: 'test', public: true }, - { key: 'CI_JOB_STAGE', value: 'test', public: true }, - { key: 'CI_COMMIT_SHA', value: build.sha, public: true }, - { key: 'CI_COMMIT_BEFORE_SHA', value: build.before_sha, public: true }, - { key: 'CI_COMMIT_REF_NAME', value: build.ref, public: true }, - { key: 'CI_COMMIT_REF_SLUG', value: build.ref_slug, public: true }, - { key: 'CI_NODE_TOTAL', value: '1', public: true }, - { key: 'CI_BUILD_REF', value: build.sha, public: true }, - { key: 'CI_BUILD_BEFORE_SHA', value: build.before_sha, public: true }, - { key: 'CI_BUILD_REF_NAME', value: build.ref, public: true }, - { key: 'CI_BUILD_REF_SLUG', value: build.ref_slug, public: true }, - { key: 'CI_BUILD_NAME', value: 'test', public: true }, - { key: 'CI_BUILD_STAGE', value: 'test', public: true }, - { key: 'CI_PROJECT_ID', value: project.id.to_s, public: true }, - { key: 'CI_PROJECT_NAME', value: project.path, public: true }, - { key: 'CI_PROJECT_PATH', value: project.full_path, public: true }, - { key: 'CI_PROJECT_PATH_SLUG', value: project.full_path_slug, public: true }, - { key: 'CI_PROJECT_NAMESPACE', value: project.namespace.full_path, public: true }, - { key: 'CI_PROJECT_URL', value: project.web_url, public: true }, - { key: 'CI_PROJECT_VISIBILITY', value: 'private', public: true }, - { key: 'CI_PIPELINE_IID', value: pipeline.iid.to_s, public: true }, - { key: 'CI_CONFIG_PATH', value: pipeline.ci_yaml_file_path, public: true }, - { key: 'CI_PIPELINE_SOURCE', value: pipeline.source, public: true }, - { key: 'CI_COMMIT_MESSAGE', value: pipeline.git_commit_message, public: true }, - { key: 'CI_COMMIT_TITLE', value: pipeline.git_commit_title, public: true }, - { key: 'CI_COMMIT_DESCRIPTION', value: pipeline.git_commit_description, public: true } - ] - end before do stub_container_registry_config(enabled: container_registry_enabled, host_port: 'registry.example.com') @@ -2143,11 +2108,174 @@ describe Ci::Build do subject { build.variables } context 'returns variables' do + let(:predefined_variables) do + [ + { key: 'CI_PIPELINE_ID', value: pipeline.id.to_s, public: true }, + { key: 'CI_PIPELINE_URL', value: project.web_url + "/pipelines/#{pipeline.id}", public: true }, + { key: 'CI_JOB_ID', value: build.id.to_s, public: true }, + { key: 'CI_JOB_URL', value: project.web_url + "/-/jobs/#{build.id}", public: true }, + { key: 'CI_JOB_TOKEN', value: 'my-token', public: false }, + { key: 'CI_BUILD_ID', value: build.id.to_s, public: true }, + { key: 'CI_BUILD_TOKEN', value: 'my-token', public: false }, + { key: 'CI_REGISTRY_USER', value: 'gitlab-ci-token', public: true }, + { key: 'CI_REGISTRY_PASSWORD', value: 'my-token', public: false }, + { key: 'CI_REPOSITORY_URL', value: build.repo_url, public: false }, + { key: 'CI', value: 'true', public: true }, + { key: 'GITLAB_CI', value: 'true', public: true }, + { key: 'GITLAB_FEATURES', value: project.licensed_features.join(','), public: true }, + { key: 'CI_SERVER_NAME', value: 'GitLab', public: true }, + { key: 'CI_SERVER_VERSION', value: Gitlab::VERSION, public: true }, + { key: 'CI_SERVER_VERSION_MAJOR', value: Gitlab.version_info.major.to_s, public: true }, + { key: 'CI_SERVER_VERSION_MINOR', value: Gitlab.version_info.minor.to_s, public: true }, + { key: 'CI_SERVER_VERSION_PATCH', value: Gitlab.version_info.patch.to_s, public: true }, + { key: 'CI_SERVER_REVISION', value: Gitlab.revision, public: true }, + { key: 'CI_JOB_NAME', value: 'test', public: true }, + { key: 'CI_JOB_STAGE', value: 'test', public: true }, + { key: 'CI_COMMIT_SHA', value: build.sha, public: true }, + { key: 'CI_COMMIT_BEFORE_SHA', value: build.before_sha, public: true }, + { key: 'CI_COMMIT_REF_NAME', value: build.ref, public: true }, + { key: 'CI_COMMIT_REF_SLUG', value: build.ref_slug, public: true }, + { key: 'CI_NODE_TOTAL', value: '1', public: true }, + { key: 'CI_BUILD_REF', value: build.sha, public: true }, + { key: 'CI_BUILD_BEFORE_SHA', value: build.before_sha, public: true }, + { key: 'CI_BUILD_REF_NAME', value: build.ref, public: true }, + { key: 'CI_BUILD_REF_SLUG', value: build.ref_slug, public: true }, + { key: 'CI_BUILD_NAME', value: 'test', public: true }, + { key: 'CI_BUILD_STAGE', value: 'test', public: true }, + { key: 'CI_PROJECT_ID', value: project.id.to_s, public: true }, + { key: 'CI_PROJECT_NAME', value: project.path, public: true }, + { key: 'CI_PROJECT_PATH', value: project.full_path, public: true }, + { key: 'CI_PROJECT_PATH_SLUG', value: project.full_path_slug, public: true }, + { key: 'CI_PROJECT_NAMESPACE', value: project.namespace.full_path, public: true }, + { key: 'CI_PROJECT_URL', value: project.web_url, public: true }, + { key: 'CI_PROJECT_VISIBILITY', value: 'private', public: true }, + { key: 'CI_PIPELINE_IID', value: pipeline.iid.to_s, public: true }, + { key: 'CI_CONFIG_PATH', value: pipeline.ci_yaml_file_path, public: true }, + { key: 'CI_PIPELINE_SOURCE', value: pipeline.source, public: true }, + { key: 'CI_COMMIT_MESSAGE', value: pipeline.git_commit_message, public: true }, + { key: 'CI_COMMIT_TITLE', value: pipeline.git_commit_title, public: true }, + { key: 'CI_COMMIT_DESCRIPTION', value: pipeline.git_commit_description, public: true } + ] + end + before do + build.token = 'my-token' build.yaml_variables = [] end it { is_expected.to include(*predefined_variables) } + + context 'when yaml variables are undefined' do + let(:pipeline) do + create(:ci_pipeline, project: project, + sha: project.commit.id, + ref: project.default_branch) + end + + before do + build.yaml_variables = nil + end + + context 'use from gitlab-ci.yml' do + before do + stub_ci_pipeline_yaml_file(config) + end + + context 'when config is not found' do + let(:config) { nil } + + it { is_expected.to include(*predefined_variables) } + end + + context 'when config does not have a questioned job' do + let(:config) do + YAML.dump({ + test_other: { + script: 'Hello World' + } + }) + end + + it { is_expected.to include(*predefined_variables) } + end + + context 'when config has variables' do + let(:config) do + YAML.dump({ + test: { + script: 'Hello World', + variables: { + KEY: 'value' + } + } + }) + end + + let(:variables) do + [{ key: 'KEY', value: 'value', public: true }] + end + + it { is_expected.to include(*predefined_variables) } + it { is_expected.to include(*variables) } + end + end + end + + describe 'variables ordering' do + context 'when variables hierarchy is stubbed' do + let(:build_pre_var) { { key: 'build', value: 'value', public: true } } + let(:project_pre_var) { { key: 'project', value: 'value', public: true } } + let(:pipeline_pre_var) { { key: 'pipeline', value: 'value', public: true } } + let(:build_yaml_var) { { key: 'yaml', value: 'value', public: true } } + + before do + allow(build).to receive(:predefined_variables) { [build_pre_var] } + allow(build).to receive(:yaml_variables) { [build_yaml_var] } + allow(build).to receive(:persisted_variables) { [] } + + allow_any_instance_of(Project) + .to receive(:predefined_variables) { [project_pre_var] } + + project.variables.create!(key: 'secret', value: 'value') + + allow_any_instance_of(Ci::Pipeline) + .to receive(:predefined_variables) { [pipeline_pre_var] } + end + + it 'returns variables in order depending on resource hierarchy' do + is_expected.to eq( + [build_pre_var, + project_pre_var, + pipeline_pre_var, + build_yaml_var, + { key: 'secret', value: 'value', public: false }]) + end + end + + context 'when build has environment and user-provided variables' do + let(:expected_variables) do + predefined_variables.map { |variable| variable.fetch(:key) } + + %w[YAML_VARIABLE CI_ENVIRONMENT_NAME CI_ENVIRONMENT_SLUG + CI_ENVIRONMENT_URL] + end + + before do + create(:environment, project: build.project, + name: 'staging') + + build.yaml_variables = [{ key: 'YAML_VARIABLE', + value: 'var', + public: true }] + build.environment = 'staging' + end + + it 'matches explicit variables ordering' do + received_variables = subject.map { |variable| variable.fetch(:key) } + + expect(received_variables).to eq expected_variables + end + end + end end context 'when build has user' do @@ -2409,75 +2537,20 @@ describe Ci::Build do end before do - pipeline_schedule.pipelines << pipeline + pipeline_schedule.pipelines << pipeline.reload pipeline_schedule.reload end it { is_expected.to include(pipeline_schedule_variable.to_runner_variable) } end - context 'when yaml_variables are undefined' do - let(:pipeline) do - create(:ci_pipeline, project: project, - sha: project.commit.id, - ref: project.default_branch) - end - - before do - build.yaml_variables = nil - end - - context 'use from gitlab-ci.yml' do - before do - stub_ci_pipeline_yaml_file(config) - end - - context 'when config is not found' do - let(:config) { nil } - - it { is_expected.to include(*predefined_variables) } - end - - context 'when config does not have a questioned job' do - let(:config) do - YAML.dump({ - test_other: { - script: 'Hello World' - } - }) - end - - it { is_expected.to include(*predefined_variables) } - end - - context 'when config has variables' do - let(:config) do - YAML.dump({ - test: { - script: 'Hello World', - variables: { - KEY: 'value' - } - } - }) - end - let(:variables) do - [{ key: 'KEY', value: 'value', public: true }] - end - - it { is_expected.to include(*predefined_variables) } - it { is_expected.to include(*variables) } - end - end - end - context 'when container registry is enabled' do let(:container_registry_enabled) { true } let(:ci_registry) do - { key: 'CI_REGISTRY', value: 'registry.example.com', public: true } + { key: 'CI_REGISTRY', value: 'registry.example.com', public: true } end let(:ci_registry_image) do - { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_url, public: true } + { key: 'CI_REGISTRY_IMAGE', value: project.container_registry_url, public: true } end context 'and is disabled for project' do @@ -2598,66 +2671,6 @@ describe Ci::Build do end end - describe 'variables ordering' do - context 'when variables hierarchy is stubbed' do - let(:build_pre_var) { { key: 'build', value: 'value', public: true } } - let(:project_pre_var) { { key: 'project', value: 'value', public: true } } - let(:pipeline_pre_var) { { key: 'pipeline', value: 'value', public: true } } - let(:build_yaml_var) { { key: 'yaml', value: 'value', public: true } } - - before do - allow(build).to receive(:predefined_variables) { [build_pre_var] } - allow(build).to receive(:yaml_variables) { [build_yaml_var] } - allow(build).to receive(:persisted_variables) { [] } - - allow_any_instance_of(Project) - .to receive(:predefined_variables) { [project_pre_var] } - - allow_any_instance_of(Project) - .to receive(:ci_variables_for) - .with(ref: 'master', environment: nil) do - [create(:ci_variable, key: 'secret', value: 'value')] - end - - allow_any_instance_of(Ci::Pipeline) - .to receive(:predefined_variables) { [pipeline_pre_var] } - end - - it 'returns variables in order depending on resource hierarchy' do - is_expected.to eq( - [build_pre_var, - project_pre_var, - pipeline_pre_var, - build_yaml_var, - { key: 'secret', value: 'value', public: false }]) - end - end - - context 'when build has environment and user-provided variables' do - let(:expected_variables) do - predefined_variables.map { |variable| variable.fetch(:key) } + - %w[YAML_VARIABLE CI_ENVIRONMENT_NAME CI_ENVIRONMENT_SLUG - CI_ENVIRONMENT_URL] - end - - before do - create(:environment, project: build.project, - name: 'staging') - - build.yaml_variables = [{ key: 'YAML_VARIABLE', - value: 'var', - public: true }] - build.environment = 'staging' - end - - it 'matches explicit variables ordering' do - received_variables = subject.map { |variable| variable.fetch(:key) } - - expect(received_variables).to eq expected_variables - end - end - end - context 'when build has not been persisted yet' do let(:build) do described_class.new( diff --git a/spec/models/clusters/kubernetes_namespace_spec.rb b/spec/models/clusters/kubernetes_namespace_spec.rb index c068c4d7739..56c98d016c9 100644 --- a/spec/models/clusters/kubernetes_namespace_spec.rb +++ b/spec/models/clusters/kubernetes_namespace_spec.rb @@ -45,14 +45,14 @@ RSpec.describe Clusters::KubernetesNamespace, type: :model do end end - describe '#configure_predefined_variables' do + describe '#set_defaults' do let(:kubernetes_namespace) { build(:cluster_kubernetes_namespace) } let(:cluster) { kubernetes_namespace.cluster } let(:platform) { kubernetes_namespace.platform_kubernetes } - subject { kubernetes_namespace.configure_predefined_credentials } + subject { kubernetes_namespace.set_defaults } - describe 'namespace' do + describe '#namespace' do before do platform.update_column(:namespace, namespace) end @@ -80,7 +80,7 @@ RSpec.describe Clusters::KubernetesNamespace, type: :model do end end - describe 'service_account_name' do + describe '#service_account_name' do let(:service_account_name) { "#{kubernetes_namespace.namespace}-service-account" } it 'should set a service account name based on namespace' do diff --git a/spec/models/commit_spec.rb b/spec/models/commit_spec.rb index ed41ff7a0fa..2a0039a0635 100644 --- a/spec/models/commit_spec.rb +++ b/spec/models/commit_spec.rb @@ -72,6 +72,7 @@ describe Commit do context 'using eager loading' do let!(:alice) { create(:user, email: 'alice@example.com') } let!(:bob) { create(:user, email: 'hunter2@example.com') } + let!(:jeff) { create(:user) } let(:alice_commit) do described_class.new(RepoHelpers.sample_commit, project).tap do |c| @@ -93,7 +94,14 @@ describe Commit do end end - let!(:commits) { [alice_commit, bob_commit, eve_commit] } + let(:jeff_commit) do + # The commit for Jeff uses his private commit email + described_class.new(RepoHelpers.sample_commit, project).tap do |c| + c.author_email = jeff.private_commit_email + end + end + + let!(:commits) { [alice_commit, bob_commit, eve_commit, jeff_commit] } before do create(:email, user: bob, email: 'bob@example.com') @@ -125,6 +133,20 @@ describe Commit do expect(bob_commit.author).to eq(bob) end + it "preloads the authors for Commits using a User's private commit Email" do + commits.each(&:lazy_author) + + expect(jeff_commit.author).to eq(jeff) + end + + it "preloads the authors for Commits using a User's outdated private commit Email" do + jeff.update!(username: 'new-username') + + commits.each(&:lazy_author) + + expect(jeff_commit.author).to eq(jeff) + end + it 'sets the author to Nil if an author could not be found for a Commit' do commits.each(&:lazy_author) diff --git a/spec/models/remote_mirror_spec.rb b/spec/models/remote_mirror_spec.rb index 3d316fb3c5b..da61a5f2771 100644 --- a/spec/models/remote_mirror_spec.rb +++ b/spec/models/remote_mirror_spec.rb @@ -222,14 +222,26 @@ describe RemoteMirror do context '#ensure_remote!' do let(:remote_mirror) { create(:project, :repository, :remote_mirror).remote_mirrors.first } + let(:project) { remote_mirror.project } + let(:repository) { project.repository } it 'adds a remote multiple times with no errors' do - expect(remote_mirror.project.repository).to receive(:add_remote).with(remote_mirror.remote_name, remote_mirror.url).twice.and_call_original + expect(repository).to receive(:add_remote).with(remote_mirror.remote_name, remote_mirror.url).twice.and_call_original 2.times do remote_mirror.ensure_remote! end end + + context 'SSH public-key authentication' do + it 'omits the password from the URL' do + remote_mirror.update!(auth_method: 'ssh_public_key', url: 'ssh://git:pass@example.com') + + expect(repository).to receive(:add_remote).with(remote_mirror.remote_name, 'ssh://git@example.com') + + remote_mirror.ensure_remote! + end + end end context '#updated_since?' do diff --git a/spec/models/repository_spec.rb b/spec/models/repository_spec.rb index 799a60ac62f..56edb0fd6da 100644 --- a/spec/models/repository_spec.rb +++ b/spec/models/repository_spec.rb @@ -2403,4 +2403,22 @@ describe Repository do repository.merge_base('master', 'fix') end end + + describe '#cache' do + subject(:cache) { repository.send(:cache) } + + it 'returns a RepositoryCache' do + expect(subject).to be_kind_of Gitlab::RepositoryCache + end + + it 'when is_wiki it includes wiki as part of key' do + allow(repository).to receive(:is_wiki) { true } + + expect(subject.namespace).to include('wiki') + end + + it 'when is_wiki is false extra_namespace is nil' do + expect(subject.namespace).not_to include('wiki') + end + end end diff --git a/spec/models/todo_spec.rb b/spec/models/todo_spec.rb index 2c01578aaca..82ff2a002e0 100644 --- a/spec/models/todo_spec.rb +++ b/spec/models/todo_spec.rb @@ -226,7 +226,7 @@ describe Todo do create(:todo, target: create(:merge_request)) - expect(described_class.for_type(Issue)).to eq([todo]) + expect(described_class.for_type(Issue.name)).to eq([todo]) end end diff --git a/spec/models/user_spec.rb b/spec/models/user_spec.rb index 0ac5bd666ae..733c1c49f08 100644 --- a/spec/models/user_spec.rb +++ b/spec/models/user_spec.rb @@ -1174,6 +1174,22 @@ describe User do expect(described_class.by_any_email(user.email, confirmed: true)).to eq([user]) end + + it 'finds user through a private commit email' do + user = create(:user) + private_email = user.private_commit_email + + expect(described_class.by_any_email(private_email)).to eq([user]) + expect(described_class.by_any_email(private_email, confirmed: true)).to eq([user]) + end + + it 'finds user through a private commit email in an array' do + user = create(:user) + private_email = user.private_commit_email + + expect(described_class.by_any_email([private_email])).to eq([user]) + expect(described_class.by_any_email([private_email], confirmed: true)).to eq([user]) + end end describe '.search' do @@ -1501,7 +1517,12 @@ describe User do email_unconfirmed = create :email, user: user user.reload - expect(user.all_emails).to match_array([user.email, email_unconfirmed.email, email_confirmed.email]) + expect(user.all_emails).to contain_exactly( + user.email, + user.private_commit_email, + email_unconfirmed.email, + email_confirmed.email + ) end end @@ -1512,7 +1533,11 @@ describe User do email_confirmed = create :email, user: user, confirmed_at: Time.now create :email, user: user - expect(user.verified_emails).to match_array([user.email, user.private_commit_email, email_confirmed.email]) + expect(user.verified_emails).to contain_exactly( + user.email, + user.private_commit_email, + email_confirmed.email + ) end end @@ -1532,6 +1557,14 @@ describe User do expect(user.verified_email?(user.private_commit_email)).to be_truthy end + it 'returns true for an outdated private commit email' do + old_email = user.private_commit_email + + user.update!(username: 'changed-username') + + expect(user.verified_email?(old_email)).to be_truthy + end + it 'returns false when the email is not verified/confirmed' do email_unconfirmed = create :email, user: user user.reload diff --git a/spec/serializers/project_mirror_entity_spec.rb b/spec/serializers/project_mirror_entity_spec.rb new file mode 100644 index 00000000000..ad0a8bbdff0 --- /dev/null +++ b/spec/serializers/project_mirror_entity_spec.rb @@ -0,0 +1,12 @@ +require 'spec_helper' + +describe ProjectMirrorEntity do + let(:project) { create(:project, :repository, :remote_mirror) } + let(:entity) { described_class.new(project) } + + subject { entity.as_json } + + it 'exposes project-specific elements' do + is_expected.to include(:id, :remote_mirrors_attributes) + end +end diff --git a/spec/serializers/remote_mirror_entity_spec.rb b/spec/serializers/remote_mirror_entity_spec.rb new file mode 100644 index 00000000000..885b0b9b423 --- /dev/null +++ b/spec/serializers/remote_mirror_entity_spec.rb @@ -0,0 +1,16 @@ +require 'spec_helper' + +describe RemoteMirrorEntity do + let(:project) { create(:project, :repository, :remote_mirror) } + let(:remote_mirror) { project.remote_mirrors.first } + let(:entity) { described_class.new(remote_mirror) } + + subject { entity.as_json } + + it 'exposes remote-mirror-specific elements' do + is_expected.to include( + :id, :url, :enabled, :auth_method, + :ssh_known_hosts, :ssh_public_key, :ssh_known_hosts_fingerprints + ) + end +end diff --git a/spec/services/clusters/gcp/kubernetes/create_or_update_namespace_service_spec.rb b/spec/services/clusters/gcp/kubernetes/create_or_update_namespace_service_spec.rb index fc922218ad0..661364ac765 100644 --- a/spec/services/clusters/gcp/kubernetes/create_or_update_namespace_service_spec.rb +++ b/spec/services/clusters/gcp/kubernetes/create_or_update_namespace_service_spec.rb @@ -44,7 +44,7 @@ describe Clusters::Gcp::Kubernetes::CreateOrUpdateNamespaceService, '#execute' d let(:namespace) { "#{project.path}-#{project.id}" } let(:kubernetes_namespace) do - build(:cluster_kubernetes_namespace, + create(:cluster_kubernetes_namespace, cluster: cluster, project: cluster_project.project, cluster_project: cluster_project) diff --git a/spec/services/merge_requests/create_from_issue_service_spec.rb b/spec/services/merge_requests/create_from_issue_service_spec.rb index b1882df732d..393299cce00 100644 --- a/spec/services/merge_requests/create_from_issue_service_spec.rb +++ b/spec/services/merge_requests/create_from_issue_service_spec.rb @@ -61,7 +61,15 @@ describe MergeRequests::CreateFromIssueService do expect(project.repository.branch_exists?(custom_source_branch)).to be_truthy end - it 'creates a system note' do + it 'creates the new_merge_request system note' do + expect(SystemNoteService).to receive(:new_merge_request).with(issue, project, user, instance_of(MergeRequest)) + + service.execute + end + + it 'creates the new_issue_branch system note when the branch could be created but the merge_request cannot be created' do + project.project_feature.update!(merge_requests_access_level: ProjectFeature::DISABLED) + expect(SystemNoteService).to receive(:new_issue_branch).with(issue, project, user, issue.to_branch_name) service.execute diff --git a/spec/services/projects/update_remote_mirror_service_spec.rb b/spec/services/projects/update_remote_mirror_service_spec.rb index cd903bfe8a5..c1e5f788146 100644 --- a/spec/services/projects/update_remote_mirror_service_spec.rb +++ b/spec/services/projects/update_remote_mirror_service_spec.rb @@ -16,7 +16,7 @@ describe Projects::UpdateRemoteMirrorService do end it "ensures the remote exists" do - stub_fetch_remote(project, remote_name: remote_name) + stub_fetch_remote(project, remote_name: remote_name, ssh_auth: remote_mirror) expect(remote_mirror).to receive(:ensure_remote!) @@ -26,13 +26,13 @@ describe Projects::UpdateRemoteMirrorService do it "fetches the remote repository" do expect(project.repository) .to receive(:fetch_remote) - .with(remote_mirror.remote_name, no_tags: true) + .with(remote_mirror.remote_name, no_tags: true, ssh_auth: remote_mirror) service.execute(remote_mirror) end it "returns success when updated succeeds" do - stub_fetch_remote(project, remote_name: remote_name) + stub_fetch_remote(project, remote_name: remote_name, ssh_auth: remote_mirror) result = service.execute(remote_mirror) @@ -41,7 +41,7 @@ describe Projects::UpdateRemoteMirrorService do context 'when syncing all branches' do it "push all the branches the first time" do - stub_fetch_remote(project, remote_name: remote_name) + stub_fetch_remote(project, remote_name: remote_name, ssh_auth: remote_mirror) expect(remote_mirror).to receive(:update_repository).with({}) @@ -51,7 +51,7 @@ describe Projects::UpdateRemoteMirrorService do context 'when only syncing protected branches' do it "sync updated protected branches" do - stub_fetch_remote(project, remote_name: remote_name) + stub_fetch_remote(project, remote_name: remote_name, ssh_auth: remote_mirror) protected_branch = create_protected_branch(project) remote_mirror.only_protected_branches = true @@ -69,10 +69,10 @@ describe Projects::UpdateRemoteMirrorService do end end - def stub_fetch_remote(project, remote_name:) + def stub_fetch_remote(project, remote_name:, ssh_auth:) allow(project.repository) .to receive(:fetch_remote) - .with(remote_name, no_tags: true) { fetch_remote(project.repository, remote_name) } + .with(remote_name, no_tags: true, ssh_auth: ssh_auth) { fetch_remote(project.repository, remote_name) } end def fetch_remote(repository, remote_name) diff --git a/spec/services/quick_actions/interpret_service_spec.rb b/spec/services/quick_actions/interpret_service_spec.rb index 5a7cafcb60f..938764f40b0 100644 --- a/spec/services/quick_actions/interpret_service_spec.rb +++ b/spec/services/quick_actions/interpret_service_spec.rb @@ -1222,6 +1222,37 @@ describe QuickActions::InterpretService do expect(commands).to be_empty expect(text).to eq("#{described_class::SHRUG}\n/close") end + + context '/create_merge_request command' do + let(:branch_name) { '1-feature' } + let(:content) { "/create_merge_request #{branch_name}" } + let(:issuable) { issue } + + context 'if issuable is not an Issue' do + let(:issuable) { merge_request } + + it_behaves_like 'empty command' + end + + context "when logged user cannot create_merge_requests in the project" do + let(:project) { create(:project, :archived) } + + it_behaves_like 'empty command' + end + + context 'when logged user cannot push code to the project' do + let(:project) { create(:project, :private) } + let(:service) { described_class.new(project, create(:user)) } + + it_behaves_like 'empty command' + end + + it 'populates create_merge_request with branch_name and issue iid' do + _, updates = service.execute(content, issuable) + + expect(updates).to eq(create_merge_request: { branch_name: branch_name, issue_iid: issuable.iid }) + end + end end describe '#explain' do @@ -1473,5 +1504,27 @@ describe QuickActions::InterpretService do end end end + + describe 'create a merge request' do + context 'with no branch name' do + let(:content) { '/create_merge_request' } + + it 'uses the default branch name' do + _, explanations = service.explain(content, issue) + + expect(explanations).to eq(['Creates a branch and a merge request to resolve this issue']) + end + end + + context 'with a branch name' do + let(:content) { '/create_merge_request foo' } + + it 'uses the given branch name' do + _, explanations = service.explain(content, issue) + + expect(explanations).to eq(["Creates branch 'foo' and a merge request to resolve this issue"]) + end + end + end end end diff --git a/spec/services/system_note_service_spec.rb b/spec/services/system_note_service_spec.rb index a18126ee339..0fbfcb34e50 100644 --- a/spec/services/system_note_service_spec.rb +++ b/spec/services/system_note_service_spec.rb @@ -432,6 +432,20 @@ describe SystemNoteService do end end + describe '.new_merge_request' do + subject { described_class.new_merge_request(noteable, project, author, merge_request) } + + let(:merge_request) { create(:merge_request, source_project: project, target_project: project) } + + it_behaves_like 'a system note' do + let(:action) { 'merge' } + end + + it 'sets the new merge request note text' do + expect(subject.note).to eq("created merge request #{merge_request.to_reference} to address this issue") + end + end + describe '.cross_reference' do subject { described_class.cross_reference(noteable, mentioner, author) } diff --git a/spec/support/helpers/devise_helpers.rb b/spec/support/helpers/devise_helpers.rb index 66874e10f38..d32bc2424c0 100644 --- a/spec/support/helpers/devise_helpers.rb +++ b/spec/support/helpers/devise_helpers.rb @@ -8,8 +8,15 @@ module DeviseHelpers end def env_from_context(context) + # When we modify env_config, that is on the global + # Rails.application, and we need to stub it and allow it to be + # modified in-place, without polluting later tests. if context.respond_to?(:env_config) - context.env_config + context.env_config.deep_dup.tap do |env| + allow(context).to receive(:env_config).and_return(env) + end + # When we modify env, then the context is a request, or something + # else that only lives for a single spec. elsif context.respond_to?(:env) context.env end diff --git a/spec/support/helpers/features/branches_helpers.rb b/spec/support/helpers/features/branches_helpers.rb index 3525d9a70a7..df88fd425c9 100644 --- a/spec/support/helpers/features/branches_helpers.rb +++ b/spec/support/helpers/features/branches_helpers.rb @@ -20,7 +20,7 @@ module Spec end def select_branch(branch_name) - find(".git-revision-dropdown-toggle").click + find(".js-branch-select").click page.within("#new-branch-form .dropdown-menu") do click_link(branch_name) diff --git a/spec/support/helpers/user_login_helper.rb b/spec/support/helpers/user_login_helper.rb new file mode 100644 index 00000000000..36c002f53af --- /dev/null +++ b/spec/support/helpers/user_login_helper.rb @@ -0,0 +1,26 @@ +# frozen_string_literal: true + +module UserLoginHelper + def ensure_tab_pane_correctness(visit_path = true) + if visit_path + visit new_user_session_path + end + + ensure_tab_pane_counts + ensure_one_active_tab + ensure_one_active_pane + end + + def ensure_tab_pane_counts + tabs_count = page.all('[role="tab"]').size + expect(page).to have_selector('[role="tabpanel"]', count: tabs_count) + end + + def ensure_one_active_tab + expect(page).to have_selector('ul.new-session-tabs > li > a.active', count: 1) + end + + def ensure_one_active_pane + expect(page).to have_selector('.tab-pane.active', count: 1) + end +end diff --git a/yarn.lock b/yarn.lock index b9d6daa21c3..62335ba5e59 100644 --- a/yarn.lock +++ b/yarn.lock @@ -616,10 +616,10 @@ lodash "^4.17.10" to-fast-properties "^2.0.0" -"@gitlab/eslint-config@^1.1.0": - version "1.1.0" - resolved "https://registry.yarnpkg.com/@gitlab/eslint-config/-/eslint-config-1.1.0.tgz#9757764b3a78b6bacfbcd9533331cb6345ffdd59" - integrity sha512-tTdHj8nmZbgl7ygzZYYgfETgvFX/+Z/xA5abqbmwcejpI4fmJUhQwERTHu7P+NwQ2ywzPCS6dO4LljlT/r1jBw== +"@gitlab/eslint-config@^1.2.0": + version "1.2.0" + resolved "https://registry.yarnpkg.com/@gitlab/eslint-config/-/eslint-config-1.2.0.tgz#115568a70edabbc024f1bc13ba1ba499a9ba05a9" + integrity sha512-TnZO5T7JjLQjw30aIGtKIsAX4pRnSbqOir3Ji5zPwtCVWY53DnG6Lcesgy7WYdsnnkt3oQPXFTOZlkymUs2PsA== dependencies: babel-eslint "^10.0.1" eslint-config-airbnb-base "^13.1.0" @@ -629,10 +629,10 @@ eslint-plugin-promise "^4.0.1" eslint-plugin-vue "^5.0.0-beta.3" -"@gitlab/svgs@^1.35.0": - version "1.35.0" - resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.35.0.tgz#01b6a0948bb3897fbbac9f50ce23c559c514ea0e" - integrity sha512-XKrTniSYKG5U8+8ZqDJqoW8ORahuPBfHrfsC1dHBPvo1xA/QGJxlpUdeqSFw2O19h481ut4yW1dF+OFpIa/mrw== +"@gitlab/svgs@^1.38.0": + version "1.38.0" + resolved "https://registry.yarnpkg.com/@gitlab/svgs/-/svgs-1.38.0.tgz#e2f6e73379d60c7c63af4df8242a94c4671a1dfe" + integrity sha512-Mzv6PxVbWEPvvMgXHaGxk8UE1Gard2gifca6loLgfLH7BtjXfESiZyJdQkkTSeBYp5MoqQa88Kw+vJYobwjsSw== "@gitlab/ui@^1.11.0": version "1.11.0" @@ -6415,10 +6415,10 @@ prettier@1.13.7: resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.13.7.tgz#850f3b8af784a49a6ea2d2eaa7ed1428a34b7281" integrity sha512-KIU72UmYPGk4MujZGYMFwinB7lOf2LsDNGSOC8ufevsrPLISrZbNJlWstRi3m0AMuszbH+EFSQ/r6w56RSPK6w== -prettier@1.14.3: - version "1.14.3" - resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.14.3.tgz#90238dd4c0684b7edce5f83b0fb7328e48bd0895" - integrity sha512-qZDVnCrnpsRJJq5nSsiHCE3BYMED2OtsI+cmzIzF1QIfqm5ALf8tEJcO27zV1gKNKRPdhjO0dNWnrzssDQ1tFg== +prettier@1.15.2: + version "1.15.2" + resolved "https://registry.yarnpkg.com/prettier/-/prettier-1.15.2.tgz#d31abe22afa4351efa14c7f8b94b58bb7452205e" + integrity sha512-YgPLFFA0CdKL4Eg2IHtUSjzj/BWgszDHiNQAe0VAIBse34148whfdzLagRL+QiKS+YfK5ftB6X4v/MBw8yCoug== prismjs@^1.6.0: version "1.6.0" |