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
ced24383
Commit
ced24383
authored
Nov 14, 2014
by
Marin Jankovski
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Clean the string with commit author and email.
parent
4e65d085
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
app/helpers/commits_helper.rb
app/helpers/commits_helper.rb
+6
-2
No files found.
app/helpers/commits_helper.rb
View file @
ced24383
...
...
@@ -87,8 +87,8 @@ module CommitsHelper
# avatar: true will prepend the avatar image
# size: size of the avatar image in px
def
commit_person_link
(
commit
,
options
=
{})
source_name
=
c
ommit
.
send
"
#{
options
[
:source
]
}
_name"
.
to_sym
source_email
=
c
ommit
.
send
"
#{
options
[
:source
]
}
_email"
.
to_sym
source_name
=
c
lean
(
commit
.
send
"
#{
options
[
:source
]
}
_name"
.
to_sym
)
source_email
=
c
lean
(
commit
.
send
"
#{
options
[
:source
]
}
_email"
.
to_sym
)
user
=
User
.
find_for_commit
(
source_email
,
source_name
)
person_name
=
user
.
nil?
?
source_name
:
user
.
name
...
...
@@ -124,4 +124,8 @@ module CommitsHelper
def
truncate_sha
(
sha
)
Commit
.
truncate_sha
(
sha
)
end
def
clean
(
string
)
Sanitize
.
clean
(
string
,
remove_contents:
true
)
end
end
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