Commit Graph

291 Commits

Author SHA1 Message Date
GitLab Bot 70cfa5e3e7 Add latest changes from gitlab-org/gitlab@master 2021-04-26 21:10:25 +00:00
GitLab Bot c9bef85d79 Add latest changes from gitlab-org/gitlab@master 2021-04-19 21:09:27 +00:00
GitLab Bot c46b011d3f Add latest changes from gitlab-org/gitlab@master 2021-03-23 15:09:28 +00:00
GitLab Bot b38fc20ae0 Add latest changes from gitlab-org/gitlab@master 2021-03-23 12:09:33 +00:00
GitLab Bot 6e495b4e91 Add latest changes from gitlab-org/gitlab@master 2021-02-01 09:09:28 +00:00
GitLab Bot fcef382cb9 Add latest changes from gitlab-org/gitlab@master 2021-01-19 09:10:32 +00:00
GitLab Bot 39c1496527 Add latest changes from gitlab-org/gitlab@master 2021-01-13 12:10:27 +00:00
GitLab Bot dcacb5daf7 Add latest changes from gitlab-org/gitlab@master 2021-01-11 18:10:43 +00:00
GitLab Bot 89d84b76a9 Add latest changes from gitlab-org/gitlab@master 2020-12-29 18:10:10 +00:00
GitLab Bot eb8836dea4 Add latest changes from gitlab-org/gitlab@master 2020-12-21 12:10:22 +00:00
GitLab Bot 5d066c532d Add latest changes from gitlab-org/gitlab@master 2020-11-09 03:09:03 +00:00
GitLab Bot 6e91fbf774 Add latest changes from gitlab-org/gitlab@master 2020-10-13 12:08:41 +00:00
GitLab Bot b85aae44f9 Add latest changes from gitlab-org/gitlab@master 2020-09-21 15:09:44 +00:00
GitLab Bot 304e230182 Add latest changes from gitlab-org/gitlab@master 2020-09-01 18:10:48 +00:00
GitLab Bot 3ce55b46df Add latest changes from gitlab-org/gitlab@master 2020-07-22 18:09:27 +00:00
GitLab Bot 83fc2f3dc8 Add latest changes from gitlab-org/gitlab@master 2020-07-08 21:09:09 +00:00
GitLab Bot 5781a49660 Add latest changes from gitlab-org/gitlab@master 2020-03-12 00:09:34 +00:00
GitLab Bot 47ebeef912 Add latest changes from gitlab-org/gitlab@master 2020-03-11 00:09:09 +00:00
GitLab Bot cf6a3e7ed4 Add latest changes from gitlab-org/gitlab@master 2020-02-21 15:09:05 +00:00
GitLab Bot 0ab47b994c Add latest changes from gitlab-org/gitlab@master 2020-02-13 15:08:52 +00:00
GitLab Bot 6168721025 Add latest changes from gitlab-org/gitlab@master 2020-02-07 00:09:12 +00:00
GitLab Bot 6b833f1e03 Add latest changes from gitlab-org/gitlab@master 2020-02-04 15:08:40 +00:00
GitLab Bot 7cc6872401 Add latest changes from gitlab-org/gitlab@master 2020-01-29 12:09:08 +00:00
GitLab Bot 4eea104c69 Add latest changes from gitlab-org/gitlab@master 2019-12-11 15:07:38 +00:00
GitLab Bot 27d91a6299 Add latest changes from gitlab-org/gitlab@master 2019-12-10 15:07:52 +00:00
GitLab Bot 4e375367b7 Add latest changes from gitlab-org/gitlab@master 2019-12-07 00:07:51 +00:00
GitLab Bot 7cdd70dcec Add latest changes from gitlab-org/gitlab@master 2019-11-28 15:06:57 +00:00
GitLab Bot 8c30d396c5 Add latest changes from gitlab-org/gitlab@master 2019-10-14 18:06:24 +00:00
GitLab Bot 0a850868df Add latest changes from gitlab-org/gitlab@master 2019-10-09 12:06:13 +00:00
GitLab Bot 538fff823d Add latest changes from gitlab-org/gitlab@master 2019-09-30 15:08:09 +00:00
GitLab Bot bd860c22f6 Add latest changes from gitlab-org/gitlab@master 2019-09-17 12:06:48 +00:00
Stan Hu 29ce13e999 Fix moving issues API failing when text includes commit URLs
When a issue is moved from one project to another, all associated
Markdown text is rewritten in the context of the new project. If the
note contained a link to a commit URL, `CommitRewriter#rewrite` would
fail because `Commit#link_reference_pattern` would match `nil` `commit`
values in the HTML generated from the Markdown. These `nil` values were
passed along to `Project#commits_by` because `Commit#reference_valid?`
was always returning `true`.

To prevent this issue from happening, we tighten up the check for
`Commit#reference_valid?` to look for valid SHA values.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/66666
2019-08-28 00:18:33 -07:00
Stan Hu 07a308ad1b Enable Rubocop Performance/ReverseEach
`Array.reverse_each` is faster than `Array.reverse.each` because:

* reverse.each creates a new array then loops each element
* reverse_each loops in reverse order (no intermediate array created)
2019-07-24 14:08:25 -07:00
Stan Hu 89fa253864 Speed up merge request loads by disabling BatchLoader replace_methods
In production, we've seen the rendering times of the merge request
widget increase as a result of loading commit data. BatchLoader attempts
to call replace_methods on the lazy object, but this has a significant
performance penalty for modules that have many methods. Disabling this
mode (https://github.com/exAspArk/batch-loader/pull/45) appears to cut
load times by about 50% for MergeRequestsController#show.

Relates to https://gitlab.com/gitlab-com/gl-infra/infrastructure/issues/6941
2019-06-13 13:56:54 -07:00
Patrick Bajao 2eecfd8f9d Use Redis for CacheMarkDownField on non AR models
This allows using `CacheMarkdownField` for models that are not backed
by ActiveRecord.

When the including class inherits `ActiveRecord::Base` we include
`Gitlab::MarkdownCache::ActiveRecord::Extension`. This will cause the
markdown fields to be rendered and the generated HTML stored in a
`<field>_html` attribute on the record. We also store the version
used for generating the markdown.

All other classes that include this model will include the
`Gitlab::MarkdownCache::Redis::Extension`. This add the `<field>_html`
attributes to that model and will generate the html in them. The
generated HTML will be cached in redis under the key
`markdown_cache:<class>:<id>`. The class this included in must
therefore respond to `id`.
2019-06-05 13:19:59 +08:00
Luke Duncalfe 2b7dd017af Allow custom squash commit messages 2019-02-06 12:33:11 +00:00
Kamil Trzciński d4c7214799
[master] Pipelines section is available to unauthorized users 2019-01-31 16:52:50 +01:00
Francisco Javier López e9b5b10a45 Skip per-commit validations which have already passed on another change/branch 2018-12-28 10:44:25 +00:00
Stan Hu 7d18c4d236 Truncate merge request titles with periods instead of ellipsis
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/54862
2018-12-06 21:51:51 -08:00
Francisco Javier López a6778fc647 Rename project's pipelines relation 2018-12-05 14:39:15 +00:00
Nick Thomas 59c4fb4ecb
Match users better by their private commit email
Private commit emails were introduced in !22560, but some parts of
GitLab were not updated to take account of them. This commit adds
support in places that were missed.
2018-11-19 12:45:07 +00:00
Tiago Botelho c239452b47
User can keep their commit email private
The private commit email is automatically generated in the format:
id-username@noreply.HOSTNAME

GitLab instance admins are able to change the HOSTNAME portion,
that defaults to Gitlab's hostname, to whatever they prefer.
2018-11-07 12:24:14 +00:00
Paul Slaughter becb86ea4e Add pipeline status to diffs/commit_item
**Notes:**
- Also exposes commit.pipeline_status_path in diffs.json
2018-10-03 13:18:21 -05:00
Nick Thomas eea1b88547
Properly fix an introduced N+1 SQL issue loading commit authors 2018-09-06 16:04:21 +01:00
Nick Thomas d9833890cc
Bulk-render commit titles in the tree view to improve performance 2018-09-06 12:28:56 +01:00
Sean McGivern 5759bfe029 Make it clearer when Commit#description returns no_commit_message 2018-08-21 11:41:25 +01:00
yisiliang f5e6c44741 use #blank? instead #nil? 2018-08-21 10:41:47 +01:00
yisiliang b84fed0f9e to avoid “NoMethodError (undefined method `split' for nil:NilClass)” while safe_message is nil. 2018-08-21 10:41:47 +01:00
Peter Leitzen 2022243a22 Create empty Commits::UpdateService and wire it up 2018-08-10 16:45:11 +02:00
gfyoung 50abbd3e53 Enable frozen string in app/models/*.rb
Partially addresses #47424.
2018-07-26 16:55:41 -07:00