<commit_before>import * as React from 'react'

import { Commit } from '../../models/commit'
import { RichText } from '../lib/rich-text'
import { RelativeTime } from '../relative-time'
import { Button } from '../lib/button'

interface IUndoCommitProps {
  /** The function to call when the Undo button is clicked. */
  readonly onUndo: () => void

  /** The commit to undo. */
  readonly commit: Commit

  /** The emoji cache to use when rendering the commit message */
  readonly emoji: Map<string, string>

  /** whether a push, pull or fetch is in progress */
  readonly isPushPullFetchInProgress: boolean
}

/** The Undo Commit component. */
export class UndoCommit extends React.Component<IUndoCommitProps, void> {
  public render() {
    const disabled = this.props.isPushPullFetchInProgress
    const title = disabled ? 'Undo is disabled while the repository is being updated' : undefined

    const authorDate = this.props.commit.author.date
    return (
      <div id='undo-commit'>
        <div className='commit-info'>
          <div className='ago'>Committed <RelativeTime date={authorDate} /></div>
          <RichText
            emoji={this.props.emoji}
            className='summary'
            text={this.props.commit.summary} />
        </div>
        <div className='actions' title={title}>
          <Button size='small' disabled={disabled} onClick={this.props.onUndo}>Undo</Button>
        </div>
      </div>
    )
  }
}<commit_msg>Disable URL becomming links in undo<commit_after>import * as React from 'react'

import { Commit } from '../../models/commit'
import { RichText } from '../lib/rich-text'
import { RelativeTime } from '../relative-time'
import { Button } from '../lib/button'

interface IUndoCommitProps {
  /** The function to call when the Undo button is clicked. */
  readonly onUndo: () => void

  /** The commit to undo. */
  readonly commit: Commit

  /** The emoji cache to use when rendering the commit message */
  readonly emoji: Map<string, string>

  /** whether a push, pull or fetch is in progress */
  readonly isPushPullFetchInProgress: boolean
}

/** The Undo Commit component. */
export class UndoCommit extends React.Component<IUndoCommitProps, void> {
  public render() {
    const disabled = this.props.isPushPullFetchInProgress
    const title = disabled ? 'Undo is disabled while the repository is being updated' : undefined

    const authorDate = this.props.commit.author.date
    return (
      <div id='undo-commit'>
        <div className='commit-info'>
          <div className='ago'>Committed <RelativeTime date={authorDate} /></div>
          <RichText
            emoji={this.props.emoji}
            className='summary'
            text={this.props.commit.summary}
            renderUrlsAsLinks={false} />
        </div>
        <div className='actions' title={title}>
          <Button size='small' disabled={disabled} onClick={this.props.onUndo}>Undo</Button>
        </div>
      </div>
    )
  }
}
{'fraction_non_alphanumeric': 0.12558922558922558, 'fraction_numerical': 0.0, 'mean_word_length': 2.9040735873850196, 'pattern_counts': {'":': 0, '<': 31, '<?xml version=': 0, '>': 33, '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': '227595', 'n_tokens_mistral': 835, 'n_tokens_neox': 826, 'n_words': 254}