<feed xmlns='http://www.w3.org/2005/Atom'>
<title>delta/gitlab/gitlab-ce.git/lib/api/discussions.rb, branch docs-update-forking-workflow</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>Eliminate many Gitaly calls in discussions API</title>
<updated>2019-08-15T15:02:30+00:00</updated>
<author>
<name>Stan Hu</name>
<email>stanhu@gmail.com</email>
</author>
<published>2019-08-15T04:50:52+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=8044440d7ad8c476d05e3e204ee26b9663738cea'/>
<id>8044440d7ad8c476d05e3e204ee26b9663738cea</id>
<content type='text'>
Previously, the API to retrieve discussions from merge requests often
generated hundreds of Gitaly calls to determine whether a system note
should be shown to the user. It did this by:

1. Rendering the Markdown
2. Extracting cross-references from the Markdown
3. For cross-references that were commits, a Gitaly FindCommit RPC
   would be issued to validate that the commit exists.

The last step is unnecessary because we don't need to display a commit
if the user doesn't have access to the project in the first place.

`RendersNotes#prepare_notes_for_rendering` is already used in
`MergeRequestsController`, which is why we don't see N+1 Gitaly calls
there. We use it here to optimize the note redaction process.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65957
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Previously, the API to retrieve discussions from merge requests often
generated hundreds of Gitaly calls to determine whether a system note
should be shown to the user. It did this by:

1. Rendering the Markdown
2. Extracting cross-references from the Markdown
3. For cross-references that were commits, a Gitaly FindCommit RPC
   would be issued to validate that the commit exists.

The last step is unnecessary because we don't need to display a commit
if the user doesn't have access to the project in the first place.

`RendersNotes#prepare_notes_for_rendering` is already used in
`MergeRequestsController`, which is why we don't see N+1 Gitaly calls
there. We use it here to optimize the note redaction process.

Closes https://gitlab.com/gitlab-org/gitlab-ce/issues/65957
</pre>
</div>
</content>
</entry>
<entry>
<title>Use NotesFinder to fetch notes on API and Controllers</title>
<updated>2019-06-19T08:56:55+00:00</updated>
<author>
<name>Patrick Derichs</name>
<email>pderichs@gitlab.com</email>
</author>
<published>2019-06-15T05:10:58+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=932a9a0c77a02e1d948f45cffe5e936e915ae0bc'/>
<id>932a9a0c77a02e1d948f45cffe5e936e915ae0bc</id>
<content type='text'>
Fix missing iid query on NotesFinder

Changed parameters of find_noteable, 
so changes across a few files were needed.
MergeRequest also requires iid instead of id query

Make NotesFinder fail with RecordNotFound again

Add specs for target_iid

Using RSpec tablesyntax for target_iid specs

Revert "Using RSpec tablesyntax for target_iid specs"

This reverts commit ba45c7f569a.

Allow find_by! here

Fix variable name

Add readable check

Revert "Add readable check"

This reverts commit 9e3a1a7aa39.

Remove unnecessary assignment

Add required changes for EE

Fix parameter count

Reduce code duplication by extracting a noteable module method

The call to find_noteable was redundant so
multiple files and lines have changed in that
commit to use the newly introduced module
method `noteable`.

Replace casecmp with include check

Add parent_type parameter


Revert "Reduce code duplication by extracting
a noteable module method"

This reverts commit 8c0923babff16.

Method is no longer needed

Check whether noteable can be read by user
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Fix missing iid query on NotesFinder

Changed parameters of find_noteable, 
so changes across a few files were needed.
MergeRequest also requires iid instead of id query

Make NotesFinder fail with RecordNotFound again

Add specs for target_iid

Using RSpec tablesyntax for target_iid specs

Revert "Using RSpec tablesyntax for target_iid specs"

This reverts commit ba45c7f569a.

Allow find_by! here

Fix variable name

Add readable check

Revert "Add readable check"

This reverts commit 9e3a1a7aa39.

Remove unnecessary assignment

Add required changes for EE

Fix parameter count

Reduce code duplication by extracting a noteable module method

The call to find_noteable was redundant so
multiple files and lines have changed in that
commit to use the newly introduced module
method `noteable`.

Replace casecmp with include check

Add parent_type parameter


Revert "Reduce code duplication by extracting
a noteable module method"

This reverts commit 8c0923babff16.

Method is no longer needed

Check whether noteable can be read by user
</pre>
</div>
</content>
</entry>
<entry>
<title>Make `resolvable_types` a class method</title>
<updated>2019-06-03T14:41:05+00:00</updated>
<author>
<name>Bob Van Landuyt</name>
<email>bob@vanlanduyt.co</email>
</author>
<published>2019-06-03T14:41:05+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=4504959aa6ce6667b9fd5b68ff24a612cb7c027b'/>
<id>4504959aa6ce6667b9fd5b68ff24a612cb7c027b</id>
<content type='text'>
This turns Notable::RESOLVABLE_TYPES into a
`Notable.resolvable_types`. That allows us to override it in EE.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This turns Notable::RESOLVABLE_TYPES into a
`Notable.resolvable_types`. That allows us to override it in EE.
</pre>
</div>
</content>
</entry>
<entry>
<title>Allow replying to an individual note in the API</title>
<updated>2019-05-06T18:48:32+00:00</updated>
<author>
<name>Sean McGivern</name>
<email>sean@gitlab.com</email>
</author>
<published>2019-05-06T10:59:02+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=00af4c6d6a8ea2997f57d6e872992b9fc72839d8'/>
<id>00af4c6d6a8ea2997f57d6e872992b9fc72839d8</id>
<content type='text'>
If you can do this in the UI, you should be able to do it in the API. If
a discussion is not a single note discussion, or it is replyable, you
can reply to it.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
If you can do this in the UI, you should be able to do it in the API. If
a discussion is not a single note discussion, or it is replyable, you
can reply to it.
</pre>
</div>
</content>
</entry>
<entry>
<title>Refactor API noteable types constants</title>
<updated>2019-03-04T16:44:56+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2019-02-21T13:34:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=654c4dd9224dc941c073b44730a6461e5d06edfc'/>
<id>654c4dd9224dc941c073b44730a6461e5d06edfc</id>
<content type='text'>
This replaces API::Notes::NOTEABLE_TYPES and
API::Discussions::NOTEABLE_TYPES with class methods defined in a
separate helper modules. This allows EE to extend the list of noteable
types, without having to modify the constant in-place. We can't define
these methods directly in the API classes, as they would be used before
we're able to extend them in EE.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This replaces API::Notes::NOTEABLE_TYPES and
API::Discussions::NOTEABLE_TYPES with class methods defined in a
separate helper modules. This allows EE to extend the list of noteable
types, without having to modify the constant in-place. We can't define
these methods directly in the API classes, as they would be used before
we're able to extend them in EE.
</pre>
</div>
</content>
</entry>
<entry>
<title>Fix API::Namespaces to accept namepaces with dots</title>
<updated>2018-11-28T11:54:11+00:00</updated>
<author>
<name>Imre Farkas</name>
<email>ifarkas@gitlab.com</email>
</author>
<published>2018-11-08T12:18:17+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=b1e070bf4957a558ac51315dd4a6277056047e8a'/>
<id>b1e070bf4957a558ac51315dd4a6277056047e8a</id>
<content type='text'>
It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to
API::NAMESPACE_OR_PROJECT_REQUIREMENTS
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
It also renames the API::PROJECT_ENDPOINT_REQUIREMENTS constant to
API::NAMESPACE_OR_PROJECT_REQUIREMENTS
</pre>
</div>
</content>
</entry>
<entry>
<title>Enable frozen string in lib/api and lib/backup</title>
<updated>2018-09-30T04:04:50+00:00</updated>
<author>
<name>gfyoung</name>
<email>gfyoung17@gmail.com</email>
</author>
<published>2018-09-29T22:34:47+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=3836d69119fee2a625edae2a564132eff9520bc8'/>
<id>3836d69119fee2a625edae2a564132eff9520bc8</id>
<content type='text'>
Partially addresses #47424.

Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:

https://github.com/rspec/rspec-mocks/issues/1190
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
Partially addresses #47424.

Had to make changes to spec files because
stubbing methods on frozen objects is a mess
in RSpec and leads to failures:

https://github.com/rspec/rspec-mocks/issues/1190
</pre>
</div>
</content>
</entry>
<entry>
<title>Disable existing offenses for the CodeReuse cops</title>
<updated>2018-09-11T15:32:00+00:00</updated>
<author>
<name>Yorick Peterse</name>
<email>yorickpeterse@gmail.com</email>
</author>
<published>2018-08-27T15:31:01+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=2039c8280db1646845c33d6c5a74e5f23ca6f4de'/>
<id>2039c8280db1646845c33d6c5a74e5f23ca6f4de</id>
<content type='text'>
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
</pre>
</div>
</content>
</entry>
<entry>
<title>Merge request and commit discussions API</title>
<updated>2018-05-01T12:39:44+00:00</updated>
<author>
<name>Jan Provaznik</name>
<email>jprovaznik@gitlab.com</email>
</author>
<published>2018-05-01T12:39:44+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=7a76caa5a8d2c6be9aa4b698a8919e223df973d3'/>
<id>7a76caa5a8d2c6be9aa4b698a8919e223df973d3</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
<entry>
<title>Resolve "Make a Rubocop that forbids returning from a block"</title>
<updated>2018-04-18T09:19:40+00:00</updated>
<author>
<name>🙈  jacopo beschi 🙉</name>
<email>intrip@gmail.com</email>
</author>
<published>2018-04-18T09:19:40+00:00</published>
<link rel='alternate' type='text/html' href='http://git.baserock.org/cgit/delta/gitlab/gitlab-ce.git/commit/?id=c6b1043e9d1b7fe9912c330b6e7d4342f2a9694e'/>
<id>c6b1043e9d1b7fe9912c330b6e7d4342f2a9694e</id>
<content type='text'>
</content>
<content type='xhtml'>
<div xmlns='http://www.w3.org/1999/xhtml'>
<pre>
</pre>
</div>
</content>
</entry>
</feed>
