Commit graph

13 commits

Author SHA1 Message Date
Bob Van Landuyt
8ad9c4e873 Rename create_merge_request permissions
So we can distinguish between the permissions on the source and the
target project.

- `create_merge_request_from` indicates a user can create a merge
  request with the project as a source_project
- `create_merge_request_in` indicates a user can create a merge
  request with the project as a target_project
2018-04-11 10:51:15 +02:00
Bob Van Landuyt
148816cd67 Port read_cross_project ability from EE 2018-02-22 17:11:36 +01:00
Yorick Peterse
cca61980d5
Track and act upon the number of executed queries
This ensures that we have more visibility in the number of SQL queries
that are executed in web requests. The current threshold is hardcoded to
100 as we will rarely (maybe once or twice) change it.

In production and development we use Sentry if enabled, in the test
environment we raise an error. This feature is also only enabled in
production/staging when running on GitLab.com as it's not very useful to
other users.
2018-02-01 17:00:46 +01:00
Felipe Artur
ca4a59e3df Fix error on changes tab when merge request cannot be created 2018-01-15 11:53:40 -02:00
🙈 jacopo beschi 🙉
729f05f0e3 Adds Rubocop rule for line break around conditionals 2018-01-11 16:34:01 +00:00
Ahmad Sherif
835a5db376 Migrate Gitlab::Git::Repository#merge_base_commit to Gitaly
Closes gitaly#808
2017-12-13 17:40:19 +01:00
Sean McGivern
3c6a4d6363 Ensure MRs always use branch refs for comparison
If a merge request was created with a branch name that also matched a tag name,
we'd generate a comparison to or from the tag respectively, rather than the
branch. Merging would still use the branch, of course.

To avoid this, ensure that when we get the branch heads, we prepend the
reference prefix for branches, which will ensure that we generate the correct
comparison.
2017-11-28 17:01:38 +00:00
Douwe Maan
fec48c6e17 Use Commit#notes and Note.for_commit_id when possible to make sure we use all the indexes available to us 2017-11-08 12:22:11 +01:00
micael.bergeron
cd88fa8f80 removed the #ensure_ref_fetched from all controllers
also, I refactored the MergeRequest#fetch_ref method to express
the side-effect that this method has.

  MergeRequest#fetch_ref -> MergeRequest#fetch_ref!
  Repository#fetch_source_branch -> Repository#fetch_source_branch!
2017-11-03 08:13:11 -04:00
Bob Van Landuyt
7c00b53812 Find branches in all projects in the fork network 2017-10-07 11:46:23 +02:00
Tiago Botelho
6d8e102c74 Adds cacheless render to Banzai object render 2017-09-06 15:35:35 +01:00
Douwe Maan
87cb74a7bc Make sure MergeRequest commit methods work when either compare_commits or merge_request_diff is set 2017-07-13 18:53:11 -07:00
Douwe Maan
70b05a8377 Split up MergeRequestsController 2017-06-28 18:17:44 -05:00