BigW Consortium Gitlab
Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
G
gitlab-ce
Project
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Commits
Issue Boards
Open sidebar
Forest Godfrey
gitlab-ce
Commits
a69249d9
Commit
a69249d9
authored
Nov 14, 2014
by
Dmitriy Zaporozhets
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'author_attributes_clean' into 'master'
Author attributes clean See merge request !1254
parents
7e3f49ba
ced24383
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
commits_helper.rb
app/helpers/commits_helper.rb
+6
-2
No files found.
app/helpers/commits_helper.rb
View file @
a69249d9
...
...
@@ -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