| Commit message (Collapse) | Author | Age | Files | Lines |
| |\
| |
| |
| |
| |
| |
| | |
Fix extra merge request versions created from forked merge requests
Closes #53153
See merge request gitlab-org/gitlab-ce!22611
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
When a forked merge request was created with the same branch name as the
target name, MergeRequests::RefreshService would always create a new
diff even though nothing had changed. For example, on GitLab.com:
1. There were a number of merge requests in the gitlab-ce and www-gitlab-com
projects that had old merge requests from the community.
2. These merge requests originated from forked projects and used the
source branch master.
3. When someone pushed to master in the main repository, MergeRequests::RefreshService
would see that master matched the merge requests in question and generated a new
diff.
4. This led to an explosion of merge request diffs and slowed down the "Changes"
tab considerably.
This change alters MergeRequests::RefreshService so that it will only
refresh the diff if the merge request's source project and branch
match. Otherwise, the refresh will only happen if a pushed commit
contains a commit relevant to the existing merge request.
Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/53153
|
| |\ \
| |/
|/|
| |
| |
| |
| | |
Make new merge request URL more friendly when pushing code
Closes #53012
See merge request gitlab-org/gitlab-ce!22526
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | | |
Replace deprecated uniq on a Relation with distinct
See merge request gitlab-org/gitlab-ce!22625
|
| | | | |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
'master'
Extract ee specific lines for issues and mr controllers
See merge request gitlab-org/gitlab-ce!22569
|
| | | |/
| |/|
| | |
| | |
| | | |
Move access checks to their own method so they can be overridden, and
port an EE-only method to exist in CE too, with an EE-specific override.
|
| | |/
|/|
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Even though we currently only should have one group for a cluster, we
allow the flexibility to associate to other groups in the future.
This also matches the runner <=> groups association.
- Adds Cluster#first_group, aliased to Cluster#group. For the
conceivable future, a cluster will have at most one group.
- Prevent mixing of group and project clusters. If project type
clusters, it should only have projects assigned. Similarly with groups.
- Default cluster_type to :project_type. As it's very small table we can
set default and null: false in one release.
|
| | | |
|
| | |
| |
| |
| |
| | |
This makes sure the user_status for the user of a label event is
preloaded. Otherwise it would not be rendered in the fake system note.
|
| | |
| |
| |
| |
| |
| | |
This removes the ability to pass in a different version. We can instead
create a new entry in the SUPPORTED_API_GROUPS hash for a different
version if need be.
|
| |/
|
|
|
| |
Find and replace everywhere we pass in `api_groups` to KubeClient, as no
longer needed
|
| |\
| |
| |
| |
| | |
Move Project#rename_repo to a service class
See merge request gitlab-org/gitlab-ce!22419
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
This moves the logic of Project#rename_repo and all methods _only_ used
by this method into a new service class: Projects::AfterRenameService.
By moving this code into a separate service class we can more easily
refactor it, and we also get rid of some RuboCop "disable" statements
automatically.
During the refactoring of this code, I removed most of the explicit
logging using Gitlab::AppLogger. The data that was logged would not be
useful when debugging renaming issues, as it does not add any value on
top of data provided by users.
I also removed a variety of comments that either mentioned something the
code does in literal form, or contained various grammatical errors.
Instead we now resort to more clearly named methods, removing the need
for code comments.
This method was chosen based on analysis in
https://gitlab.com/gitlab-org/release/framework/issues/28. In this issue
we determined this method has seen a total of 293 lines being changed in
it. We also noticed that RuboCop determined the ABC size
(https://www.softwarerenovation.com/ABCMetric.pdf) was too great.
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Add preload for routes and namespaces for issues controller.
Closes #43034
See merge request gitlab-org/gitlab-ce!21651
|
| | | | |
|
| |\ \ \
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
Remove ForkedProjectLink model
Closes #38883
See merge request gitlab-org/gitlab-ce!22226
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This removes the `ForkedProjectLink` model that has been replaced by
the `ForkNetworkMember` and `ForkNetwork` combination. All existing
relations have been adjusted to use these new models.
The `forked_project_link` table has been dropped.
The "Forks" count on the admin dashboard has been updated to count all
`ForkNetworkMember` rows and deduct the number of `ForkNetwork`
rows. This is because now the "root-project" of a fork network also
has a `ForkNetworkMember` row. This count could become inaccurate when
the root of a fork network is deleted.
|
| | | | | |
|
| | | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | |
| | | | |
This will add audit_json.log that writes one line per audit event. For
example:
{
"severity":"INFO",
"time":"2018-10-17T17:38:22.523Z",
"author_id":3,
"entity_id":2,
"entity_type":"Project",
"change":"visibility",
"from":"Private",
"to":"Public",
"author_name":"John Doe4",
"target_id":2,
"target_type":"Project",
"target_details":"namespace2/project2"
}
|
| |\ \ \ \
| | | | |
| | | | |
| | | | |
| | | | |
| | | | |
| | | | | |
Use monotonic time in computing web hook execution time
Closes #52855
See merge request gitlab-org/gitlab-ce!22448
|
| | | |_|/
| |/| | |
|
| |/ / /
| | |
| | |
| | |
| | | |
This was causing problems in EE, where audit events were being
generated even if the project failed to save.
|
| |\ \ \
| |_|/
|/| |
| | |
| | | |
Make source param optional according to EE change
See merge request gitlab-org/gitlab-ce!22283
|
| | |/ |
|
| |\ \
| | |
| | |
| | |
| | | |
Refactor Cluster services to enable groups or projects
See merge request gitlab-org/gitlab-ce!22181
|
| | |/
| |
| |
| |
| |
| |
| |
| |
| | |
This enables us to have other options in the future such as passing in
`group:`.
Also, remove project arg from UpdateService, as un-used.
This will help group cluster controller to re-use this services.
|
| | |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| |
| | |
Remove the inheritance from ::BaseService which is causing us to inherit
the initializer that has project as the first arg, as we will not have
access to project with forthcoming group clusters.
Also call install service from create service - 1 less thing to re-use
Extract TestRequest code into a spec helper. Given that we need
different behaviour for Rails 5.0 (and again in Rails 5.1!), it's handy
to have that branching behaviour in one place
|
| |/
|
|
|
|
|
|
|
|
| |
This should help with code re-use when we create applications for group
level cluster next.
Change `find_or_initialize_by` to explicitly find or build the right
association based on the application name. The benefit here is that we
use the associations on @cluster rather than querying from the other
side of the association.
|
| |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
This refactors the TodoService class according to our code reuse
guidelines. The resulting code is a wee bit more verbose, but it allows
us to decouple the column names from the input, resulting in fewer
changes being necessary when we change the schema.
One particular noteworthy line in TodoService is the following:
todos_ids = todos.update_state(state)
Technically this is a violation of the guidelines, because
`update_state` is a class method, which services are not supposed to use
(safe for a few allowed ones). I decided to keep this, since there is no
alternative. `update_state` doesn't produce a relation so it doesn't
belong in a Finder, and we can't move it to another Service either. As
such I opted to just use the method directly.
Cases like this may happen more frequently, at which point we should
update our documentation with some sort of recommendation. For now, I
want to refrain from doing so until we have a few more examples.
|
| |\
| |
| |
| |
| | |
Backport of CE upstream - 2018-10-05 12:21 UTC
See merge request gitlab-org/gitlab-ce!22154
|
| | | |
|
| |\ \
| | |
| | |
| | |
| | |
| | |
| | | |
Move related branches to service
Closes #43097
See merge request gitlab-org/gitlab-ce!22094
|
| | | |
| | |
| | |
| | |
| | | |
Moves the related_branches method from Issue model
to RelatedBranchesService
|
| |\ \ \
| | |/
| |/| |
|
| | | | |
|
| | |\ \
| | | |
| | | |
| | | |
| | | | |
Pipeline only/except for modified paths
See merge request gitlab-org/gitlab-ce!21981
|
| | | |\ \
| | | | |
| | | | |
| | | | | |
# Conflicts:
# app/models/ci/pipeline.rb
|
| | | | | | |
|
| | | | | | |
|
| | | |/ /
| |/| | |
|
| |\ \ \ \
| |/ / / |
|
| | |\ \ \
| | | | |
| | | | |
| | | | |
| | | | | |
Port: Add checks to InterpretService conditions
See merge request gitlab-org/gitlab-ce!22047
|
| | | |/ / |
|
| | | |/
| |/| |
|
| | | | |
|
| | | | |
|
| | | | |
|