113 Commits
Author SHA1 Message Date
Jacob Vosmaer 1764e1b7cb Use Gitlab::Git::DiffCollections 2016-03-03 18:38:44 +01:00
Rémy Coutable 96ed5c5114 Ensure we don't check a commit's description for revert message if it has no description 2016-02-22 18:33:02 +01:00
Rubén DávilaandRobert Speicher 5ef3f80d41 More updates from the last code review. 2016-02-19 13:15:42 -05:00
Rubén DávilaandRobert Speicher 28aaef24ad Don't use self when looking for cross-references! 2016-02-19 13:14:55 -05:00
Rubén DávilaandRobert Speicher 169070ba4b Some updates from last code review. 2016-02-19 13:14:54 -05:00
Rubén DávilaandRobert Speicher d34733efc4 Don't show revert button if commit/MR has already been reverted. 2016-02-19 13:14:54 -05:00
Rubén DávilaandRobert Speicher be54ba33ed Refactor commit message for revert commit. 2016-02-19 13:14:54 -05:00
Rubén DávilaandRobert Speicher 02f48053f1 No longer need to ignore temporary branch.
* Now it's only created when user choose to create a MR and
  logic to hide it is handled by https://gitlab.com/gitlab-org/gitlab-ce/blob/50595af7b0e304f16e2955109abd2d25cd96efda/app/helpers/application_helper.rb#L139
2016-02-19 13:14:53 -05:00
Rubén DávilaandRobert Speicher f088caca3b Use a reference to the MR when reverting MRs. 2016-02-19 13:14:53 -05:00
Rubén DávilaandRobert Speicher 328b52d58a Some updates after last code review. 2016-02-19 13:14:52 -05:00
Rubén DávilaandRobert Speicher a28eef1d1a Update copy and URLs used when reverting MRs. 2016-02-19 13:14:52 -05:00
Rubén DávilaandRobert Speicher ef591b87d1 Fix commit message plus other little fix. 2016-02-19 13:14:51 -05:00
Rubén DávilaandRobert Speicher 91e6e32d13 Make it work for merge commits. 2016-02-19 13:14:51 -05:00
Rubén DávilaandRobert Speicher 8061399368 Add RevertService class with basic logic to revert commit 2016-02-19 13:14:50 -05:00
Robert Speicher d97742570f Increase the minimum length for commit SHA matching to 7
This is the git default and will help to prevent false positive matches.

Closes #12706
2016-01-29 19:52:29 -05:00
Douwe Maan 10387f6b8a Merge branch 'master' into tmp-reference-pipeline-and-caching
# Conflicts:
#	spec/lib/gitlab/markdown/autolink_filter_spec.rb
#	spec/lib/gitlab/markdown/commit_range_reference_filter_spec.rb
#	spec/lib/gitlab/markdown/commit_reference_filter_spec.rb
#	spec/lib/gitlab/markdown/cross_project_reference_spec.rb
#	spec/lib/gitlab/markdown/emoji_filter_spec.rb
#	spec/lib/gitlab/markdown/external_issue_reference_filter_spec.rb
#	spec/lib/gitlab/markdown/external_link_filter_spec.rb
#	spec/lib/gitlab/markdown/issue_reference_filter_spec.rb
#	spec/lib/gitlab/markdown/label_reference_filter_spec.rb
#	spec/lib/gitlab/markdown/merge_request_reference_filter_spec.rb
#	spec/lib/gitlab/markdown/redactor_filter_spec.rb
#	spec/lib/gitlab/markdown/reference_gatherer_filter_spec.rb
#	spec/lib/gitlab/markdown/relative_link_filter_spec.rb
#	spec/lib/gitlab/markdown/sanitization_filter_spec.rb
#	spec/lib/gitlab/markdown/snippet_reference_filter_spec.rb
#	spec/lib/gitlab/markdown/syntax_highlight_filter_spec.rb
#	spec/lib/gitlab/markdown/table_of_contents_filter_spec.rb
#	spec/lib/gitlab/markdown/task_list_filter_spec.rb
#	spec/lib/gitlab/markdown/upload_link_filter_spec.rb
#	spec/lib/gitlab/markdown/user_reference_filter_spec.rb
2015-12-10 14:04:34 +01:00
Rubén Dávila 7e8fc48227 Normalize email when looking for GitLab users from commit info. #3854 2015-12-09 11:10:08 -05:00
Douwe Maan 926c3bef9f Merge branch 'master' into reference-pipeline-and-caching 2015-12-08 13:40:32 +01:00
Valery Sizov bd5fb1b479 Merge branch 'webhook_payload_with_changes' into 'master'
Add added, modified and removed properties to commit object in webhook

https://gitlab.com/gitlab-org/gitlab-ee/issues/20

See merge request !1988
2015-12-07 14:43:13 +00:00
Douwe Maan d611a38798 Merge branch 'master' into reference-pipeline-and-caching 2015-12-07 14:48:53 +01:00
Valery Sizov 3c97cbc74c fixes after review 2015-12-07 15:13:06 +02:00
Valery Sizov 5df2c4419c fox specs 2015-12-07 14:14:35 +02:00
Valery Sizov 5c1b49f494 Add added, modified and removed properties to commit object in webhook 2015-12-04 16:23:21 +02:00
Douwe Maan f3ea06eb7f Autolink first so we don't pick up numeric anchors as issue references. 2015-12-01 15:53:32 +01:00
Douwe Maan 62c14ba2ed Render commit reference using short sha, but include full sha in comment. 2015-12-01 12:58:45 +01:00
Douwe Maan d6a5b45c8e Recognize issue/MR/snippet/commit links as references. 2015-11-30 21:36:34 +01:00
Douwe Maan c746a1de4e Use faster, more appropriate pipeline for mentionable attributes 2015-10-22 15:40:02 +02:00
Douwe Maan 8710739e4e Correctly find last known blob for file deleted in MR. 2015-10-20 14:24:02 +02:00
Douwe Maan 95f0440a78 Merge branch 'master' into rs-redactor-filter 2015-10-15 11:26:58 +02:00
Douwe Maan 4a5b77188e Participable doesn't need to know about Mentionable 2015-10-14 16:20:11 +02:00
Kamil Trzcinski 914cfbd2f1 Implement Commit Status API 2015-10-12 11:53:49 +02:00
Robert Speicher e9b65a3e05 Only look up Commit authors/committers by email
- Removes looking up authors/committers by name
- Renames `User.find_for_commit` to `User.find_by_any_email`
2015-06-23 18:07:15 -04:00
Robert Speicher 33df3ed384 Add respond_to_missing? for Commit and Repository
As of Ruby 1.9, this is the correct way to handle `respond_to?` for
methods implemented by `method_missing`.

See https://robots.thoughtbot.com/always-define-respond-to-missing-when-overriding
2015-06-10 01:31:27 -04:00
Robert Speicher 1a9da9178c Surround Project.reference_pattern in parenthesis inside other patterns 2015-05-26 15:49:22 -04:00
Robert Speicher b88da58cb6 Add reference_pattern to Referable models 2015-05-26 15:48:32 -04:00
Robert Speicher 0359d41b06 Implement gfm_reference directly in Mentionable
Except for Note, which still overrides it.
2015-05-26 15:48:31 -04:00
Robert Speicher c0faf91ff2 Add to_reference for models that support references
Now there is a single source of information for which attribute a model
uses to be referenced, and its special character.
2015-05-26 15:48:30 -04:00
Robert Speicher 38cd3d6451 Add Commit#==
Prior, comparison would use the Ruby object's ID, which got out of sync
after a Spring fork and would result in erroneous test failures.

Now we just check that the compared object is a Commit and then compare
their underlying raw commit objects.
2015-05-26 15:48:29 -04:00
Douwe Maan e739eb036d Move participants method to shared Participable concern. 2015-04-24 12:30:36 +02:00
Douwe Maan 27af24c1c9 No longer needed to pass project argument to commit methods. 2015-04-24 12:29:36 +02:00
Douwe Maan 84a1590252 Let commit model know about its project. 2015-04-24 12:29:36 +02:00
Douwe Maan 630e879066 Clean up code somewhat. 2015-04-17 11:03:33 +02:00
Douwe Maan a9b04c4536 Fix Snippet#participants. 2015-04-15 18:59:01 +02:00
Douwe Maan 959ebbcade Clean up code around commit mentions. 2015-04-15 17:57:31 +02:00
Douwe Maan 5662b24132 Don't use HTML ellipsis in EmailsOnPush subject truncated commit message. 2015-04-14 16:32:11 +02:00
Douwe Maan e33ddfebf2 Refactor ClosingIssueExtractor. 2015-04-03 18:03:26 +02:00
Douwe Maan 65bb0c3406 Only allow users to cross-reference and close issues they have access to. 2015-04-02 10:57:01 +02:00
Douwe Maan d9698628d9 Add Commit#author and #committer. 2015-04-02 10:57:01 +02:00
Dmitriy Zaporozhets 647ff6240e Rubocop: Style/ElseAlignment enabled 2015-02-02 21:38:50 -08:00
Ciro Santilli cd688a6011 Replace regex methods by string ones since faster
and more readable.
2014-12-28 23:53:27 +01:00