Age | Commit message (Collapse) | Author |
|
GitLab keeps a cache of the rendered HTML for a repository's README as
stored in the HEAD branch. However, it was not used in all
circumstances. In particular, the new blob viewer framework bypassed
this cache entirely.
This MR ensures a ::ReadmeBlob is returned instead of a ::Blob when
asking a repository for an individual blob, if the commit and path
match the readme for HEAD. This makes the cached HTML available to
consumers, including the blob viewer.
The ReadmeBlob is a simple delegator to the Blob, so should be
compatible in all cases. Adding the rendered_markdown method is the
only additional behaviour it contains.
|
|
|
|
This refactors the TodosFinder finder according to the new code reuse
rules, as enforced by the CodeReuse cops. I also changed some of the
methods to use regular if statements, instead of assignments and/or
early returns. This results in a more natural flow when reading the
code, and it makes it harder to accidentally return the wrong result.
|
|
|
|
|
|
Remove Gitlab::Git::Repository#rugged
See merge request gitlab-org/gitlab-ce!22039
|
|
Cleanup code, and refactor tests that still use Rugged. After this, there should
be no Rugged code that access the instance's repositories on non-test
environments. There is still some rugged code for other tasks like the
repository import task, but since it doesn't access any repository storage path
it can stay.
|
|
|
|
Doesn't synchronize default branch for push mirrors
Closes #51725
See merge request gitlab-org/gitlab-ce!21861
|
|
We should not synchronize the source repository with
the target root ref while updating a push mirror.
|
|
|
|
|
|
|
|
|
|
|
|
Updated docs, refactor import/export code
Fix AvatarUploader path issue
Fix project export upload webhook error
|
|
Filter web hooks by branch
See merge request gitlab-org/gitlab-ce!19513
|
|
|
|
|
|
Previous code would not work with `disabled?` because that method would
send two parameters (second always `nil`) which we are not mocking.
Instead of mock yet another state, I decide to fix it where it belongs.
|
|
|
|
This refactors the AutocompleteController according to the guidelines
and boundaries discussed in
https://gitlab.com/gitlab-org/gitlab-ce/issues/49653. Specifically,
ActiveRecord logic is moved to different finders, which are then used in
the controller. View logic in turn is moved to presenters, instead of
directly using ActiveRecord's "to_json" method.
The finder MoveToProjectFinder is also adjusted according to the
abstraction guidelines and boundaries, resulting in a much more simple
finder.
By using finders (and other abstractions) more actively, we can push a
lot of logic out of the controller. We also remove the need for various
"before_action" hooks, though this could be achieved without using
finders as well.
The various finders related to AutcompleteController have also been
moved into a namespace. This removes the need for calling everything
"AutocompleteSmurfFinder", instead you can use
"Autocomplete::SmurfFinder".
|
|
|
|
Allow specificying a branch filter for a project hook and only trigger
a project hook if either the branch filter is blank or the branch matches.
Only supported for push_events for now.
|
|
So that they test the negative case of hooks that don't have the
specified hook scope
|
|
Resolve "GFM : provide 'project' reference in comment"
Closes #28930
See merge request gitlab-org/gitlab-ce!20285
|
|
|
|
to "for all new and renamed projects""
|
|
Our friends at GitHub show the programming languages for a long time,
and inspired by that this commit means to create about the same
functionality.
Language detection is done through Linguist, as before, where the
difference is that we cache the result in the database. Also, Gitaly can
incrementaly scan a repository. This is done through a shell out, which
creates overhead of about 3s each run. For now this won't be improved.
Scans are triggered by pushed to the default branch, usually `master`.
However, one exception to this rule the charts page. If we're requesting
this expensive data anyway, we just cache it in the database.
Edge cases where there is no repository, or its empty are caught in the
Repository model. This makes use of Redis caching, which is probably
already loaded.
The added model is called RepositoryLanguage, which will make it harder
if/when GitLab supports multiple repositories per project. However, for
now I think this shouldn't be a concern. Also, Language could be
confused with the i18n languages and felt like the current name was
suiteable too.
Design of the Project#Show page is done with help from @dimitrieh. This
change is not visible to the end user unless detections are done.
|
|
|
|
Stop building Route rows on the fly
See merge request gitlab-org/gitlab-ce!20313
|
|
This adds a database migration that creates routes for any projects and
namespaces that don't already have one. We also remove the runtime code
for dynamically creating routes, as this is no longer necessary.
|
|
|
|
|
|
|
|
|
|
|
|
|
|
in the ProjectReferenceFilter#link_to_project function
|
|
Resolve "Add Metrics to Operations Tab"
Closes #45739
See merge request gitlab-org/gitlab-ce!20025
|
|
|
|
the project_reference_filter_spec
|
|
references to project profile.
|
|
|
|
This significantly improves performance when a user pushes many references.
project.path_locks.any? doesn't cache the output and runs `SELECT 1 AS one
FROM "path_locks" WHERE project_id = N` each time. When there are thousands
of refs being pushed, this can time out the unicorn worker.
CE port for https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/6159.
|
|
|
|
Fixes rejected pushes from maintainers
Closes #46337
See merge request gitlab-org/gitlab-ce!18968
|
|
Multiple Sidekiq workers can run in the spec, causing `Project.find`
to be run in different places. Instead of setting a fixed number of
calls, just use `allow`.
|
|
Expire Wiki content cache after importing a repository
Closes #47546
See merge request gitlab-org/gitlab-ce!19617
|
|
|