<commit_before>import React from 'react';
import {graphql, createFragmentContainer} from 'react-relay';
import PropTypes from 'prop-types';

import Octicon from '../../atom/octicon';
import Timeago from '../timeago';
import GithubDotcomMarkdown from '../github-dotcom-markdown';

export class BareIssueCommentView extends React.Component {
  static propTypes = {
    switchToIssueish: PropTypes.func.isRequired,
    item: PropTypes.shape({
      author: PropTypes.shape({
        avatarUrl: PropTypes.string.isRequired,
        login: PropTypes.string.isRequired,
      }),
      bodyHTML: PropTypes.string.isRequired,
      createdAt: PropTypes.string.isRequired,
      url: PropTypes.string.isRequired,
    }).isRequired,
  }

  render() {
    const comment = this.props.item;
    const author = comment.author;

    return (
      <div className="issue timeline-item">
        <div className="info-row">
          <Octicon className="pre-timeline-item-icon" icon="comment" />
          {author &&
            <img className="author-avatar" src={author.avatarUrl}
              alt={comment.author.login} title={comment.author.login}
            />
          }
          <span className="comment-message-header">
            {author ? author.login : 'someone'} commented
            {' '}<a href={comment.url}><Timeago time={comment.createdAt} /></a>
          </span>
        </div>
        <GithubDotcomMarkdown html={comment.bodyHTML} switchToIssueish={this.props.switchToIssueish} />
      </div><commit_msg>Account for Ghost user in IssueCommentView<commit_after>import React from 'react';
import {graphql, createFragmentContainer} from 'react-relay';
import PropTypes from 'prop-types';

import Octicon from '../../atom/octicon';
import Timeago from '../timeago';
import GithubDotcomMarkdown from '../github-dotcom-markdown';
import {GHOST_USER} from '../helpers';

export class BareIssueCommentView extends React.Component {
  static propTypes = {
    switchToIssueish: PropTypes.func.isRequired,
    item: PropTypes.shape({
      author: PropTypes.shape({
        avatarUrl: PropTypes.string.isRequired,
        login: PropTypes.string.isRequired,
      }),
      bodyHTML: PropTypes.string.isRequired,
      createdAt: PropTypes.string.isRequired,
      url: PropTypes.string.isRequired,
    }).isRequired,
  }

  render() {
    const comment = this.props.item;

    if (comment.author === null) {
      comment.author = GHOST_USER;
    }

    return (
      <div className="issue timeline-item">
        <div className="info-row">
          <Octicon className="pre-timeline-item-icon" icon="comment" />
          <img className="author-avatar" src={comment.author.avatarUrl}
            alt={comment.author.login} title={comment.author.login}
          />
          <span className="comment-message-header">
            {comment.author} commented
            {' '}<a href={comment.url}><Timeago time={comment.createdAt} /></a>
          </span>
        </div>
        <GithubDotcomMarkdown html={comment.bodyHTML} switchToIssueish={this.props.switchToIssueish} />
      </div>
{'fraction_non_alphanumeric': 0.1324481865284974, 'fraction_numerical': 0.0, 'mean_word_length': 2.9300254452926207, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4815169', 'n_tokens_mistral': 876, 'n_tokens_neox': 874, 'n_words': 181}