Открыть боковую панель
nt_test133
nt_project_uxpg8lvcuq8w
Коммиты
5ae49398
Коммит
5ae49398
создал
Апр 01, 2016
по автору
Rémy Coutable
Просмотр файлов
Merge branch 'master' of
https://gitlab.com/gitlab-org/gitlab-ce
владельцы
8df0653e
5627542f
Изменения
27
Скрыть пробелы
Построчно
Рядом
app/models/commit.rb
Просмотр файла @
5ae49398
...
...
@@ -74,14 +74,14 @@ def self.reference_prefix
#
# This pattern supports cross-project references.
def
self
.
reference_pattern
%r{
@reference_pattern
||=
%r{
(?:
#{
Project
.
reference_pattern
}#{
reference_prefix
}
)?
(?<commit>
\h
{7,40})
}x
end
def
self
.
link_reference_pattern
super
(
"commit"
,
/(?<commit>\h{7,40})/
)
@link_reference_pattern
||=
super
(
"commit"
,
/(?<commit>\h{7,40})/
)
end
def
to_reference
(
from_project
=
nil
)
...
...
app/models/commit_range.rb
Просмотр файла @
5ae49398
...
...
@@ -43,14 +43,14 @@ def self.reference_prefix
#
# This pattern supports cross-project references.
def
self
.
reference_pattern
%r{
@reference_pattern
||=
%r{
(?:
#{
Project
.
reference_pattern
}#{
reference_prefix
}
)?
(?<commit_range>
#{
STRICT_PATTERN
}
)
}x
end
def
self
.
link_reference_pattern
super
(
"compare"
,
/(?<commit_range>
#{
PATTERN
}
)/
)
@link_reference_pattern
||=
super
(
"compare"
,
/(?<commit_range>
#{
PATTERN
}
)/
)
end
# Initialize a CommitRange
...
...
app/models/external_issue.rb
Просмотр файла @
5ae49398
...
...
@@ -31,7 +31,7 @@ def project
# Pattern used to extract `JIRA-123` issue references from text
def
self
.
reference_pattern
%r{(?<issue>
\b
([A-Z][A-Z0-9_]+-)
\d
+)}
@reference_pattern
||=
%r{(?<issue>
\b
([A-Z][A-Z0-9_]+-)
\d
+)}
end
def
to_reference
(
_from_project
=
nil
)
...
...
app/models/issue.rb
Просмотр файла @
5ae49398
...
...
@@ -73,14 +73,14 @@ def self.reference_prefix
#
# This pattern supports cross-project references.
def
self
.
reference_pattern
%r{
@reference_pattern
||=
%r{
(
#{
Project
.
reference_pattern
}
)?
#{
Regexp
.
escape
(
reference_prefix
)
}
(?<issue>
\d
+)
}x
end
def
self
.
link_reference_pattern
super
(
"issues"
,
/(?<issue>\d+)/
)
@link_reference_pattern
||=
super
(
"issues"
,
/(?<issue>\d+)/
)
end
def
to_reference
(
from_project
=
nil
)
...
...
app/models/label.rb
Просмотр файла @
5ae49398
...
...
@@ -56,7 +56,7 @@ def self.reference_prefix
# This pattern supports cross-project references.
#
def
self
.
reference_pattern
%r{
@reference_pattern
||=
%r{
(
#{
Project
.
reference_pattern
}
)?
#{
Regexp
.
escape
(
reference_prefix
)
}
(?:
...
...
app/models/merge_request.rb
Просмотр файла @
5ae49398
...
...
@@ -149,14 +149,14 @@ def self.reference_prefix
#
# This pattern supports cross-project references.
def
self
.
reference_pattern
%r{
@reference_pattern
||=
%r{
(
#{
Project
.
reference_pattern
}
)?
#{
Regexp
.
escape
(
reference_prefix
)
}
(?<merge_request>
\d
+)
}x
end
def
self
.
link_reference_pattern
super
(
"merge_requests"
,
/(?<merge_request>\d+)/
)
@link_reference_pattern
||=
super
(
"merge_requests"
,
/(?<merge_request>\d+)/
)
end
# Returns all the merge requests from an ActiveRecord:Relation.
...
...
app/models/milestone.rb
Просмотр файла @
5ae49398
...
...
@@ -79,7 +79,7 @@ def self.reference_pattern
end
def
self
.
link_reference_pattern
super
(
"milestones"
,
/(?<milestone>\d+)/
)
@link_reference_pattern
||=
super
(
"milestones"
,
/(?<milestone>\d+)/
)
end
def
self
.
upcoming
...
...
@@ -89,7 +89,7 @@ def self.upcoming
def
to_reference
(
from_project
=
nil
)
escaped_title
=
self
.
title
.
gsub
(
"]"
,
"
\\
]"
)
h
=
Gitlab
::
Application
.
routes
.
url_helpers
h
=
Gitlab
::
Routing
.
url_helpers
url
=
h
.
namespace_project_milestone_url
(
self
.
project
.
namespace
,
self
.
project
,
self
)
"[
#{
escaped_title
}
](
#{
url
}
)"
...
...
app/models/project.rb
Просмотр файла @
5ae49398
...
...
@@ -471,7 +471,7 @@ def to_reference(_from_project = nil)
end
def
web_url
Gitlab
::
Application
.
routes
.
url_helpers
.
namespace_project_url
(
self
.
namespace
,
self
)
Gitlab
::
Routing
.
url_helpers
.
namespace_project_url
(
self
.
namespace
,
self
)
end
def
web_url_without_protocol
...
...
@@ -592,7 +592,7 @@ def avatar_url
if
avatar
.
present?
[
gitlab_config
.
url
,
avatar
.
url
].
join
elsif
avatar_in_git
Gitlab
::
Application
.
routes
.
url_helpers
.
namespace_project_avatar_url
(
namespace
,
self
)
Gitlab
::
Routing
.
url_helpers
.
namespace_project_avatar_url
(
namespace
,
self
)
end
end
...
...
app/models/project_services/gitlab_issue_tracker_service.rb
Просмотр файла @
5ae49398
...
...
@@ -20,7 +20,7 @@
#
class
GitlabIssueTrackerService
<
IssueTrackerService
include
Gitlab
::
Application
.
routes
.
url_helpers
include
Gitlab
::
Routing
.
url_helpers
prop_accessor
:title
,
:description
,
:project_url
,
:issues_url
,
:new_issue_url
...
...
app/models/project_services/jira_service.rb
Просмотр файла @
5ae49398
...
...
@@ -21,7 +21,7 @@
class
JiraService
<
IssueTrackerService
include
HTTParty
include
Gitlab
::
Application
.
routes
.
url_helpers
include
Gitlab
::
Routing
.
url_helpers
DEFAULT_API_VERSION
=
2
...
...
app/models/snippet.rb
Просмотр файла @
5ae49398
...
...
@@ -56,14 +56,14 @@ def self.reference_prefix
#
# This pattern supports cross-project references.
def
self
.
reference_pattern
%r{
@reference_pattern
||=
%r{
(
#{
Project
.
reference_pattern
}
)?
#{
Regexp
.
escape
(
reference_prefix
)
}
(?<snippet>
\d
+)
}x
end
def
self
.
link_reference_pattern
super
(
"snippets"
,
/(?<snippet>\d+)/
)
@link_reference_pattern
||=
super
(
"snippets"
,
/(?<snippet>\d+)/
)
end
def
to_reference
(
from_project
=
nil
)
...
...
app/services/system_note_service.rb
Просмотр файла @
5ae49398
...
...
@@ -224,7 +224,7 @@ def self.change_branch_presence(noteable, project, author, branch_type, branch,
#
# "Started branch `issue-branch-button-201`"
def
self
.
new_issue_branch
(
issue
,
project
,
author
,
branch
)
h
=
Gitlab
::
Application
.
routes
.
url_helpers
h
=
Gitlab
::
Routing
.
url_helpers
link
=
h
.
namespace_project_compare_url
(
project
.
namespace
,
project
,
from:
project
.
default_branch
,
to:
branch
)
body
=
"Started branch [`
#{
branch
}
`](
#{
link
}
)"
...
...
lib/api/entities.rb
Просмотр файла @
5ae49398
...
...
@@ -8,7 +8,7 @@ class UserBasic < UserSafe
expose
:id
,
:state
,
:avatar_url
expose
:web_url
do
|
user
,
options
|
Gitlab
::
Application
.
routes
.
url_helpers
.
user_url
(
user
)
Gitlab
::
Routing
.
url_helpers
.
user_url
(
user
)
end
end
...
...
@@ -89,7 +89,7 @@ class Group < Grape::Entity
expose
:avatar_url
expose
:web_url
do
|
group
,
options
|
Gitlab
::
Application
.
routes
.
url_helpers
.
group_url
(
group
)
Gitlab
::
Routing
.
url_helpers
.
group_url
(
group
)
end
end
...
...
lib/banzai/filter/commit_range_reference_filter.rb
Просмотр файла @
5ae49398
...
...
@@ -43,7 +43,7 @@ def find_object(*args)
end
def
url_for_object
(
range
,
project
)
h
=
Gitlab
::
Application
.
routes
.
url_helpers
h
=
Gitlab
::
Routing
.
url_helpers
h
.
namespace_project_compare_url
(
project
.
namespace
,
project
,
range
.
to_param
.
merge
(
only_path:
context
[
:only_path
]))
end
...
...
lib/banzai/filter/commit_reference_filter.rb
Просмотр файла @
5ae49398
...
...
@@ -37,7 +37,7 @@ def find_object(*args)
end
def
url_for_object
(
commit
,
project
)
h
=
Gitlab
::
Application
.
routes
.
url_helpers
h
=
Gitlab
::
Routing
.
url_helpers
h
.
namespace_project_commit_url
(
project
.
namespace
,
project
,
commit
,
only_path:
context
[
:only_path
])
end
...
...
lib/banzai/filter/label_reference_filter.rb
Просмотр файла @
5ae49398
...
...
@@ -31,7 +31,7 @@ def references_in(text, pattern = Label.reference_pattern)
end
def
url_for_object
(
label
,
project
)
h
=
Gitlab
::
Application
.
routes
.
url_helpers
h
=
Gitlab
::
Routing
.
url_helpers
h
.
namespace_project_issues_url
(
project
.
namespace
,
project
,
label_name:
label
.
name
,
only_path:
context
[
:only_path
])
end
...
...
lib/banzai/filter/merge_request_reference_filter.rb
Просмотр файла @
5ae49398
...
...
@@ -14,7 +14,7 @@ def find_object(project, id)
end
def
url_for_object
(
mr
,
project
)
h
=
Gitlab
::
Application
.
routes
.
url_helpers
h
=
Gitlab
::
Routing
.
url_helpers
h
.
namespace_project_merge_request_url
(
project
.
namespace
,
project
,
mr
,
only_path:
context
[
:only_path
])
end
...
...
lib/banzai/filter/milestone_reference_filter.rb
Просмотр файла @
5ae49398
...
...
@@ -11,7 +11,7 @@ def find_object(project, id)
end
def
url_for_object
(
issue
,
project
)
h
=
Gitlab
::
Application
.
routes
.
url_helpers
h
=
Gitlab
::
Routing
.
url_helpers
h
.
namespace_project_milestone_url
(
project
.
namespace
,
project
,
milestone
,
only_path:
context
[
:only_path
])
end
...
...
lib/banzai/filter/snippet_reference_filter.rb
Просмотр файла @
5ae49398
...
...
@@ -14,7 +14,7 @@ def find_object(project, id)
end
def
url_for_object
(
snippet
,
project
)
h
=
Gitlab
::
Application
.
routes
.
url_helpers
h
=
Gitlab
::
Routing
.
url_helpers
h
.
namespace_project_snippet_url
(
project
.
namespace
,
project
,
snippet
,
only_path:
context
[
:only_path
])
end
...
...
lib/banzai/filter/user_reference_filter.rb
Просмотр файла @
5ae49398
...
...
@@ -90,7 +90,7 @@ def user_link_filter(text, link_text: nil)
private
def
urls
Gitlab
::
Application
.
routes
.
url_helpers
Gitlab
::
Routing
.
url_helpers
end
def
link_class
...
...
Пред
1
2
След
Редактирование
Предварительный просмотр
Поддерживает Markdown
0%
Попробовать снова
или
прикрепить новый файл
.
Отмена
You are about to add
0
people
to the discussion. Proceed with caution.
Сначала завершите редактирование этого сообщения!
Отмена
Пожалуйста,
зарегистрируйтесь
или
войдите
чтобы прокомментировать