<commit_before>import * as React from 'react'
import { Commit } from '../../models/commit'
import { EmojiText } from '../lib/emoji-text'
import { RelativeTime } from '../relative-time'

const DefaultAvatarURL = 'https://github.com/hubot.png'

interface ICommitProps {
  readonly commit: Commit
  readonly avatarURL: string | null
  readonly emoji: Map<string, string>
}

/** A component which displays a single commit in a commit list. */
export class CommitListItem extends React.Component<ICommitProps, void> {
  public render() {
    const authorDate = this.props.commit.author.date
    const avatarURL = this.props.avatarURL || DefaultAvatarURL
    return (
      <div className='commit'>
        <img className='avatar' src={avatarURL}/>
        <div className='info'>
          <EmojiText className='summary' emoji={this.props.emoji}>{this.props.commit.summary}</EmojiText>
          <div className='byline'>
            <RelativeTime date={authorDate} /> by {this.props.commit.author.name}
          </div>
        </div>
      </div>
    )
  }

  public shouldComponentUpdate(nextProps: ICommitProps): boolean {
    return (
      this.props.commit.sha !== nextProps.commit.sha ||
      this.props.avatarURL !== nextProps.avatarURL
    )
  }
}
<commit_msg>Changed component to accept a GitHubUser<commit_after>import * as React from 'react'
import { Commit } from '../../models/commit'
import { EmojiText } from '../lib/emoji-text'
import { IGitHubUser } from '../../lib/dispatcher'
import { Avatar } from '../../lib/avatar'
import { RelativeTime } from '../relative-time'

interface ICommitProps {
  readonly commit: Commit
  readonly user: IGitHubUser | null
  readonly emoji: Map<string, string>
}

/** A component which displays a single commit in a commit list. */
export class CommitListItem extends React.Component<ICommitProps, void> {
  public render() {
    const authorDate = this.props.commit.author.date

    return (
      <div className='commit'>
        <Avatar user={this.props.user}/>
        <div className='info'>
          <EmojiText className='summary' emoji={this.props.emoji}>{this.props.commit.summary}</EmojiText>
          <div className='byline'>
            <RelativeTime date={authorDate} /> by {this.props.commit.author.name}
          </div>
        </div>
      </div>
    )
  }

  public shouldComponentUpdate(nextProps: ICommitProps): boolean {
    return (
      this.props.commit.sha !== nextProps.commit.sha ||
      this.props.user !== nextProps.user
    )
  }
}

{'fraction_non_alphanumeric': 0.13585657370517928, 'fraction_numerical': 0.0, 'mean_word_length': 3.05, 'pattern_counts': {'":': 0, '<': 27, '<?xml version=': 0, '>': 27, 'https://': 1, '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': '116669', 'n_tokens_mistral': 739, 'n_tokens_neox': 748, 'n_words': 181}