Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gitlab-ce
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
1
Merge Requests
1
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
nexedi
gitlab-ce
Commits
0a4f1e40
Commit
0a4f1e40
authored
May 14, 2017
by
Luke "Jared" Bennett
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Apply CE rename-rendered-title patch to EE
parent
ad77cdb9
Changes
7
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
11 additions
and
11 deletions
+11
-11
app/controllers/projects/issues_controller.rb
app/controllers/projects/issues_controller.rb
+3
-3
app/models/issue.rb
app/models/issue.rb
+1
-1
app/views/projects/issues/show.html.haml
app/views/projects/issues/show.html.haml
+1
-1
config/routes/project.rb
config/routes/project.rb
+1
-1
lib/gitlab/etag_caching/router.rb
lib/gitlab/etag_caching/router.rb
+3
-3
spec/javascripts/issue_show/issue_title_description_spec.js
spec/javascripts/issue_show/issue_title_description_spec.js
+1
-1
spec/lib/gitlab/etag_caching/router_spec.rb
spec/lib/gitlab/etag_caching/router_spec.rb
+1
-1
No files found.
app/controllers/projects/issues_controller.rb
View file @
0a4f1e40
...
@@ -11,10 +11,10 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -11,10 +11,10 @@ class Projects::IssuesController < Projects::ApplicationController
before_action
:redirect_to_external_issue_tracker
,
only:
[
:index
,
:new
]
before_action
:redirect_to_external_issue_tracker
,
only:
[
:index
,
:new
]
before_action
:module_enabled
before_action
:module_enabled
before_action
:issue
,
only:
[
:edit
,
:update
,
:show
,
:referenced_merge_requests
,
before_action
:issue
,
only:
[
:edit
,
:update
,
:show
,
:referenced_merge_requests
,
:related_branches
,
:can_create_branch
,
:re
ndered_title
,
:create_merge_request
]
:related_branches
,
:can_create_branch
,
:re
altime_changes
,
:create_merge_request
]
# Allow read any issue
# Allow read any issue
before_action
:authorize_read_issue!
,
only:
[
:show
,
:re
ndered_title
]
before_action
:authorize_read_issue!
,
only:
[
:show
,
:re
altime_changes
]
# Allow write(create) issue
# Allow write(create) issue
before_action
:authorize_create_issue!
,
only:
[
:new
,
:create
]
before_action
:authorize_create_issue!
,
only:
[
:new
,
:create
]
...
@@ -207,7 +207,7 @@ class Projects::IssuesController < Projects::ApplicationController
...
@@ -207,7 +207,7 @@ class Projects::IssuesController < Projects::ApplicationController
end
end
end
end
def
re
ndered_title
def
re
altime_changes
Gitlab
::
PollingInterval
.
set_header
(
response
,
interval:
3_000
)
Gitlab
::
PollingInterval
.
set_header
(
response
,
interval:
3_000
)
render
json:
{
render
json:
{
...
...
app/models/issue.rb
View file @
0a4f1e40
...
@@ -312,7 +312,7 @@ class Issue < ActiveRecord::Base
...
@@ -312,7 +312,7 @@ class Issue < ActiveRecord::Base
end
end
def
expire_etag_cache
def
expire_etag_cache
key
=
Gitlab
::
Routing
.
url_helpers
.
re
ndered_title
_namespace_project_issue_path
(
key
=
Gitlab
::
Routing
.
url_helpers
.
re
altime_changes
_namespace_project_issue_path
(
project
.
namespace
,
project
.
namespace
,
project
,
project
,
self
self
...
...
app/views/projects/issues/show.html.haml
View file @
0a4f1e40
...
@@ -51,7 +51,7 @@
...
@@ -51,7 +51,7 @@
.issue-details.issuable-details
.issue-details.issuable-details
.detail-page-description.content-block
{
class:
(
'hide-bottom-border'
unless
@issue
.
description
.
present?
)
}
.detail-page-description.content-block
{
class:
(
'hide-bottom-border'
unless
@issue
.
description
.
present?
)
}
.issue-title-data.hidden
{
"data"
=>
{
"endpoint"
=>
re
ndered_title
_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
.issue-title-data.hidden
{
"data"
=>
{
"endpoint"
=>
re
altime_changes
_namespace_project_issue_path
(
@project
.
namespace
,
@project
,
@issue
),
"can-update-tasks-class"
=>
can?
(
current_user
,
:update_issue
,
@issue
)
?
'js-task-list-container'
:
''
,
"can-update-tasks-class"
=>
can?
(
current_user
,
:update_issue
,
@issue
)
?
'js-task-list-container'
:
''
,
}
}
}
}
.issue-title-entrypoint
.issue-title-entrypoint
...
...
config/routes/project.rb
View file @
0a4f1e40
...
@@ -273,7 +273,7 @@ constraints(ProjectUrlConstrainer.new) do
...
@@ -273,7 +273,7 @@ constraints(ProjectUrlConstrainer.new) do
get
:referenced_merge_requests
get
:referenced_merge_requests
get
:related_branches
get
:related_branches
get
:can_create_branch
get
:can_create_branch
get
:re
ndered_title
get
:re
altime_changes
post
:create_merge_request
post
:create_merge_request
end
end
collection
do
collection
do
...
...
lib/gitlab/etag_caching/router.rb
View file @
0a4f1e40
...
@@ -7,8 +7,8 @@ module Gitlab
...
@@ -7,8 +7,8 @@ module Gitlab
# - Don't contain a reserved word (expect for the words used in the
# - Don't contain a reserved word (expect for the words used in the
# regex itself)
# regex itself)
# - Ending in `noteable/issue/<id>/notes` for the `issue_notes` route
# - Ending in `noteable/issue/<id>/notes` for the `issue_notes` route
# - Ending in `issues/id`/re
ndered_title
` for the `issue_title` route
# - Ending in `issues/id`/re
altime_changes
` for the `issue_title` route
USED_IN_ROUTES
=
%w[noteable issue notes issues re
ndered_title
USED_IN_ROUTES
=
%w[noteable issue notes issues re
altime_changes
commit pipelines merge_requests new]
.
freeze
commit pipelines merge_requests new]
.
freeze
RESERVED_WORDS
=
DynamicPathValidator
::
WILDCARD_ROUTES
-
USED_IN_ROUTES
RESERVED_WORDS
=
DynamicPathValidator
::
WILDCARD_ROUTES
-
USED_IN_ROUTES
RESERVED_WORDS_REGEX
=
Regexp
.
union
(
*
RESERVED_WORDS
)
RESERVED_WORDS_REGEX
=
Regexp
.
union
(
*
RESERVED_WORDS
)
...
@@ -18,7 +18,7 @@ module Gitlab
...
@@ -18,7 +18,7 @@ module Gitlab
'issue_notes'
'issue_notes'
),
),
Gitlab
::
EtagCaching
::
Router
::
Route
.
new
(
Gitlab
::
EtagCaching
::
Router
::
Route
.
new
(
%r(^(?!.*(
#{
RESERVED_WORDS_REGEX
}
)).*/issues/
\d
+/re
ndered_title
\z
)
,
%r(^(?!.*(
#{
RESERVED_WORDS_REGEX
}
)).*/issues/
\d
+/re
altime_changes
\z
)
,
'issue_title'
'issue_title'
),
),
Gitlab
::
EtagCaching
::
Router
::
Route
.
new
(
Gitlab
::
EtagCaching
::
Router
::
Route
.
new
(
...
...
spec/javascripts/issue_show/issue_title_description_spec.js
View file @
0a4f1e40
...
@@ -35,7 +35,7 @@ describe('Issue Title', () => {
...
@@ -35,7 +35,7 @@ describe('Issue Title', () => {
const
issueShowComponent
=
new
IssueTitleDescriptionComponent
({
const
issueShowComponent
=
new
IssueTitleDescriptionComponent
({
propsData
:
{
propsData
:
{
canUpdateIssue
:
'
.css-stuff
'
,
canUpdateIssue
:
'
.css-stuff
'
,
endpoint
:
'
/gitlab-org/gitlab-shell/issues/9/re
ndered_title
'
,
endpoint
:
'
/gitlab-org/gitlab-shell/issues/9/re
altime_changes
'
,
},
},
}).
$mount
();
}).
$mount
();
...
...
spec/lib/gitlab/etag_caching/router_spec.rb
View file @
0a4f1e40
...
@@ -14,7 +14,7 @@ describe Gitlab::EtagCaching::Router do
...
@@ -14,7 +14,7 @@ describe Gitlab::EtagCaching::Router do
it
'matches issue title endpoint'
do
it
'matches issue title endpoint'
do
env
=
build_env
(
env
=
build_env
(
'/my-group/my-project/issues/123/re
ndered_title
'
'/my-group/my-project/issues/123/re
altime_changes
'
)
)
result
=
described_class
.
match
(
env
)
result
=
described_class
.
match
(
env
)
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment