<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/spec/models, branch 25264-ref-commit</title>
<subtitle>gitlab.com: gitlab-org/gitlab-ce.git
</subtitle>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/gitlab/gitlab-ce.git/'/>
<entry>
<title>Merge branch 'process-commit-worker-improvements' into 'master'</title>
<updated>2016-12-02T04:32:23+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2016-12-02T04:32:23+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=ec4e7d9a9f7f3526a15905c3fb5d851e4c173349'/>
<id>ec4e7d9a9f7f3526a15905c3fb5d851e4c173349</id>
<content type='text'>

Pass commit data to ProcessCommitWorker

This changes `ProcessCommitWorker` so that it takes a Hash containing commit data instead of a commit SHA. This means the worker doesn't have to access Git just to process a commit message (and other data it may use). This in turn should solve the problem of ending up with 15 000-something jobs in the `process_commit` queue that take forever to process.

See merge request !7744</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Pass commit data to ProcessCommitWorker

This changes `ProcessCommitWorker` so that it takes a Hash containing commit data instead of a commit SHA. This means the worker doesn't have to access Git just to process a commit message (and other data it may use). This in turn should solve the problem of ending up with 15 000-something jobs in the `process_commit` queue that take forever to process.

See merge request !7744</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'use-st-commits-where-possible' into 'master'</title>
<updated>2016-12-01T15:23:30+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2016-12-01T15:23:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=fd2a429f35f521c7ab3b2b868d0e7ad55b6cbbba'/>
<id>fd2a429f35f521c7ab3b2b868d0e7ad55b6cbbba</id>
<content type='text'>

Replace references to MergeRequestDiff#commits with st_commits when we care only about the number of commits

See merge request !7668</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Replace references to MergeRequestDiff#commits with st_commits when we care only about the number of commits

See merge request !7668</pre>
</div>
</content>
</entry>
<entry>
<title>Pass commit data to ProcessCommitWorker</title>
<updated>2016-12-01T12:36:06+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2016-11-24T14:07:44+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=6b4d33566f5f434cc86381a4a1347e42bbe348ee'/>
<id>6b4d33566f5f434cc86381a4a1347e42bbe348ee</id>
<content type='text'>
By passing commit data to this worker we remove the need for querying
the Git repository for every job. This in turn reduces the time spent
processing each job.

The migration included migrates jobs from the old format to the new
format. For this to work properly it requires downtime as otherwise
workers may start producing errors until they're using a newer version
of the worker code.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
By passing commit data to this worker we remove the need for querying
the Git repository for every job. This in turn reduces the time spent
processing each job.

The migration included migrates jobs from the old format to the new
format. For this to work properly it requires downtime as otherwise
workers may start producing errors until they're using a newer version
of the worker code.
</pre>
</div>
</content>
</entry>
<entry>
<title>Replace references to MergeRequestDiff#commits with st_commits</title>
<updated>2016-12-01T11:17:30+00:00</updated>
<author>
<name>Adam Niedzielski</name>
<email>adamsunday@gmail.com</email>
</author>
<published>2016-12-01T11:17:30+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=cb6f8cdfc23a18daf33288c95ae8badec63f53ad'/>
<id>cb6f8cdfc23a18daf33288c95ae8badec63f53ad</id>
<content type='text'>
when we care only about the number of commits

We do not have to instantiate all objects in this case.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
when we care only about the number of commits

We do not have to instantiate all objects in this case.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'rs-include-emailhelpers' into 'master'</title>
<updated>2016-12-01T10:46:40+00:00</updated>
<author>
<name>Rémy Coutable</name>
<email>remy@rymai.me</email>
</author>
<published>2016-12-01T10:46:40+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=e91afc0dc071f2cb2dde54b12c04bb90d2c65f7b'/>
<id>e91afc0dc071f2cb2dde54b12c04bb90d2c65f7b</id>
<content type='text'>

Only include EmailHelpers in mailer specs and specs using them

See merge request !7836</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Only include EmailHelpers in mailer specs and specs using them

See merge request !7836</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor JiraService by moving code out of JiraService#execute method</title>
<updated>2016-12-01T08:45:06+00:00</updated>
<author>
<name>Adam Niedzielski</name>
<email>adamsunday@gmail.com</email>
</author>
<published>2016-12-01T08:45:06+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=1105597303496e60308f93441b591a6f7dfadc74'/>
<id>1105597303496e60308f93441b591a6f7dfadc74</id>
<content type='text'>
The implicit interface of project services states that the "execute"
method is meant to be called when project hooks are executed.
Currently JiraService does not support any project events even though
JiraService#supported_events says that "commit" and "merge_request"
are supported. They are only used to render correct options in
JIRA configuration screen, but they are not supported.
Because of that, this commit makes "execute" method a no-op.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
The implicit interface of project services states that the "execute"
method is meant to be called when project hooks are executed.
Currently JiraService does not support any project events even though
JiraService#supported_events says that "commit" and "merge_request"
are supported. They are only used to render correct options in
JIRA configuration screen, but they are not supported.
Because of that, this commit makes "execute" method a no-op.
</pre>
</div>
</content>
</entry>
<entry>
<title>Only include EmailHelpers in mailer specs and specs using them</title>
<updated>2016-12-01T04:17:33+00:00</updated>
<author>
<name>Robert Speicher</name>
<email>rspeicher@gmail.com</email>
</author>
<published>2016-11-30T08:29:27+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=819f459b69935f75cbe423884149564cf6cea001'/>
<id>819f459b69935f75cbe423884149564cf6cea001</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Rename `MergeRequest#pipeline` to `head_pipeline`</title>
<updated>2016-11-29T13:12:49+00:00</updated>
<author>
<name>Grzegorz Bizon</name>
<email>grzesiek.bizon@gmail.com</email>
</author>
<published>2016-11-28T10:13:32+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=a49e9949c6bc474c8bfd4016d9c6c3b59776772f'/>
<id>a49e9949c6bc474c8bfd4016d9c6c3b59776772f</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 'hoopes/gitlab-ce-21027-add-diff-hunks-to-notification-emails' into 'master'</title>
<updated>2016-11-29T04:11:15+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2016-11-29T04:11:15+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=b0bde100f2480d77a72bdbd777fb0ef2b8ff4024'/>
<id>b0bde100f2480d77a72bdbd777fb0ef2b8ff4024</id>
<content type='text'>

Add diff hunks to notification emails

Add diff hunks to notification emails. Continued from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5855 - thanks @hoopes!

This also fixes an issue where the + / - prefixes were missing from diffs in emails.

Screenshots (from my browser) of the HTML emails, along with text screenshots :stuck_out_tongue:

![image](/uploads/cb31400becf5149d40c8bb98a655aa93/image.png)

```
New comment for Merge Request !1 on app/views/admin/builds/index.html.haml:

http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/1#note_1023

&gt;          Finished

This is a comment at the top of a match section.
```

![image](/uploads/704dd3845797530697a27f5c1953c053/image.png)

```
New comment for Merge Request !1 on app/views/admin/builds/index.html.haml:

http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/1#note_1022

&gt;          Finished
&gt;          %span.badge.js-running-count= @all_builds.finished.count(:id)
&gt;  
&gt; -    %li{class: ('active' if @scope == 'all')}
&gt; -      = link_to admin_builds_path(scope: :all) do
&gt; -        All
&gt; -        %span.badge.js-totalbuilds-count= @all_builds.count(:id)
&gt; -
&gt;  .gray-content-block
&gt;    #{(@scope || 'running').capitalize} builds
&gt;  

This is a comment at the bottom of a match section.
```

![image](/uploads/4063f3d9738aea8ebf3c0e690d0eddee/image.png)

```
New comment for Merge Request !1 on app/views/admin/builds/index.html.haml:

http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/1#note_1024

&gt;          = link_to 'Cancel all', cancel_all_admin_builds_path, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
&gt;  
&gt;    %ul.center-top-menu
&gt; -    %li{class: ('active' if @scope.nil?)}
&gt; +    %li{class: ('active' if @scope == 'all')}
&gt;        = link_to admin_builds_path do
&gt; +        All

This is a comment with some deleted and added lines above it.
```

Closes #21027, closes #24340.

See merge request !7660</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Add diff hunks to notification emails

Add diff hunks to notification emails. Continued from https://gitlab.com/gitlab-org/gitlab-ce/merge_requests/5855 - thanks @hoopes!

This also fixes an issue where the + / - prefixes were missing from diffs in emails.

Screenshots (from my browser) of the HTML emails, along with text screenshots :stuck_out_tongue:

![image](/uploads/cb31400becf5149d40c8bb98a655aa93/image.png)

```
New comment for Merge Request !1 on app/views/admin/builds/index.html.haml:

http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/1#note_1023

&gt;          Finished

This is a comment at the top of a match section.
```

![image](/uploads/704dd3845797530697a27f5c1953c053/image.png)

```
New comment for Merge Request !1 on app/views/admin/builds/index.html.haml:

http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/1#note_1022

&gt;          Finished
&gt;          %span.badge.js-running-count= @all_builds.finished.count(:id)
&gt;  
&gt; -    %li{class: ('active' if @scope == 'all')}
&gt; -      = link_to admin_builds_path(scope: :all) do
&gt; -        All
&gt; -        %span.badge.js-totalbuilds-count= @all_builds.count(:id)
&gt; -
&gt;  .gray-content-block
&gt;    #{(@scope || 'running').capitalize} builds
&gt;  

This is a comment at the bottom of a match section.
```

![image](/uploads/4063f3d9738aea8ebf3c0e690d0eddee/image.png)

```
New comment for Merge Request !1 on app/views/admin/builds/index.html.haml:

http://localhost:3000/gitlab-org/gitlab-ce/merge_requests/1#note_1024

&gt;          = link_to 'Cancel all', cancel_all_admin_builds_path, data: { confirm: 'Are you sure?' }, class: 'btn btn-danger', method: :post
&gt;  
&gt;    %ul.center-top-menu
&gt; -    %li{class: ('active' if @scope.nil?)}
&gt; +    %li{class: ('active' if @scope == 'all')}
&gt;        = link_to admin_builds_path do
&gt; +        All

This is a comment with some deleted and added lines above it.
```

Closes #21027, closes #24340.

See merge request !7660</pre>
</div>
</content>
</entry>
<entry>
<title>Merge branch 'jej-use-issuable-finder-instead-of-access-check' into 'security'</title>
<updated>2016-11-29T00:26:23+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@gitlab.com</email>
</author>
<published>2016-11-22T10:25:04+00:00</published>
<link rel='alternate' type='text/html' href='http://trove.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=3bf34face4cacf07ca973705c261369b1f596626'/>
<id>3bf34face4cacf07ca973705c261369b1f596626</id>
<content type='text'>

Replace issue access checks with use of IssuableFinder

Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867

## Which fixes are in this MR?

:warning: - Potentially untested  
:bomb: - No test coverage  
:traffic_light: - Test coverage of some sort exists (a test failed when error raised)  
:vertical_traffic_light: - Test coverage of return value (a test failed when nil used)  
:white_check_mark: - Permissions check tested

### Issue lookup with access check

Using `visible_to_user` likely makes these security issues too. See [Code smells](#code-smells).

- [x] :vertical_traffic_light: app/finders/notes_finder.rb:15 [`visible_to_user`]
- [x] :traffic_light: app/views/layouts/nav/_project.html.haml:73 [`visible_to_user`] [`.count`]
- [x] :white_check_mark: app/services/merge_requests/build_service.rb:84 [`issue.try(:confidential?)`]
- [x] :white_check_mark: lib/api/issues.rb:112 [`visible_to_user`]
  - CHANGELOG: Prevented API returning issues set to 'Only team members' to everyone
- [x] :white_check_mark: lib/api/helpers.rb:126 [`can?(current_user, :read_issue, issue)`] Maybe here too?
- [x] :white_check_mark: lib/gitlab/search_results.rb:53 [`visible_to_user`]

### Previous discussions
- [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b2ff264eddf9819d7693c14ae213d941494fe2b3_128_126
- [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#7b6375270d22f880bdcb085e47b519b426a5c6c7_87_87

See merge request !2031</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>

Replace issue access checks with use of IssuableFinder

Split from !2024 to partially solve https://gitlab.com/gitlab-org/gitlab-ce/issues/23867

## Which fixes are in this MR?

:warning: - Potentially untested  
:bomb: - No test coverage  
:traffic_light: - Test coverage of some sort exists (a test failed when error raised)  
:vertical_traffic_light: - Test coverage of return value (a test failed when nil used)  
:white_check_mark: - Permissions check tested

### Issue lookup with access check

Using `visible_to_user` likely makes these security issues too. See [Code smells](#code-smells).

- [x] :vertical_traffic_light: app/finders/notes_finder.rb:15 [`visible_to_user`]
- [x] :traffic_light: app/views/layouts/nav/_project.html.haml:73 [`visible_to_user`] [`.count`]
- [x] :white_check_mark: app/services/merge_requests/build_service.rb:84 [`issue.try(:confidential?)`]
- [x] :white_check_mark: lib/api/issues.rb:112 [`visible_to_user`]
  - CHANGELOG: Prevented API returning issues set to 'Only team members' to everyone
- [x] :white_check_mark: lib/api/helpers.rb:126 [`can?(current_user, :read_issue, issue)`] Maybe here too?
- [x] :white_check_mark: lib/gitlab/search_results.rb:53 [`visible_to_user`]

### Previous discussions
- [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#b2ff264eddf9819d7693c14ae213d941494fe2b3_128_126
- [ ] https://dev.gitlab.org/gitlab/gitlabhq/merge_requests/2024/diffs#7b6375270d22f880bdcb085e47b519b426a5c6c7_87_87

See merge request !2031</pre>
</div>
</content>
</entry>
</feed>
