mirror of
https://github.com/zhigang1992/devhub.git
synced 2026-06-19 17:53:57 +08:00
Remove [bot] from issue/pr author username
This commit is contained in:
@@ -68,12 +68,15 @@ export const IssueOrPullRequestRow = React.memo(
|
||||
title: _title,
|
||||
url,
|
||||
userLinkURL,
|
||||
username,
|
||||
username: _username,
|
||||
} = props
|
||||
|
||||
const title = trimNewLinesAndSpaces(_title)
|
||||
if (!title) return null
|
||||
|
||||
const isBot = Boolean(_username && _username.indexOf('[bot]') >= 0)
|
||||
const username = isBot ? _username.replace('[bot]', '') : _username
|
||||
|
||||
const byText = username ? `@${username}` : ''
|
||||
|
||||
return (
|
||||
@@ -92,7 +95,7 @@ export const IssueOrPullRequestRow = React.memo(
|
||||
{Boolean(username) && (
|
||||
<Avatar
|
||||
avatarURL={avatarURL}
|
||||
isBot={Boolean(username && username.indexOf('[bot]') >= 0)}
|
||||
isBot={isBot}
|
||||
linkURL={userLinkURL}
|
||||
small
|
||||
style={cardStyles.avatar}
|
||||
|
||||
Reference in New Issue
Block a user