<commit_before>import { APIRefState } from '../lib/api'
import { GitHubRepository } from './github-repository'

export class PullRequestRef {
  /** The name of the ref. */
  public readonly ref: string

  /** The SHA of the ref. */
  public readonly sha: string

  /**
   * The GitHub repository in which this ref lives. It could be null if the
   * repository was deleted after the PR was opened.
   */
  public readonly gitHubRepository: GitHubRepository | null

  public constructor(
    ref: string,
    sha: string,
    gitHubRepository: GitHubRepository | null
  ) {
    this.ref = ref
    this.sha = sha
    this.gitHubRepository = gitHubRepository
  }
}

/** The commit status and metadata for a given ref */
export interface ICombinedRefStatus {
  readonly id: number
  readonly state: APIRefState
}

export class PullRequestStatus {
  /** The pull request this status is associated with */
  public readonly pullRequestNumber: number

  /** The status' state. */
  public readonly state: APIRefState

  /** The number of statuses represented in this combined status. */
  public readonly totalCount: number

  /** The SHA for which this status applies. */
  public readonly sha: string

  /** The list of all statuses for a specific ref. */
  public readonly statuses: ReadonlyArray<ICombinedRefStatus>

  public constructor(
    pullRequestNumber: number,
    state: APIRefState,
    totalCount: number,
    sha: string,
    statuses: ReadonlyArray<ICombinedRefStatus><commit_msg>Come up with better name<commit_after>import { APIRefState } from '../lib/api'
import { GitHubRepository } from './github-repository'

export class PullRequestRef {
  /** The name of the ref. */
  public readonly ref: string

  /** The SHA of the ref. */
  public readonly sha: string

  /**
   * The GitHub repository in which this ref lives. It could be null if the
   * repository was deleted after the PR was opened.
   */
  public readonly gitHubRepository: GitHubRepository | null

  public constructor(
    ref: string,
    sha: string,
    gitHubRepository: GitHubRepository | null
  ) {
    this.ref = ref
    this.sha = sha
    this.gitHubRepository = gitHubRepository
  }
}

/** The commit status and metadata for a given ref */
export interface ICommitStatus {
  readonly id: number
  readonly state: APIRefState
}

export class PullRequestStatus {
  /** The pull request this status is associated with */
  public readonly pullRequestNumber: number

  /** The status' state. */
  public readonly state: APIRefState

  /** The number of statuses represented in this combined status. */
  public readonly totalCount: number

  /** The SHA for which this status applies. */
  public readonly sha: string

  /** The list of all statuses for a specific ref. */
  public readonly statuses: ReadonlyArray<ICommitStatus>

  public constructor(
    pullRequestNumber: number,
    state: APIRefState,
    totalCount: number,
    sha: string,
    statuses: ReadonlyArray<ICommitStatus>
{'fraction_non_alphanumeric': 0.08059100067159167, 'fraction_numerical': 0.0, 'mean_word_length': 3.348905109489051, 'pattern_counts': {'":': 0, '<': 7, '<?xml version=': 0, '>': 7, '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': '792380', 'n_tokens_mistral': 804, 'n_tokens_neox': 790, 'n_words': 323}