<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/app/services/protected_branches, branch ide-diff-cursor</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>Protected branch is now created for default branch on import</title>
<updated>2018-01-06T12:20:49+00:00</updated>
<author>
<name>Tiago Botelho</name>
<email>tiagonbotelho@hotmail.com</email>
</author>
<published>2018-01-03T16:01:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=819fc98fed227487b0a273ee294e374e7457782b'/>
<id>819fc98fed227487b0a273ee294e374e7457782b</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>CE backport of ProtectedBranches API changes</title>
<updated>2017-12-07T11:58:50+00:00</updated>
<author>
<name>James Edwards-Jones</name>
<email>jedwardsjones@gitlab.com</email>
</author>
<published>2017-11-22T17:08:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=1d47ae1365e259406233764885891923bebc555c'/>
<id>1d47ae1365e259406233764885891923bebc555c</id>
<content type='text'>
In EE we now allow individual users/groups to be set on POST, which required some refactoring.
See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3516
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
In EE we now allow individual users/groups to be set on POST, which required some refactoring.
See https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/3516
</pre>
</div>
</content>
</entry>
<entry>
<title>Renamed ProtectedBranches::ApiUpdateService to LegacyApiUpdateService</title>
<updated>2017-11-23T12:43:13+00:00</updated>
<author>
<name>James Edwards-Jones</name>
<email>jedwardsjones@gitlab.com</email>
</author>
<published>2017-11-22T15:16:08+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=fceffe4dca9af5ab3ffaa2e110c5fb4bad254950'/>
<id>fceffe4dca9af5ab3ffaa2e110c5fb4bad254950</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Protected Tags backend review changes</title>
<updated>2017-04-06T09:56:21+00:00</updated>
<author>
<name>James Edwards-Jones</name>
<email>jedwardsjones@gitlab.com</email>
</author>
<published>2017-04-05T17:59:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f16377e7dc762462817dd0b34e36811c55988b10'/>
<id>f16377e7dc762462817dd0b34e36811c55988b10</id>
<content type='text'>
Added changelog</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Added changelog</pre>
</div>
</content>
</entry>
<entry>
<title>Enable Performance/RedundantMerge</title>
<updated>2017-02-23T15:31:57+00:00</updated>
<author>
<name>Douwe Maan</name>
<email>douwe@selenight.nl</email>
</author>
<published>2017-02-21T23:50:22+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=030baf70d25a666b660b0024f000586631ee3daf'/>
<id>030baf70d25a666b660b0024f000586631ee3daf</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement third round of review comments from @DouweM.</title>
<updated>2016-10-24T06:03:38+00:00</updated>
<author>
<name>Timothy Andrew</name>
<email>mail@timothyandrew.net</email>
</author>
<published>2016-10-24T06:02:09+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=db0182e261936c3e800b546d307a3d3834ff9927'/>
<id>db0182e261936c3e800b546d307a3d3834ff9927</id>
<content type='text'>
Extract/mutate `params` in the `execute` method of the API services,
rather than in `initialize`.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Extract/mutate `params` in the `execute` method of the API services,
rather than in `initialize`.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement second round of review comments from @DouweM.</title>
<updated>2016-10-24T06:03:38+00:00</updated>
<author>
<name>Timothy Andrew</name>
<email>mail@timothyandrew.net</email>
</author>
<published>2016-09-30T07:44:46+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=1051087ac4efc3dbf45bd075e36af647d2b66d62'/>
<id>1051087ac4efc3dbf45bd075e36af647d2b66d62</id>
<content type='text'>
- Pass `developers_and_merge` and `developers_can_push` in `params`
  instead of using keyword arguments.

- Refactor a slightly complex boolean check to a simple `nil?` check.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
- Pass `developers_and_merge` and `developers_can_push` in `params`
  instead of using keyword arguments.

- Refactor a slightly complex boolean check to a simple `nil?` check.
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement review comments from @DouweM.</title>
<updated>2016-10-24T06:03:38+00:00</updated>
<author>
<name>Timothy Andrew</name>
<email>mail@timothyandrew.net</email>
</author>
<published>2016-09-22T15:08:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=b803bc7bb8ad481790d01848902e80602e77da67'/>
<id>b803bc7bb8ad481790d01848902e80602e77da67</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Implement review comments from @dbalexandre.</title>
<updated>2016-10-24T06:03:38+00:00</updated>
<author>
<name>Timothy Andrew</name>
<email>mail@timothyandrew.net</email>
</author>
<published>2016-09-14T02:34:29+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=cef10ef7d7a20a78d377f711867e361bb51fbaf2'/>
<id>cef10ef7d7a20a78d377f711867e361bb51fbaf2</id>
<content type='text'>
1. Don't have any EE-only code in CE. Ok to have CE-only code in EE.

2. Use `case` instead of `if/elsif`
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Don't have any EE-only code in CE. Ok to have CE-only code in EE.

2. Use `case` instead of `if/elsif`
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix branch protection API.</title>
<updated>2016-10-24T06:03:38+00:00</updated>
<author>
<name>Timothy Andrew</name>
<email>mail@timothyandrew.net</email>
</author>
<published>2016-09-06T05:05:34+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=f79f3a1dd621362b0894eff0a54f220f8415a2e0'/>
<id>f79f3a1dd621362b0894eff0a54f220f8415a2e0</id>
<content type='text'>
1. Previously, we were not removing existing access levels before
   creating new ones. This is not a problem for EE, but _is_ for CE,
   since we restrict the number of access levels in CE to 1.

2. The correct approach is:

    CE -&gt; delete all access levels before updating a protected branch
    EE -&gt; delete developer access levels if "developers_can_{merge,push}" is switched off

3. The dispatch is performed by checking if a "length: 1" validation is
   present on the access levels or not.

4. Another source of problems was that we didn't put multiple queries in
   a transaction. If the `destroy_all` passes, but the `update` fails,
   we should have a rollback.

5. Modifying the API to provide users direct access to CRUD access
   levels will make things a lot simpler.

6. Create `create/update` services separately for this API, which
   perform the necessary data translation, before calling the regular
   `create/update` services. The translation code was getting too large
   for the API endpoint itself, so this move makes sense.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
1. Previously, we were not removing existing access levels before
   creating new ones. This is not a problem for EE, but _is_ for CE,
   since we restrict the number of access levels in CE to 1.

2. The correct approach is:

    CE -&gt; delete all access levels before updating a protected branch
    EE -&gt; delete developer access levels if "developers_can_{merge,push}" is switched off

3. The dispatch is performed by checking if a "length: 1" validation is
   present on the access levels or not.

4. Another source of problems was that we didn't put multiple queries in
   a transaction. If the `destroy_all` passes, but the `update` fails,
   we should have a rollback.

5. Modifying the API to provide users direct access to CRUD access
   levels will make things a lot simpler.

6. Create `create/update` services separately for this API, which
   perform the necessary data translation, before calling the regular
   `create/update` services. The translation code was getting too large
   for the API endpoint itself, so this move makes sense.
</pre>
</div>
</content>
</entry>
</feed>
