<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/services/merge_requests, branch ci-https</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Add a /wip slash command</title>
<updated>2016-10-03T07:36:21+00:00</updated>
<author>
<name>Thomas Balthazar</name>
<email>thomas@balthazar.info</email>
</author>
<published>2016-09-08T09:18:41+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ddbe676dc318b87c3d656a08bbf5d75485ad544b'/>
<id>ddbe676dc318b87c3d656a08bbf5d75485ad544b</id>
<content type='text'>
It toggles the 'WIP' prefix in the MR title.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It toggles the 'WIP' prefix in the MR title.
</pre>
</div>
</content>
</entry>
<entry>
<title>Close todos when accepting a MR via the API.</title>
<updated>2016-09-29T18:51:12+00:00</updated>
<author>
<name>Tony Gambone</name>
<email>tonygambone@gmail.com</email>
</author>
<published>2016-09-22T21:30:37+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=6d49fcf439c88492ff599432818d1c302e509997'/>
<id>6d49fcf439c88492ff599432818d1c302e509997</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Add a spec for merge request metric caching while refreshing a merge request from a forked project.</title>
<updated>2016-09-20T20:45:02+00:00</updated>
<author>
<name>Timothy Andrew</name>
<email>mail@timothyandrew.net</email>
</author>
<published>2016-09-20T20:45:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=a57c77f6c2aa79b23f9aa59e6552ffeb514607de'/>
<id>a57c77f6c2aa79b23f9aa59e6552ffeb514607de</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Use the `IssuableBaseService` lifecycle hooks to cache `MergeRequestsClosingIssues`</title>
<updated>2016-09-20T19:52:20+00:00</updated>
<author>
<name>Timothy Andrew</name>
<email>mail@timothyandrew.net</email>
</author>
<published>2016-09-20T19:52:20+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=68e1b5bbc076398b2886fe1fe2cc440a52d7cab1'/>
<id>68e1b5bbc076398b2886fe1fe2cc440a52d7cab1</id>
<content type='text'>
- Instead of overriding `create` and `update` in `MergeRequests::BaseService`
- Get all merge request service specs passing
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Instead of overriding `create` and `update` in `MergeRequests::BaseService`
- Get all merge request service specs passing
</pre>
</div>
</content>
</entry>
<entry>
<title>Improve performance of the cycle analytics page.</title>
<updated>2016-09-15T09:23:02+00:00</updated>
<author>
<name>Timothy Andrew</name>
<email>mail@timothyandrew.net</email>
</author>
<published>2016-09-15T08:59:36+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ba25e2f1ac61b47940f939a2d9f1d0ad417e1de2'/>
<id>ba25e2f1ac61b47940f939a2d9f1d0ad417e1de2</id>
<content type='text'>
1. These changes bring down page load time for 100 issues from more than
   a minute to about 1.5 seconds.

2. This entire commit is composed of these types of performance
   enhancements:

     - Cache relevant data in `IssueMetrics` wherever possible.
     - Cache relevant data in `MergeRequestMetrics` wherever possible.
     - Preload metrics

3. Given these improvements, we now only need to make 4 SQL calls:

    - Load all issues
    - Load all merge requests
    - Load all metrics for the issues
    - Load all metrics for the merge requests

4. A list of all the data points that are now being pre-calculated:

    a. The first time an issue is mentioned in a commit

      - In `GitPushService`, find all issues mentioned by the given commit
        using `ReferenceExtractor`. Set the `first_mentioned_in_commit_at`
        flag for each of them.

      - There seems to be a (pre-existing) bug here - files (and
        therefore commits) created using the Web CI don't have
        cross-references created, and issues are not closed even when
        the commit title is "Fixes #xx".

    b. The first time a merge request is deployed to production

      When a `Deployment` is created, find all merge requests that
      were merged in before the deployment, and set the
      `first_deployed_to_production_at` flag for each of them.

    c. The start / end time for a merge request pipeline

      Hook into the `Pipeline` state machine. When the `status` moves to
      `running`, find the merge requests whose tip commit matches the
      pipeline, and record the `latest_build_started_at` time for each
      of them. When the `status` moves to `success`, record the
      `latest_build_finished_at` time.

    d. The merge requests that close an issue

      - This was a big cause of the performance problems we were having
        with Cycle Analytics. We need to use `ReferenceExtractor` to make
        this calculation, which is slow when we have to run it on a large
        number of merge requests.

      - When a merge request is created, updated, or refreshed, find the
        issues it closes, and create an instance of
        `MergeRequestsClosingIssues`, which acts as a join model between
        merge requests and issues.

      - If a `MergeRequestsClosingIssues` instance links a merge request
        and an issue, that issue closes that merge request.

5. The `Queries` module was changed into a class, so we can cache the
   results of `issues` and `merge_requests_closing_issues` across
   various cycle analytics stages.

6. The code added in this commit is untested. Tests will be added in the
   next commit.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. These changes bring down page load time for 100 issues from more than
   a minute to about 1.5 seconds.

2. This entire commit is composed of these types of performance
   enhancements:

     - Cache relevant data in `IssueMetrics` wherever possible.
     - Cache relevant data in `MergeRequestMetrics` wherever possible.
     - Preload metrics

3. Given these improvements, we now only need to make 4 SQL calls:

    - Load all issues
    - Load all merge requests
    - Load all metrics for the issues
    - Load all metrics for the merge requests

4. A list of all the data points that are now being pre-calculated:

    a. The first time an issue is mentioned in a commit

      - In `GitPushService`, find all issues mentioned by the given commit
        using `ReferenceExtractor`. Set the `first_mentioned_in_commit_at`
        flag for each of them.

      - There seems to be a (pre-existing) bug here - files (and
        therefore commits) created using the Web CI don't have
        cross-references created, and issues are not closed even when
        the commit title is "Fixes #xx".

    b. The first time a merge request is deployed to production

      When a `Deployment` is created, find all merge requests that
      were merged in before the deployment, and set the
      `first_deployed_to_production_at` flag for each of them.

    c. The start / end time for a merge request pipeline

      Hook into the `Pipeline` state machine. When the `status` moves to
      `running`, find the merge requests whose tip commit matches the
      pipeline, and record the `latest_build_started_at` time for each
      of them. When the `status` moves to `success`, record the
      `latest_build_finished_at` time.

    d. The merge requests that close an issue

      - This was a big cause of the performance problems we were having
        with Cycle Analytics. We need to use `ReferenceExtractor` to make
        this calculation, which is slow when we have to run it on a large
        number of merge requests.

      - When a merge request is created, updated, or refreshed, find the
        issues it closes, and create an instance of
        `MergeRequestsClosingIssues`, which acts as a join model between
        merge requests and issues.

      - If a `MergeRequestsClosingIssues` instance links a merge request
        and an issue, that issue closes that merge request.

5. The `Queries` module was changed into a class, so we can cache the
   results of `issues` and `merge_requests_closing_issues` across
   various cycle analytics stages.

6. The code added in this commit is untested. Tests will be added in the
   next commit.
</pre>
</div>
</content>
</entry>
<entry>
<title>Prepend blank line to close message on merge request</title>
<updated>2016-09-01T19:06:45+00:00</updated>
<author>
<name>Luke Howell</name>
<email>luke.howell@gmail.com</email>
</author>
<published>2016-09-01T14:52:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=0ee5efbd20bf99385183618dc0bcf74deaa20075'/>
<id>0ee5efbd20bf99385183618dc0bcf74deaa20075</id>
<content type='text'>
- Added an extra new line to the prepend of the Close message

Fixes #21710
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Added an extra new line to the prepend of the Close message

Fixes #21710
</pre>
</div>
</content>
</entry>
<entry>
<title>Project tools visibility level</title>
<updated>2016-09-01T14:47:59+00:00</updated>
<author>
<name>Felipe Artur</name>
<email>felipefac@gmail.com</email>
</author>
<published>2016-08-01T22:31:21+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=892dea67717c0efbd6a28f7639f34535ec0a8747'/>
<id>892dea67717c0efbd6a28f7639f34535ec0a8747</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch '19315-can-edit-merge-request-with-deleted-fork' into 'master'</title>
<updated>2016-08-30T17:43:15+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2016-08-30T17:43:15+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=4bbe5ce622eafc886c3c6732bb5e7b39d1d7a351'/>
<id>4bbe5ce622eafc886c3c6732bb5e7b39d1d7a351</id>
<content type='text'>

User can edit closed MR with deleted fork

## What does this MR do?
User can edit closed MR with deleted fork (can't change "Target branch"). When fork is deleted "Reopen" button is hidden.

## What are the relevant issue numbers?
Closes #19315 

## Screenshots (if relevant)
* hidden Reopen button and information about deleted fork
![Zrzut_ekranu_2016-08-12_o_13.19.24](/uploads/d288c5625e788382e31b2979acb601df/Zrzut_ekranu_2016-08-12_o_13.19.24.png)

* editable fields for closed MR without fork
![Zrzut_ekranu_2016-08-05_o_12.24.38](/uploads/1549e54d4bc2a9939ef296ce66139706/Zrzut_ekranu_2016-08-05_o_12.24.38.png)


## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

cc @ubudzisz @yorickpeterse @grzesiek @tmaczukin

See merge request !5496</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

User can edit closed MR with deleted fork

## What does this MR do?
User can edit closed MR with deleted fork (can't change "Target branch"). When fork is deleted "Reopen" button is hidden.

## What are the relevant issue numbers?
Closes #19315 

## Screenshots (if relevant)
* hidden Reopen button and information about deleted fork
![Zrzut_ekranu_2016-08-12_o_13.19.24](/uploads/d288c5625e788382e31b2979acb601df/Zrzut_ekranu_2016-08-12_o_13.19.24.png)

* editable fields for closed MR without fork
![Zrzut_ekranu_2016-08-05_o_12.24.38](/uploads/1549e54d4bc2a9939ef296ce66139706/Zrzut_ekranu_2016-08-05_o_12.24.38.png)


## Does this MR meet the acceptance criteria?

- [x] [CHANGELOG](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CHANGELOG) entry added
- Tests
  - [x] Added for this feature/bug
  - [x] All builds are passing
- [x] Branch has no merge conflicts with `master` (if you do - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

cc @ubudzisz @yorickpeterse @grzesiek @tmaczukin

See merge request !5496</pre>
</div>
</content>
</entry>
<entry>
<title>Use Repository#fetch_ref</title>
<updated>2016-08-30T15:23:45+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@gitlab.com</email>
</author>
<published>2016-08-30T15:23:45+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=59dd9e576bd62f9311316ca31ecaba8ddde50b00'/>
<id>59dd9e576bd62f9311316ca31ecaba8ddde50b00</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>User can edit closed MR with deleted fork</title>
<updated>2016-08-30T11:05:40+00:00</updated>
<author>
<name>Katarzyna Kobierska</name>
<email>kkobierska@gmail.com</email>
</author>
<published>2016-07-26T11:57:43+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=c9c2503c5186a38302ed606f793b52ffa394f52c'/>
<id>c9c2503c5186a38302ed606f793b52ffa394f52c</id>
<content type='text'>
Add test for closed MR without fork

Add view test visibility of Reopen and Close buttons

Fix controller tests and validation method

Fix missing space

Remove unused variables from test

closed_without_fork? method refactoring

Add information about missing fork

When closed MR without fork can't edit target branch

Tests for closed MR edit view

Fix indentation and rebase, refactoring
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Add test for closed MR without fork

Add view test visibility of Reopen and Close buttons

Fix controller tests and validation method

Fix missing space

Remove unused variables from test

closed_without_fork? method refactoring

Add information about missing fork

When closed MR without fork can't edit target branch

Tests for closed MR edit view

Fix indentation and rebase, refactoring
</pre>
</div>
</content>
</entry>
</feed>
