By using a JOIN we can remove the need for using 2 separate queries to
find a project by its namespace. Combined with an index (only needed for
PostgreSQL) this reduces the query time from ~245 ms (~520 ms for the
first call) down to roughly 10 ms (~15 ms for the first call).
Change "+" icon under "Files" section to have three options:
* Create file
* Upload file
* New directory
Upload file is no longer accessible from the "Create file" page.
Users can now select a target branch in upload file as well.
Closes#2799: Fixes a bug where file modes were overwritten after a commit
Closes https://github.com/gitlabhq/gitlabhq/issues/8253: Existing files
can no longer be overwritten in the "Create file" section.
Closes#2557
This changes the query to use a COUNT nested in an INNER JOIN, instead
of a COUNT plus a GROUP BY. There are two reasons for this:
1. Using a COUNT in an INNER JOIN can be quite a bit faster.
2. The use of a GROUP BY means that method calls such as "any?"
(and everything else that calls "count") operate on a Hash that
counts the amount of notes on a per project basis, instead of just
counting the total amount of projects.
The query has been moved into Project.trending as its logic is simple
enough. As a result of this testing the TrendingProjectsFinder class
simply involves testing if the right methods are called, removing the
need for setting up database records.
Ensure GitLab CI project exists when CI service is activated manually
When I check activeated checkbox in project services for GitLab CI it
cause half-working state when gitlab_ci_project is missing. This patch
fixes it until we have proper behaviour implemented later
This fix also bring us to the point when fork of project is a bit broken and have unnecessary code so I made cleanup.
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
cc @ayufan
See merge request !1491
When I check activeated checkbox in project services for GitLab CI it
cause half-working state when gitlab_ci_project is missing. This patch
fixes it until we have proper behaviour implemented later
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
- It delegates name, path, gitlab_url, ssh_url_to_repo
- Remove ability to set this parameters using CI API
This fixes GitLab project rename, namespace change, repository rename, etc.
This simplifies the "Report button" to not use open a dropdown and
adds a tooltip on this button.
This also removes an extra spec and adds missing specs.