Age | Commit message (Collapse) | Author |
|
|
|
|
|
|
|
|
|
At present, the TodoService uses the `:read_project` ability to decide
whether a user can read a note on a commit. However, commits can have a
visibility level that is more restricted than the project, so this is a
security issue.
This commit changes the code to use the `:read_commit` ability in this
case instead, which ensures TODOs are only generated for commit notes
if the users can see the commit.
|
|
Backports https://gitlab.com/gitlab-org/gitlab-ee/merge_requests/10161
(code out of ee/ folder).
|
|
This refactors the TodoService class according to our code reuse
guidelines. The resulting code is a wee bit more verbose, but it allows
us to decouple the column names from the input, resulting in fewer
changes being necessary when we change the schema.
One particular noteworthy line in TodoService is the following:
todos_ids = todos.update_state(state)
Technically this is a violation of the guidelines, because
`update_state` is a class method, which services are not supposed to use
(safe for a few allowed ones). I decided to keep this, since there is no
alternative. `update_state` doesn't produce a relation so it doesn't
belong in a Finder, and we can't move it to another Service either. As
such I opted to just use the method directly.
Cases like this may happen more frequently, at which point we should
update our documentation with some sort of recommendation. For now, I
want to refrain from doing so until we have a few more examples.
|
|
This whitelists all existing offenses for the various CodeReuse cops, of
which most are triggered by the CodeReuse/ActiveRecord cop.
|
|
This reverts commit 8717c7dad9b5a8fa21ec9a652c54718a6b4c2175.
|
|
Partially addresses #47424.
|
|
This reverts commit 4d9a3f42f1fd3be21555e19872b7121cca65015e, reversing
changes made to ecf9c145f6e4d170cd059df88743393d9e63c489.
|
|
|
|
|
|
* Group filtering now includes also issues/MRs from
subgroups/subprojects
* fixed due_date
* Also DRYed todo controller specs
|
|
|
|
Old behavior of creating TODO when
“Merge When Pipeline Succeeds” service fails, is generalized to:
Create a TODO whenever MR became unmergeable
(and similar to notification, MR author and merge_user are both applicable)
|
|
* adds basic discussions API for issues and snippets
* reorganizes notes specs (so same tests can be used for all noteable types - issues, MRs, snippets)
|
|
When the target is deleted, todos are destroyed, but we did not reset the todo
cache for users with todos on the deleted target. This would only update after
the next time the todo cache was updated for that user.
|
|
Adds a rubocop rule (with autocorrect) to ensure line break after guard clauses.
|
|
|
|
|
|
TodoService should not call `.select(&:id)` on todos, because this is
bad performance. So instead use sub-queries, which will result in a
single SQL query to the database.
https://docs.gitlab.com/ee/development/sql.html#plucking-ids
|
|
|
|
|
|
This reverts merge request !10845
|
|
TodoService should not call `.select(&:id)` on todos, because this is
bad performance. So instead use sub-queries, which will result in a
single SQL query to the database.
https://docs.gitlab.com/ee/development/sql.html#plucking-ids
|
|
|
|
|
|
Added the ability to 'Undo mark all as done' todos marked as complete with 'Mark all as done'
in the 'Todo' tab of the Todo dashboard.
The operation undos only the todo previously marked as done with the 'Mark al as done' button.
|
|
Rename column in the database
Rename fields related to import/export feature
Rename API endpoints
Rename documentation links
Rename the rest of occurrences in the code
Replace the images that contain the words "build succeeds" and docs referencing to them
Make sure pipeline is green and nothing is missing.
updated doc images
renamed only_allow_merge_if_build_succeeds in projects and fixed references
more updates
fix some spec failures
fix rubocop offences
fix v3 api spec
fix MR specs
fixed issues with partials
fix MR spec
fix alignment
add missing v3 to v4 doc
wip - refactor v3 endpoints
fix specs
fix a few typos
fix project specs
copy entities fully to V3
fix entity error
more fixes
fix failing specs
fixed missing entities in V3 API
remove comment
updated code based on feedback
typo
fix spec
|
|
The Done button will change to an Undo button and the line item will be greyed out.
Bold links will be unbolded.
The user can undo the task by clicking the Undo button.
|
|
|
|
|
|
|
|
|
|
|
|
on the UI when mark as done a already done todo.
|
|
Support slash commands in issues / MR description & comments
See merge request !5021
|
|
|
|
Follow-up on 52b0c26
|
|
# Conflicts:
# app/services/issues/create_service.rb
|
|
Signed-off-by: Rémy Coutable <remy@rymai.me>
|
|
We’re being kept up to date the counter data but we’re not using it.
The only thing which is not real if is the number of projects that the
user read changes the number of todos can be stale for some time.
The counters will be sync just after the user receives a new todo or mark any as done
|
|
|
|
|
|
|
|
- As todos are created/updated inside the TodoService
we repopulate the cache just there for both pending/done todos
- Todos as mark as done from the TodosController we update cache
there too
- All the added methods are kept in the User class for cohesion
|
|
|
|
|
|
Added a button into the sidebar for issues & merge requests to allow users to manually create todo items
Closes #15045
|