Commit Graph

142 Commits

Author SHA1 Message Date
Sean McGivern 86e75ae092 Merge branch 'blackst0ne/gitlab-ce-add_system_note_for_editing_issuable' 2017-05-05 22:00:36 +01:00
Valery Sizov 0b7aabe302 Multiple issue assignee: fix for CE restrictions 2017-05-05 20:07:35 +03:00
blackst0ne 8c4c40d09b Updated specs 2017-05-05 23:01:50 +11:00
Valery Sizov 387c4b2c21 Backport of multiple_assignees_feature [ci skip] 2017-05-04 17:11:53 +03:00
Sean McGivern 5069682d8e Enable RSpec/FilePath cop
- Ignore JS fixtures
- Ignore qa directory
- Rewrite concern specs to put concern name first
2017-04-26 12:50:32 +01:00
Douwe Maan afa53810de
Fix specs 2017-04-05 17:44:14 +01:00
Douwe Maan 79889a6aa3
Add specs 2017-04-05 17:44:14 +01:00
Douwe Maan 08bbb9fce6
Add option to start a new discussion on an MR 2017-04-05 17:44:14 +01:00
Jarka Kadlecova a74a6cfddf Create todos only for new mentions 2017-03-29 17:20:11 +02:00
Robert Speicher ca9a79f620 Use `:empty_project` where possible in service specs 2017-03-27 20:44:09 -04:00
Bob Van Landuyt ea70a0d674 Rename variable
merge_request_for_resolving_discussions ->
merge_request_to_resolve_discussions_of
2017-03-13 08:27:52 +01:00
Bob Van Landuyt 67bd277ae6 Make sure the for a merge request only gets executed once. 2017-03-13 08:27:51 +01:00
Bob Van Landuyt 5eee47758c Correctly indent quotes in new issue description
By using `>`-quote style instead of `>>>`.

Also: Update documentation images.
2017-03-13 08:27:51 +01:00
Bob Van Landuyt ffe135ccf6 Move functionality for resolving discussions into a concern 2017-03-13 08:27:51 +01:00
Bob Van Landuyt f86928953d Always require MR-iid for resolving discussions
And deduplicate the finding of MR's & discussions. Now the searching
is done in the service, istead of the controller & the API.
2017-03-13 08:27:51 +01:00
Bob Van Landuyt 0267b83898 Delegate a single discussion to a new issue
Delegate a discussion in a merge request into a new issue.
The discussion wil be marked as resolved and a system note will be
added linking to the newly created issue.
2017-03-13 08:27:51 +01:00
Valery Sizov a0108c6925 Address review comments 2017-03-07 13:42:17 +02:00
Valery Sizov b64020de28 Satisfy rubocop 2017-03-02 16:58:41 +02:00
Valery Sizov 800f2a722f [Issue board sorting] Specs 2017-02-28 16:52:49 +02:00
Oswaldo Ferreira 2ace39f242 Spam check and reCAPTCHA improvements 2017-02-21 13:32:49 -03:00
wendy0402 9a24db121c fix issue creation from milestone doesn't assign the milestone 2017-02-12 09:02:03 +07:00
Jarka Kadlecova 3d2954e457 Use reCaptcha when an issue identified as spam 2017-02-07 12:56:20 +01:00
Felipe Artur 1b082a4c33 Check if user can read issue before being assigned 2016-12-27 19:25:17 -02:00
Mark Fletcher 9f97fa4d9f Ensure issuable state changes only fire webhooks once
* Webhooks for close and reopen events now fired in respective services only
* Prevents generic 'update' webhooks firing too
2016-12-16 10:52:59 +00:00
Sean McGivern d9ef41cf4d Merge branch '23589-open-issue-for-mr' into 'master'
Create an issue for all unresolved discussions in an MR

See merge request !7180
2016-12-06 14:04:14 +00:00
Bob Van Landuyt 1123057ab7 Feature: delegate all open discussions to Issue
When a merge request can only be merged when all discussions are
resolved. This feature allows to easily delegate those discussions to a
new issue, while marking them as resolved in the merge request.

The user is presented with a new issue, prepared with mentions of all
unresolved discussions, including the first unresolved note of the
discussion, time and link to the note.

When the issue is created, the discussions in the merge request will get
a system note directing the user to the newly created issue.
2016-12-05 20:55:45 +01:00
Oswaldo Ferreira f272ee6eba Add shorthand support to gitlab markdown references 2016-12-02 19:18:17 -02:00
Robert Speicher 819f459b69 Only include EmailHelpers in mailer specs and specs using them 2016-12-01 12:17:33 +08:00
Douwe Maan 6df22f72c6 Rephrase some system notes to be compatible with new system note style 2016-11-24 18:26:29 +08:00
Douglas Barbosa Alexandre 0c052f116c Remove default value for `project` argument on subscribable concern 2016-11-17 15:10:13 -02:00
Yorick Peterse 509910b89f
Process commits in a separate worker
This moves the code used for processing commits from GitPushService to
its own Sidekiq worker: ProcessCommitWorker.

Using a Sidekiq worker allows us to process multiple commits in
parallel. This in turn will lead to issues being closed faster and cross
references being created faster. Furthermore by isolating this code into
a separate class it's easier to test and maintain the code.

The new worker also ensures it can efficiently check which issues can be
closed, without having to run numerous SQL queries for every issue.
2016-11-07 13:11:44 +01:00
Douwe Maan c003fc5091 Merge branch '23662-issue-move-user-reference-exception' into 'master'
Fix `User#to_reference`

## What does this MR do?

Fix the method signature of `User#to_reference` so that moving an issue with a user reference does not throw a "invalid number of arguments" exception.

## Why was this MR needed?

1. Changes in 8.13 require `Referable`s that don't have a project
   reference to accept two arguments - `from_project` and
   `target_project`.

2. `User#to_reference` was not changed to accept the
   `target_project` (even though it is not used). Moving an issue
   containing a user reference would throw a "invalid number of
   arguments" exception.

3. The regression was introduced in [c8b2b3f7](c8b2b3f7c3 (91fabb7ad88bd2fde6fef1c100a719c00e503047_75_79)), which expects
   all `Referable`s that don't respond to `:project` to have a `to_reference`
   method that takes two arguments.   

## Does this MR meet the acceptance criteria?

- Tests
  - [x] Added for this feature/bug
  - [ ] All builds are passing
- [x] Conform by the [merge request performance guides](http://docs.gitlab.com/ce/development/merge_request_performance_guidelines.html)
- [x] Conform by the [style guides](https://gitlab.com/gitlab-org/gitlab-ce/blob/master/CONTRIBUTING.md#style-guides)
- [x] Branch has no merge conflicts with `master` (if it does - rebase it please)
- [x] [Squashed related commits together](https://git-scm.com/book/en/Git-Tools-Rewriting-History#Squashing-Commits)

## What are the relevant issue numbers?

- Closes #23662

See merge request !7088
2016-10-25 10:54:48 +00:00
Grzegorz Bizon 7c0ccbaac4 Fix Rubocop offenses in issue move specs 2016-10-24 22:40:08 -07:00
Stan Hu 3e941b136d Add spec in Issues::MoveService to fix label assignment regression 2016-10-24 22:40:08 -07:00
Timothy Andrew fed3f718d8 Fix `User#to_reference`
1. Changes in 8.13 require `Referable`s that don't have a project
   reference to accept two arguments - `from_project` and
   `target_project`.

2. `User#to_reference` was not changed to accept the
   `target_project` (even though it is not used). Moving an issue
   containing a user reference would throw a "invalid number of
   arguments" exception.

Fixes #23662
2016-10-25 11:03:49 +05:30
Douglas Barbosa Alexandre 398ab263fd Allow users to apply group labels on Issues/MRs 2016-10-19 14:58:24 -02:00
Rémy Coutable adab5dba43 Fix permission for setting an issue's due date
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-09-28 17:41:32 +02:00
Dmitriy Zaporozhets f28ca293b7 Add bulk update support for merge requests list
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2016-09-08 11:52:20 +03:00
Douglas Barbosa Alexandre 21f10af095 Scope hooks thal will run for confidential issues 2016-08-31 18:34:45 -03:00
Douglas Barbosa Alexandre debb65b5c8 Update service specs to avoid instance variables 2016-08-31 18:33:14 -03:00
Douglas Barbosa Alexandre 44340fede2 Fix confidential issues should not be passed to Webhooks 2016-08-31 18:33:14 -03:00
Robert Speicher 717366d28d Merge branch '4273-slash-commands' into 'master'
Support slash commands in issues / MR description & comments

See merge request !5021
2016-08-18 16:41:16 -05:00
Nick Thomas 2797cfbf60 Fix a rubocop violation 2016-08-17 09:46:13 +01:00
Nick Thomas 0e9c4a902d DRY up the added update service specs, add two email helpers 2016-08-16 17:08:43 +01:00
Nick Thomas 8a6e9b934e Address minor review comments for tests 2016-08-16 13:40:55 +01:00
Rémy Coutable a54fdc384f Enforce permissions in `{Issues,MergeRequests}::{Close,Reopen}Service`
Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:06:11 +02:00
Rémy Coutable 0eea8c8857 Support slash commands in noteable description and notes
Some important things to note:

- commands are removed from noteable.description / note.note
- commands are translated to params so that they are treated as normal
  params in noteable Creation services
- the logic is not in the models but in the Creation services, which is
  the right place for advanced logic that has nothing to do with what
  models should be responsible of!
- UI/JS needs to be updated to handle notes which consist of commands
  only
- the `/merge` command is not handled yet

Other improvements:

- Don't process commands in commit notes and display a flash is note is only commands
- Add autocomplete for slash commands
- Add description and params to slash command DSL methods
- Ensure replying by email with a commands-only note works
- Use :subscription_event instead of calling noteable.subscribe
- Support :todo_event in IssuableBaseService

Signed-off-by: Rémy Coutable <remy@rymai.me>
2016-08-13 00:05:57 +02:00
Nick Thomas 59bfa08098 Send notification emails when users are newly mentioned in issue edits 2016-08-12 22:54:32 +01:00
tiagonbotelho 1d268a89de adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
Robert Speicher 97c4a1dcea Refactor Issues::BulkUpdateService spec
- Create fewer Issue objects; 2 is as good as 5 for these cases. This
  gives us a nice little speed improvement.
- Don't `describe` Symbols.
- Simplify object creation.
- Lessen "mystery guest" antipattern
2016-07-20 17:59:34 -06:00