Commit graph

26 commits

Author SHA1 Message Date
Sean McGivern
7a9d3a3c90 Show merge errors in merge request widget
There were two problems here:

1. On the JS side, the reference to $widgetBody didn't refer to the
   right DOM element any more. This might be because it was replaced by
   the `getMergeStatus` method. Even if it wasn't, ensuring we have the
   right element means that the content gets updated.

2. On the Ruby side, the `log_merge_error` method didn't update the
   `merge_error` column of the merge request. Change that to update if
   requested, and update in the most common cases by default.

   Additionally, this would sometimes return an error hash, but it
   doesn't look like this was ever used (the return value of
   `MergeService#execute` appears to be unused everywhere).
2017-02-16 09:14:22 +00:00
Adam Niedzielski
1105597303 Refactor JiraService by moving code out of JiraService#execute method
The implicit interface of project services states that the "execute"
method is meant to be called when project hooks are executed.
Currently JiraService does not support any project events even though
JiraService#supported_events says that "commit" and "merge_request"
are supported. They are only used to render correct options in
JIRA configuration screen, but they are not supported.
Because of that, this commit makes "execute" method a no-op.
2016-12-01 09:45:06 +01:00
Douwe Maan
6df22f72c6 Rephrase some system notes to be compatible with new system note style 2016-11-24 18:26:29 +08:00
Felipe Artur
d399e1ae2b Allow enabling and disabling commit and MR events for JIRA 2016-11-18 15:17:51 -02:00
Felipe Artur
85dd05b5b3 Add JIRA remotelinks and prevent duplicated closing messages 2016-11-18 10:03:31 -02:00
Felipe Artur
8e4301d982 Prevent wrong markdown on issue ids when project has Jira service activated 2016-10-19 13:46:04 -02:00
Stan Hu
47b0edbe74 Improve error logging of MergeService
Relates to #23505
2016-10-18 21:26:20 -07:00
Nick Thomas
e94cd6fdfe Add markdown cache columns to the database, but don't use them yet
This commit adds a number of _html columns and, with the exception of Note,
starts updating them whenever the content of their partner fields changes.

Note has a collision with the note_html attr_accessor; that will be fixed later

A background worker for clearing these cache columns is also introduced - use
`rake cache:clear` to set it off. You can clear the database or Redis caches
separately by running `rake cache:clear:db` or `rake cache:clear:redis`,
respectively.
2016-10-07 02:54:25 +01:00
Felipe Artur
45bfadbcbf Fix bug when trying to cache closed issues from external issue trackers 2016-10-03 19:58:49 -03:00
Tony Gambone
6d49fcf439 Close todos when accepting a MR via the API. 2016-09-29 14:51:12 -04:00
tiagonbotelho
1d268a89de adds second batch of tests changed to active tense 2016-08-09 15:11:39 +01:00
Stan Hu
60529e0216 Properly abort a merge when merge conflicts occur
If somehow a user attempted to accept a merge request that had
conflicts (e.g. the "Accept Merge Request" button or the MR itself was
not updated), `MergeService` did not properly detect that a conflict
occurred. It would assume that the MR went through without any issues
and close the MR as though everything was fine. This could cause
data loss if the source branch were removed.

Closes #20425
2016-07-29 11:21:21 -07:00
Robert Speicher
adc6ec4a9c Avoid describe-ing symbols in specs 2016-07-12 10:27:58 -05:00
Valery Sizov
926a8ab476 Handle custom Git hook result in GitLab UI 2016-07-04 20:16:55 +03: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
Douwe Maan
73c59de062 Merge branch 'master' into split-up-builds 2015-12-09 13:56:26 +01:00
Douwe Maan
a2cfb44157 Tag service specs 2015-12-09 11:55:49 +01:00
Zeger-Jan van de Weg
0e96d6eb10 Merge branch 'master' into merge-if-green 2015-12-07 10:06:07 +01:00
Zeger-Jan van de Weg
a7682f8775 Specs for 'Merge When Build Succeeds' 2015-12-02 13:27:16 +01:00
Valery Sizov
f1504e1ad5 test fix 2015-11-30 18:03:07 +02:00
Valery Sizov
05fdd12fd9 Improve error message when merging fails 2015-10-01 09:45:47 +03: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
ab8c71de4e
Fix merge request creation without branch selected
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2015-08-05 11:03:41 +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