Kamil Trzcinski
5d69f5b46d
Use Ci::Commit as Pipeline
2016-04-11 23:32:54 +02:00
Yorick Peterse
e7849b0b25
Memoize reference_pattern/link_reference_pattern
...
These methods are called quite often in loops so by memoizing their
output we can reduce timings a bit.
2016-04-01 11:13:30 +02:00
Rubén Dávila
f4a361a2a8
Sanitize commit title when creating revert commit.
2016-03-22 18:01:31 -05:00
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ávila
5ef3f80d41
More updates from the last code review.
2016-02-19 13:15:42 -05:00
Rubén Dávila
28aaef24ad
Don't use `self` when looking for cross-references!
2016-02-19 13:14:55 -05:00
Rubén Dávila
169070ba4b
Some updates from last code review.
2016-02-19 13:14:54 -05:00
Rubén Dávila
d34733efc4
Don't show revert button if commit/MR has already been reverted.
2016-02-19 13:14:54 -05:00
Rubén Dávila
be54ba33ed
Refactor commit message for revert commit.
2016-02-19 13:14:54 -05:00
Rubén Dávila
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 50595af7b0/app/helpers/application_helper.rb (L139)
2016-02-19 13:14:53 -05:00
Rubén Dávila
f088caca3b
Use a reference to the MR when reverting MRs.
2016-02-19 13:14:53 -05:00
Rubén Dávila
328b52d58a
Some updates after last code review.
2016-02-19 13:14:52 -05:00
Rubén Dávila
a28eef1d1a
Update copy and URLs used when reverting MRs.
2016-02-19 13:14:52 -05:00
Rubén Dávila
ef591b87d1
Fix commit message plus other little fix.
2016-02-19 13:14:51 -05:00
Rubén Dávila
91e6e32d13
Make it work for merge commits.
2016-02-19 13:14:51 -05:00
Rubén Dávila
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
Jeroen van Baarsen
4eb3c47d4e
Fixed a lot of already defined notices
...
Signed-off-by: Jeroen van Baarsen <jeroenvanbaarsen@gmail.com>
2014-12-14 15:13:09 +01:00
Dmitriy Zaporozhets
8c01448cf9
Dontr decoarate already decorated stuff
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-10 17:39:29 +03:00
Dmitriy Zaporozhets
ea04ed7879
Use 8chars short sha for commit in views
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-10 16:30:14 +03:00
Dmitriy Zaporozhets
200118357d
Use full commit sha width for reference in note body to prevent Ambiguous SHA1 prefix problem
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-10 15:44:27 +03:00
Dmitriy Zaporozhets
0189be0831
Use short_id instead of [0..N] for short version of commit sha
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-10-10 15:39:48 +03:00
Dmitriy Zaporozhets
03b44916ba
Merge pull request #7754 from Bugagazavr/hooks
...
More information in merge request hook
2014-10-03 13:37:19 +03:00
Ciro Santilli
2e9f5de868
Add parenthesis to function def with arguments.
2014-10-03 09:18:46 +02:00
Kirill Zaitsev
1c9d2e39c1
Hook attributes
2014-10-02 12:58:02 +04:00
Dmitriy Zaporozhets
3695ae185b
Decorate commit parents
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-09-25 12:19:26 +03:00
Dmitriy Zaporozhets
be5b6db883
Refactor diff suppress logic and diff views
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-07-15 18:28:21 +03:00
Jacob Vosmaer
3f1ece2690
Detect closing issues in Merge Request description
2014-06-13 17:25:44 +02:00
dosire
7795a4b90c
The hard limit should be a lot more liberal, 10x seems reasonable.
2014-05-28 15:08:27 +02:00
skv-headless
2c28dbd254
commit description in commit list
2014-02-25 18:23:23 +04:00
Dmitriy Zaporozhets
ca7e4a948b
Use new tags/branches from gitlab_git
...
Signed-off-by: Dmitriy Zaporozhets <dmitriy.zaporozhets@gmail.com>
2014-02-03 18:13:24 +02:00
Boyan Tabakov
01ff084a4d
Improved large commit handling.
...
Previously, only number of changed files mattered. Now, number of lines to render in the diff are also taken into account.
A hard limit is set, above which diffs are not rendered and users are not allowed to override that. This prevents high server
resource usage with huge commits.
Related to #1745 , #2259
In addition, handle large commits for MergeRequests and Compare controllers.
Also fixes a bug where diffs are loaded twice, if user goes directly to merge_requests/:id/diffs URL.
2013-09-07 14:44:03 +03:00
ash wilson
c8a115c0e3
Link issues from comments and automatically close them
...
Any mention of Issues, MergeRequests, or Commits via GitLab-flavored markdown
references in descriptions, titles, or attached Notes creates a back-reference
Note that links to the original referencer. Furthermore, pushing commits with
commit messages that match a (configurable) regexp to a project's default
branch will close any issues mentioned by GFM in the matched closing phrase.
If accepting a merge request would close any Issues in this way, a banner is
appended to the merge request's main panel to indicate this.
2013-08-25 18:58:41 -04:00
Dmitriy Zaporozhets
34c97a311c
Increase commit title limit at Commit#show so it does not truncate most of Merge messages
2013-08-12 22:28:31 +03:00
Dmitriy Zaporozhets
49b024f5f5
Use Gitlab::Git:: for git features across application
2013-04-01 16:04:35 +03:00
Dmitriy Zaporozhets
bbfbff3add
Extend models functionality with old decorator methods. Use Repository model
2013-03-31 23:48:12 +03:00
Dmitriy Zaporozhets
26323046fd
Decorate Gitlab::Git::Commit with Commit
2013-03-31 19:00:45 +03:00
Dmitriy Zaporozhets
154e54b46e
Remove grit logic from app/
2013-03-31 18:49:58 +03:00
Dmitriy Zaporozhets
5f9d654939
Dont show '0 additions and 0 deletions' message for commit
2013-03-21 22:50:18 +02:00
Dmitriy Zaporozhets
6347e9a60b
Dont load diff in compare over 100 commits
2013-03-20 10:19:00 +02:00
Dmitriy Zaporozhets
5a214ee6f1
Remove unused methods
2013-01-05 13:11:15 +02:00
Dmitriy Zaporozhets
e16cebac3e
Fixed styles, ProjectHook specs etc
2013-01-05 00:35:38 +02:00
Dmitriy Zaporozhets
14d0ef8f37
Show images preview in notes. Show line additions/deletions for commit
2013-01-04 22:13:32 +02:00
Dmitriy Zaporozhets
39ba934c0a
REpostiry, Team models
2013-01-03 21:09:18 +02:00
Dmitriy Zaporozhets
e6c0673ef1
Rspec models Milestone, Commit, UsersProject
2013-01-03 19:11:14 +02:00
Riyad Preukschas
5d1044c335
Fix Commit#to_diff
2012-12-22 20:36:33 +01:00
Koen Punt
6d93eafa6a
disabled sorting of commits before compare
2012-12-20 13:50:43 +01:00
Koen Punt
a09d938215
Flipping commit ids in commits_between, fixes #513
2012-12-20 13:31:09 +01:00
Riyad Preukschas
246faa3d7a
Add Commit#to_diff for raw diff
2012-11-22 20:49:01 +01:00
Saito
f1ac2a616b
remove encode lib, clean all encoded area.
2012-11-09 01:41:07 +08:00
Dmitriy Zaporozhets
6d0dcb6614
Reduce max commit diff size. Added Commit::DIFF_SAFE_SIZE
2012-10-25 12:16:14 +03:00
Robert Speicher
5e3be9cda0
Cache the value of safe_message
...
Also, just for extra paranoia, only call safe_message once in the
decorator methods
Adds specs to make sure it still works
2012-10-02 19:00:41 -04:00
Nihad Abbasov
841e4fbd08
cosmetical cleanup of models
2012-09-27 02:05:53 -07:00
Dmitriy Zaporozhets
4cc169d3ca
Improve commits compare. Added tags to autocomplete. Dont look for commits if from & to are empty
2012-09-21 11:22:53 +03:00
Robert Speicher
8db2a59d0b
Add StaticModel role, and add it to Commit model
...
Instead of doing this:
link_to(commit.id, project_commit_path(project, id: commit.id))
Note.create(noteable_id: commit.id, noteable_type: "Commit", ...)
It lets us do this:
link_to(commit.id, project_commit_path(project, commit))
Note.create(noteable: commit, ...)
2012-09-02 13:40:07 -04:00
Robert Speicher
7754189187
Fully embrace Ruby 1.9 hash syntax
...
Didn't bother with files in db/, config/, or features/
2012-08-10 18:25:15 -04:00
randx
0590aa9d60
commit.short_id as model method. Styled inline comment form
2012-07-27 11:22:05 +03:00
Dmitriy Zaporozhets
3063af5adc
BaseContext
...
Controllers refactoring with contexts
Move commit compare logic to model
2012-07-20 08:39:34 +03:00
randx
335f9d6410
New Feature: Diff patch file export for commit
2012-06-28 12:51:50 +03:00
randx
3272620f72
lib/ refactoring. Module Gitlabhq renamed to Gitlab
2012-05-26 13:37:49 +03:00
Dmitriy Zaporozhets
1b2068eaa9
Gem updates & githost logger
...
* Grit gem updated
* gitolite-client updated
* logger added
* few fixes
2012-05-21 23:17:41 +03:00
Demelziraptor
e5bbefc980
change find_or_first to work with default branch
2012-05-16 14:47:59 +01:00
Dmitriy Zaporozhets
1845429268
Use try for commit prev_commit_id detection
2012-04-19 23:35:35 +03:00
Dmitriy Zaporozhets
c0df0cd70c
Commit header improved. finalize PR 667
2012-04-16 01:10:09 +03:00
Arthur Schreiber
c530543c1a
Nicer commit headers.
2012-04-14 12:38:12 +02:00
Dmitriy Zaporozhets
b7558a2063
Removed encoding monkey patch
2012-04-11 23:03:56 +03:00
Dmitriy Zaporozhets
cd06d6edac
Project model refactored
2012-03-09 21:43:46 +02:00
Dmitriy Zaporozhets
1924de91c5
fixed compare for push
2012-02-29 23:34:06 +02:00
Dmitriy Zaporozhets
94db8a1c33
Usability & design improvements
2012-02-18 14:12:48 +02:00
Dmitriy Zaporozhets
8ebfae9a07
Merge branch 'bootstrap'
...
Conflicts:
Gemfile
app/views/commits/_commits.html.haml
app/views/projects/empty.html.haml
2012-01-30 00:45:35 +02:00
Dmitriy Zaporozhets
a77c8bf9c3
Bootstrap: Issues & MR
2012-01-29 12:04:09 +02:00
Dmitriy Zaporozhets
d81f0b7845
Bootstrap: Merge Request -> Show
2012-01-28 17:21:00 +02:00
Dmitriy Zaporozhets
0a4222fb98
Bootstrap: Activities
2012-01-28 16:47:55 +02:00
Dmitry Kalinkin
eb2a25f733
Added both committer and author display for commits list
2012-01-12 03:14:53 +04:00
Dmitriy Zaporozhets
0ebc610e49
Project activities perfomance increased. Cache for project activitites disabled. Repository conception changed
2012-01-04 08:17:41 +02:00
Saito
14023c4e5a
remove charencode.
2011-12-30 21:41:39 +08:00
Dmitriy Zaporozhets
79b64ef4ac
fixed merge request diff
2011-11-29 20:06:37 +02:00
Saito
46cbe54189
fix the issue on github #157 .
...
directly force_encoding is wrong,
must detect the file string's encoding.
then force_encoding the string to it's encoding.
last convert it to utf-8.
2011-11-28 17:46:41 +08:00
Dmitriy Zaporozhets
a031813887
Commit, network graph refactoring
2011-11-27 17:35:49 +02:00
Dmitriy Zaporozhets
4bf4efe712
decorators & tree model
2011-11-20 22:32:12 +02:00