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
a2e27e9d
Commit
a2e27e9d
authored
Jun 07, 2019
by
GitLab Bot
Browse files
Options
Browse Files
Download
Plain Diff
Automatic merge of gitlab-org/gitlab-ce master
parents
893211c6
3ef0c549
Changes
11
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
34 additions
and
16 deletions
+34
-16
app/helpers/emails_helper.rb
app/helpers/emails_helper.rb
+0
-6
app/models/diff_note.rb
app/models/diff_note.rb
+1
-1
app/services/preview_markdown_service.rb
app/services/preview_markdown_service.rb
+3
-1
app/views/notify/new_user_email.html.haml
app/views/notify/new_user_email.html.haml
+2
-1
app/views/notify/new_user_email.text.erb
app/views/notify/new_user_email.text.erb
+9
-2
changelogs/unreleased/58297-remove-extraneous-gitaly-calls-from-md-rendering.yml
...8297-remove-extraneous-gitaly-calls-from-md-rendering.yml
+5
-0
changelogs/unreleased/improve-email-text-part.yml
changelogs/unreleased/improve-email-text-part.yml
+5
-0
doc/api/merge_requests.md
doc/api/merge_requests.md
+1
-1
lib/gitlab/diff/suggestions_parser.rb
lib/gitlab/diff/suggestions_parser.rb
+4
-2
spec/services/preview_markdown_service_spec.rb
spec/services/preview_markdown_service_spec.rb
+3
-1
spec/services/suggestions/create_service_spec.rb
spec/services/suggestions/create_service_spec.rb
+1
-1
No files found.
app/helpers/emails_helper.rb
View file @
a2e27e9d
...
...
@@ -57,12 +57,6 @@ module EmailsHelper
pluralize
(
valid_length
,
unit
)
end
def
reset_token_expire_message
link_tag
=
link_to
(
'request a new one'
,
new_user_password_url
(
user_email:
@user
.
email
))
"This link is valid for
#{
password_reset_token_valid_time
}
. "
\
"After it expires, you can
#{
link_tag
}
."
end
def
header_logo
if
current_appearance
&
.
header_logo?
image_tag
(
...
...
app/models/diff_note.rb
View file @
a2e27e9d
...
...
@@ -90,7 +90,7 @@ class DiffNote < Note
end
def
banzai_render_context
(
field
)
super
.
merge
(
project:
project
,
suggestions_filter_enabled:
supports_suggestion?
)
super
.
merge
(
suggestions_filter_enabled:
true
)
end
private
...
...
app/services/preview_markdown_service.rb
View file @
a2e27e9d
...
...
@@ -38,7 +38,9 @@ class PreviewMarkdownService < BaseService
head_sha:
params
[
:head_sha
],
start_sha:
params
[
:start_sha
])
Gitlab
::
Diff
::
SuggestionsParser
.
parse
(
text
,
position:
position
,
project:
project
)
Gitlab
::
Diff
::
SuggestionsParser
.
parse
(
text
,
position:
position
,
project:
project
,
supports_suggestion:
params
[
:preview_suggestions
])
end
def
preview_sugestions?
...
...
app/views/notify/new_user_email.html.haml
View file @
a2e27e9d
...
...
@@ -13,4 +13,5 @@
%p
=
link_to
"Click here to set your password"
,
edit_password_url
(
@user
,
reset_password_token:
@token
)
%p
=
raw
reset_token_expire_message
This link is valid for
#{
password_reset_token_valid_time
}
.
After it expires, you can
#{
link_to
(
"request a new one"
,
new_user_password_url
(
user_email:
@user
.
email
))
}
.
app/views/notify/new_user_email.text.erb
View file @
a2e27e9d
Hi
<%=
sanitize_name
(
@user
.
name
)
%>
!
<%
if
Gitlab
::
CurrentSettings
.
allow_signup?
%>
Your account has been created successfully.
<%
else
%>
The Administrator created an account for you. Now you are a member of the company GitLab application.
<%
end
%>
login..................
<%=
@user
.
email
%>
<%
if
@user
.
created_by_id
%>
<%=
link_to
"Click here to set your password"
,
edit_password_url
(
@user
,
:reset_password_token
=>
@token
)
%>
Click here to set your password:
<%=
edit_password_url
(
@user
,
:reset_password_token
=>
@token
)
%>
<%=
reset_token_expire_message
%>
This link is valid for
<%=
password_reset_token_valid_time
%>
. After it expires, you can request a new one here:
<%=
new_user_password_url
(
user_email:
@user
.
email
)
%>
<%
end
%>
changelogs/unreleased/58297-remove-extraneous-gitaly-calls-from-md-rendering.yml
0 → 100644
View file @
a2e27e9d
---
title
:
Reduce Gitaly calls to improve performance when rendering suggestions
merge_request
:
29027
author
:
type
:
performance
changelogs/unreleased/improve-email-text-part.yml
0 → 100644
View file @
a2e27e9d
---
title
:
Improve new user email markup unconsistency between text and html parts
merge_request
:
29111
author
:
Haunui Saint-sevin
type
:
fixed
doc/api/merge_requests.md
View file @
a2e27e9d
...
...
@@ -1205,7 +1205,7 @@ Parameters:
## Returns the up to date merge-ref HEAD commit
Merge the changes between the merge request source and target branches into
`refs/merge-requests/:iid/merge`
Merge the changes between the merge request source and target branches into
`refs/merge-requests/:iid/merge`
ref, of the target project repository, if possible. This ref will have the state the target branch would have if
a regular merge action was taken.
...
...
lib/gitlab/diff/suggestions_parser.rb
View file @
a2e27e9d
...
...
@@ -10,10 +10,12 @@ module Gitlab
# Returns an array of Gitlab::Diff::Suggestion which represents each
# suggestion in the given text.
#
def
parse
(
text
,
position
:,
project
:)
def
parse
(
text
,
position
:,
project
:
,
supports_suggestion:
true
)
return
[]
unless
position
.
complete?
html
=
Banzai
.
render
(
text
,
project:
nil
,
no_original_data:
true
)
html
=
Banzai
.
render
(
text
,
project:
nil
,
no_original_data:
true
,
suggestions_filter_enabled:
supports_suggestion
)
doc
=
Nokogiri
::
HTML
(
html
)
suggestion_nodes
=
doc
.
search
(
'pre.suggestion'
)
...
...
spec/services/preview_markdown_service_spec.rb
View file @
a2e27e9d
...
...
@@ -56,7 +56,9 @@ describe PreviewMarkdownService do
expect
(
Gitlab
::
Diff
::
SuggestionsParser
)
.
to
receive
(
:parse
)
.
with
(
text
,
position:
position
,
project:
merge_request
.
project
)
.
with
(
text
,
position:
position
,
project:
merge_request
.
project
,
supports_suggestion:
true
)
.
and_call_original
result
=
service
.
execute
...
...
spec/services/suggestions/create_service_spec.rb
View file @
a2e27e9d
...
...
@@ -96,7 +96,7 @@ describe Suggestions::CreateService do
it
'creates no suggestion when diff file is not found'
do
expect_next_instance_of
(
DiffNote
)
do
|
diff_note
|
expect
(
diff_note
).
to
receive
(
:latest_diff_file
).
twi
ce
{
nil
}
expect
(
diff_note
).
to
receive
(
:latest_diff_file
).
on
ce
{
nil
}
end
expect
{
subject
.
execute
}.
not_to
change
(
Suggestion
,
:count
)
...
...
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