Commit graph

18 commits

Author SHA1 Message Date
Felipe Artur
1b082a4c33 Check if user can read issue before being assigned 2016-12-27 19:25:17 -02:00
Timothy Andrew
a57c77f6c2 Add a spec for merge request metric caching while refreshing a merge request from a forked project. 2016-09-21 02:15:02 +05:30
Timothy Andrew
68e1b5bbc0 Use the IssuableBaseService lifecycle hooks to cache MergeRequestsClosingIssues
- Instead of overriding `create` and `update` in `MergeRequests::BaseService`
- Get all merge request service specs passing
2016-09-21 01:22:20 +05:30
Timothy Andrew
918e589c2b Implement a second round of review comments from @DouweM.
- Don't use `TableReferences` - using `.arel_table` is shorter!
- Move some database-related code to `Gitlab::Database`
- Remove the `MergeRequest#issues_closed` and
  `Issue#closed_by_merge_requests`  associations. They were either
  shadowing or were too similar to existing methods. They are not being
  used anywhere, so it's better to remove them to reduce confusion.
- Use Rails 3-style validations
- Index for `MergeRequest::Metrics#first_deployed_to_production_at`
- Only include `CycleAnalyticsHelpers::TestGeneration` for specs that
  need it.
- Other minor refactorings.
2016-09-21 00:47:37 +05:30
Timothy Andrew
8f6208513a Test all cycle analytics pre-calculation code.
All the code that pre-calculates metrics for use in the cycle analytics
page.

- Ci::Pipeline -> build start/finish
- Ci::Pipeline#merge_requests
- Issue -> record default metrics after save
- MergeRequest -> record default metrics after save
- Deployment -> Update "first_deployed_to_production_at" for MR metrics
- Git Push -> Update "first commit mention" for issue metrics
- Merge request create/update/refresh -> Update "merge requests closing issues"
2016-09-19 13:12:06 +05:30
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
tiagonbotelho
1d268a89de adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
Robert Speicher
adc6ec4a9c Avoid describe-ing symbols in specs 2016-07-12 10:27:58 -05:00
Jeroen Jacobs
7880a300dc Allows MR authors to have the source branch removed when merging the MR 2016-05-20 11:30:03 +02:00
Douglas Barbosa Alexandre
3d52e139b1 Rename Tasks to Todos 2016-02-20 12:39:27 -02:00
Douglas Barbosa Alexandre
802bf6d012 Create a pending task when an MR is assigned to someone 2016-02-20 12:10:26 -02:00
Douwe Maan
a2cfb44157 Tag service specs 2015-12-09 11:55:49 +01:00
Dmitriy Zaporozhets
3e259ea8bc Revert "Merge branch 'revert-satellites' into 'master' "
This reverts commit 5daf44b7c8, reversing
changes made to 2f706fbd23.
2015-08-11 14:33:31 +02:00
Dmitriy Zaporozhets
9f10943c1a
Revert "Merge branch 'drop-satellites'"
This reverts commit 957e849f41, reversing
changes made to 6b9dbe9f5a.

Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-11 10:28:42 +02:00
Dmitriy Zaporozhets
44ac823e59
Improve tests to use real branches in merge requests
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-04 17:20:26 +02:00
Jeroen van Baarsen
0c4a70a306 Updated rspec to rspec 3.x syntax
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2015-02-12 19:17:35 +01:00
jubianchi
4ffdb83e71 Add action property to merge request hook 2015-01-20 10:50:24 +01:00
Dmitriy Zaporozhets
860f159d41
Add note when MR assignee changes. Add more tests to MR services
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-04-03 18:16:05 +03:00