Commit Graph

16 Commits

Author SHA1 Message Date
GitLab Bot 6de7d2c195 Add latest changes from gitlab-org/gitlab@master 2020-09-16 15:09:32 +00:00
Andrew Newdigate 3288e1a874 Adds the Rubocop ReturnNil cop
This style change enforces `return if ...` instead of
`return nil if ...` to save maintainers a few minor review points
2019-03-06 17:51:56 +02:00
gfyoung 73322a0e55 Enable frozen string in app/controllers/**/*.rb
Enables frozen string for the following:

* app/controllers/*.rb
* app/controllers/admin/**/*.rb
* app/controllers/boards/**/*.rb
* app/controllers/ci/**/*.rb
* app/controllers/concerns/**/*.rb

Partially addresses #47424.
2018-09-18 21:22:45 -07:00
Yorick Peterse 2039c8280d
Disable existing offenses for the CodeReuse cops
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
2018-09-11 17:32:00 +02:00
Bob Van Landuyt f1d3ea63cf Show the status of a user in interactions
The status is shown for
- The author of a commit when viewing a commit
- Notes on a commit (regular/diff)
- The user that triggered a pipeline when viewing a pipeline
- The author of a merge request when viewing a merge request
- The author of notes on a merge request (regular/diff)
- The author of an issue when viewing an issue
- The author of notes on an issue
- The author of a snippet when viewing a snippet
- The author of notes on a snippet
- A user's profile page
- The list of members of a group/user
2018-07-30 15:01:26 +02:00
Yorick Peterse daad7144ec
Support Markdown rendering using multiple projects
This refactors the Markdown pipeline so it supports the rendering of
multiple documents that may belong to different projects. An example of
where this happens is when displaying the event feed of a group. In this
case we retrieve events for all projects in the group. Previously we
would group events per project and render these chunks separately, but
this would result in many SQL queries being executed. By extending the
Markdown pipeline to support this out of the box we can drastically
reduce the number of SQL queries.

To achieve this we introduce a new object to the pipeline:
Banzai::RenderContext. This object simply wraps two other objects: an
optional Project instance, and an optional User instance. On its own
this wouldn't be very helpful, but a RenderContext can also be used to
associate HTML documents with specific Project instances. This work is
done in Banzai::ObjectRenderer and allows us to reuse as many queries
(and results) as possible.
2018-04-11 14:10:19 +02:00
Lin Jen-Shin 07d3d44775 Move ModuleWithInstanceVariables to Gitlab namespace
And use .rubocop.yml to exclude paths we don't care,
rather than using the cop itself to exclude.
2017-11-22 17:06:57 +08:00
Lin Jen-Shin 9ac0c76b78 Use StrongMemoize and enable/disable cops properly 2017-11-18 01:01:53 +08:00
Lin Jen-Shin 0af35d7e30 Merge remote-tracking branch 'upstream/master' into no-ivar-in-modules
* upstream/master: (507 commits)
  Add dropdowns documentation
  Convert migration to populate latest merge request ID into a background migration
  Set 0.69.0 instead of latest for codeclimate image
  De-duplicate background migration matchers defined in spec/support/migrations_helpers.rb
  Update database_debugging.md
  Update database_debugging.md
  Move installation of apps higher
  Change to Google Kubernetes Cluster and add internal links
  Add Ingress description from official docs
  Add info on creating your own k8s cluster from the cluster page
  Add info about the installed apps in the Cluster docs
  Resolve "lock/confidential issuable sidebar custom svg icons iteration"
  Update HA README.md to clarify GitLab support does not troubleshoot DRBD.
  Update license_finder to 3.1.1
  Make sure NotesActions#noteable returns a Noteable in the update action
  Cache the number of user SSH keys
  Adjust openid_connect_spec to use `raise_error`
  Resolve "Clicking on GPG verification badge jumps to top of the page"
  Add changelog for container repository path update
  Update container repository path reference
  ...
2017-11-17 19:19:06 +08:00
Francisco Javier López bf0331dc72 Resolve "DashboardController#activity.json is slow due to SQL" 2017-11-06 16:52:56 +00:00
Lin Jen-Shin 9ae92b8caa Add cop to make sure we don't use ivar in a module 2017-09-18 21:23:45 +08:00
micael.bergeron b44a1bcd0b rework the contributor badge
- only show in merge-requests
 - show as a little glyph
2017-09-06 09:00:57 -04:00
micael.bergeron 45b83ed99a round of fixes after code review 2017-09-06 09:00:57 -04:00
micael.bergeron 966b1128d8 WIP: refactor the first-contributor to Issuable
this will remove the need make N queries (per-note) at the
cost of having to mark notes with an attribute

this opens up the possibility for other special roles for notes
2017-09-06 09:00:57 -04:00
Jarka Kadlecova 8c3a03c1b9 Display comments for personal snippets 2017-05-02 13:07:53 +02:00
Douwe Maan 21e10888c3
Address review comments 2017-04-05 17:44:14 +01:00