summaryrefslogtreecommitdiff
path: root/app/models/merge_request.rb
Commit message (Collapse)AuthorAgeFilesLines
* Don't try to mark broken MR as mergableNemanja Boric2016-02-111-1/+1
| | | | | | In case merge request is broken, we shouldn't check if the sha is mergable, as it will be null, and there's no point, as we know that it's not mergable.
* Replaces "Create merge request" link with one to the MR when one existsDouglas Barbosa Alexandre2016-02-101-0/+1
|
* Merge branch 'disable-remove-source-branch' into 'master' Douwe Maan2016-02-041-1/+2
|\ | | | | | | | | | | | | | | | | | | | | Hide remove source branch button when new commit is added to branch Fixes #3339 This MR hides the 'Remove source branch' button when a new commit is added to the source branch /cc @DouweM See merge request !2701
| * Hide remove source branch button when new commit is added to branchZeger-Jan van de Weg2016-02-041-1/+2
| | | | | | | | | | | | Fixes #3339 This MR hides the 'Remove source branch' button when a new commit is added to the source branch
* | Merge branch 'wipMergeSpacing' into 'master' Douwe Maan2016-02-041-1/+1
|\ \ | |/ |/| | | | | | | | | | | | | | | No space required after WIP identifier Fixes #2426 Currently, the WIP: (or any other variation) prefix of a merge request title must include a trailing space for it to be recognized as a work in progress and prevent merging. To resolve this, I added an or pattern to the regexp to look for any one of the three possible delimiters ':', ']', or ' '. This way the trailing space isn't required but it still won't mark any titles beginning with wip as work in progress (e.g. "Wipwap"). See merge request !1876
| * Merge branch 'master' of gitlab.com:gitlab-org/gitlab-ce into wipMergeSpacingTed Hogan2015-12-291-27/+58
| |\
| * | No space required after WIP identifierTed Hogan2015-11-231-1/+1
| | | | | | | | | | | | Modified changelog
* | | Merge branch 'merge-request-closes-issues-performance' into 'master'Robert Speicher2016-02-011-4/+4
|\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | Optimize fetching issues closed by a merge request Related issue: #12419 See merge request !2625
| * | | Optimize fetching issues closed by a merge requestmerge-request-closes-issues-performanceYorick Peterse2016-02-011-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Instead of running ClosingIssueExtractor for every commit in a merge request we can gather all the commit messages (and the merge request description), concatenate all this together and then run ClosingIssueExtractor only once. The result of this is that MergeRequest#closes_issues is now between 3.5x and 4x faster than the old setup. Using a merge request with 10 commits (each referencing a number of issues to close) this reduced the call duration from around 200 milliseconds to around 50 milliseconds. As a result of these changes the Jira related tests for MergeRequest#closes_issues have been removed. These tests stubbed Commit#closes_issues meaning that the only code that was really tested was the call to Array#uniq to filter out duplicate issues. As this code is no longer used (nor present) the corresponding tests were removed. Related: gitlab-org/gitlab-ce#12419
* | | | Fix specsDouwe Maan2016-01-281-2/+2
| | | |
* | | | Correctly determine MR diff base when MR has merge conflictsDouwe Maan2016-01-271-2/+2
|/ / /
* | | Save and use actual diff base commit for MR diff highlightingDouwe Maan2016-01-201-3/+12
| | |
* | | Fix MR diff_refsDouwe Maan2016-01-201-2/+2
| | |
* | | Check if MR is not broken.Rubén Dávila2016-01-191-1/+1
| | |
* | | Merge branch 'master' into issue_3945Rubén Dávila2016-01-141-28/+34
|\ \ \
| * \ \ Merge branch 'group-issues-sorting' into 'master' Dmitriy Zaporozhets2016-01-111-1/+1
| |\ \ \ | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Improve performance of getting issues on group level For testing I used the URL http://localhost:3000/groups/gitlab-org/issues?milestone_title=8.1. Prior to these changes said URL would take about 10-12 seconds to load. By applying these changes the loading time has been reduced to roughly 2-3 seconds. There's still some stuff going on in some views that I have to look at, resolving those changes might reduce the loading time a bit more. I also still have to check if I didn't break too many tests. Fixes: gitlab-org/gitlab-ce#3707 gitlab-org/gitlab-ce#4071 See merge request !2318
| | * | | Removed ORDER BY in "of_group" scopesgroup-issues-sortingYorick Peterse2016-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | These scopes don't care about the order. Removing the explicit "ORDER BY" can speed up the queries by a little bit.
| | * | | Don't pluck IDs when getting issues/MRs per groupYorick Peterse2016-01-071-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | This replaces plucking of IDs with a sub-query, saving the overhead of loading the data in Ruby and then mapping the rows to an Array of IDs. This also scales much better when dealing with a large amount of IDs that would be involved.
| * | | | Merge branch 'annotate-models-20160105' into 'master' Dmitriy Zaporozhets2016-01-071-22/+22
| |\ \ \ \ | | |/ / / | |/| | | | | | | | | | | | | | | | | | | | | | | | | | | | Annotate models Time to refresh the comments via `annotate`. See merge request !2311
| | * | | Annotate modelsStan Hu2016-01-061-22/+22
| | | |/ | | |/|
| * | | Get "Merge when build succeeds" to work when commits were pushed to MR ↵Douwe Maan2016-01-051-5/+11
| |/ / | | | | | | | | | target branch while builds were running
* | | More refactoring from last code review. #3945Rubén Dávila2016-01-141-0/+4
|/ / | | | | | | | | | | * Use commit objects instead of IDs when generating diffs * Use proper references when generating MR's source and target * Update broken specs
* | Backport JIRA serviceDrew Blessing2015-12-181-1/+1
| |
* | Fixed Rubocop offensesGabriel Mazetto2015-12-151-3/+1
| |
* | Merge remote-tracking branch 'origin/mr-broken'Dmitriy Zaporozhets2015-12-091-0/+4
|\ \ | | | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * | Add indication to merge request list item that MR cannot be merged automaticallyDouwe Maan2015-12-081-0/+4
| | |
* | | Merge branch 'master' into zj/gitlab-ce-merge-if-greenDouwe Maan2015-12-081-1/+1
|\ \ \ | |/ /
| * | Merge branch 'webhook_payload_with_changes' into 'master' Valery Sizov2015-12-071-1/+1
| |\ \ | | | | | | | | | | | | | | | | | | | | | | | | Add added, modified and removed properties to commit object in webhook https://gitlab.com/gitlab-org/gitlab-ee/issues/20 See merge request !1988
| | * | fox specsValery Sizov2015-12-071-1/+1
| | |/
* | | Merge branch 'master' into merge-if-greenZeger-Jan van de Weg2015-12-071-2/+9
|\ \ \ | |/ /
| * | Autolink first so we don't pick up numeric anchors as issue references.Douwe Maan2015-12-011-5/+2
| | |
| * | Recognize issue/MR/snippet/commit links as references.Douwe Maan2015-11-301-2/+9
| | |
| * | Show local issues and MRs in "This X closes... / closed by..." sentenceDouwe Maan2015-11-301-1/+1
| |/
| * Handle removed source projects in MR CI commitsfix-merge-requests-without-source-projectsYorick Peterse2015-11-201-1/+1
| | | | | | | | | | | | | | | | When calling MergeRequest#ci_commit the code would previously raise an error if the source project no longer existed (e.g. because the user removed their fork). See #3599 for more information.
| * Use a JOIN in IssuableFinder#by_projectYorick Peterse2015-11-191-0/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | When using IssuableFinder/IssuesFinder to find issues for multiple projects it's more efficient to use a JOIN + a "WHERE project_id IN" condition opposed to running a sub-query. This change means that when finding issues without labels we're now using the following SQL: SELECT issues.* FROM issues JOIN projects ON projects.id = issues.project_id LEFT JOIN label_links ON label_links.target_type = 'Issue' AND label_links.target_id = issues.id WHERE ( projects.id IN (...) OR projects.visibility_level IN (20, 10) ) AND issues.state IN ('opened','reopened') AND label_links.id IS NULL ORDER BY issues.id DESC; instead of: SELECT issues.* FROM issues LEFT JOIN label_links ON label_links.target_type = 'Issue' AND label_links.target_id = issues.id WHERE issues.project_id IN ( SELECT id FROM projects WHERE id IN (...) OR visibility_level IN (20,10) ) AND issues.state IN ('opened','reopened') AND label_links.id IS NULL ORDER BY issues.id DESC; The big benefit here is that in the last case PostgreSQL can't properly use all available indexes. In particular it ends up performing a sequence scan on the "label_links" table (processing around 290 000 rows). The new query is roughly 2x as fast as the old query.
* | Incorporate feedbackZeger-Jan van de Weg2015-12-051-22/+24
| |
* | Specs for 'Merge When Build Succeeds'Zeger-Jan van de Weg2015-12-021-7/+6
| |
* | Refactor MergeWhenBuildSucceedsService and incorporate feedbackZeger-Jan van de Weg2015-11-231-2/+9
| |
* | Merge branch 'master' into merge-if-greenZeger-Jan van de Weg2015-11-181-1/+2
|\ \ | |/
| * Annotate modelsDmitriy Zaporozhets2015-11-131-0/+1
| | | | | | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
| * Add ignore white space option in merge request diffMinsik Yoon2015-11-131-1/+1
| | | | | | | | | | | | fix this issue(https://gitlab.com/gitlab-org/gitlab-ce/issues/1393). Add ignore whitespace optoin to Commits Compare view
* | API support, incorporated feedbackZeger-Jan van de Weg2015-11-181-1/+5
| |
* | Merge when build succeedsZeger-Jan van de Weg2015-11-021-0/+13
|/
* Render CI status on merge requests index pageDmitriy Zaporozhets2015-10-231-2/+8
| | | | Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
* Fix: Inability to reply to code comments in the MR view, if the MR comes ↵comments_fixValery Sizov2015-10-221-1/+1
| | | | from a fork
* Correctly find last known blob for file deleted in MR.merge-request-deleted-fileDouwe Maan2015-10-201-1/+13
|
* Only accept open issues and merge requestsZeger-Jan van de Weg2015-10-161-4/+0
|
* Show merge requests which close current issueZeger-Jan van de Weg2015-10-161-0/+4
|
* merge_request: add work_in_progress to MR hooksBen Boeckel2015-10-081-1/+2
|
* merge_request: coerce work_in_progress? into a booleanBen Boeckel2015-10-081-1/+1
|