refactor(github): organize concrete feature owners (#41601)

This commit is contained in:
Neil
2026-11-12 09:17:26 -08:00
committed by GitHub
parent ff9fd6634b
commit fb8d6f950b
1003 changed files with 4460 additions and 8422 deletions
@@ -1,5 +1,5 @@
import { gitLabJobTraceToLogExcerpt } from './gitlab-job-log-excerpt'
import type { PRCheckDetail, PRCheckRunDetails } from '../../../github/check-types'
import type { PRCheckDetail, PRCheckRunDetails } from '../../../github/checks/check-types'
export type GitLabJobTraceCheckDetailsStrings = {
/** Shown for a job with no log: never ran, waiting on a human, or log erased/expired. */
@@ -1,6 +1,6 @@
import type { GitLabPipeline, GitLabPipelineJob } from '../../../gitlab-types'
import type { PRCheckDetail } from '../../../github/check-types'
import type { CheckStatus } from '../../../github/pull-request-types'
import type { PRCheckDetail } from '../../../github/checks/check-types'
import type { CheckStatus } from '../../../github/pull-requests/pull-request-types'
import { checkRunTimes } from '../pr-check-time'
export function mapGitLabPipelineJobStatusToCheckStatus(status: string): PRCheckDetail['status'] {
@@ -1,4 +1,4 @@
import type { PRCheckDetail } from '../../github/check-types'
import type { PRCheckDetail } from '../../github/checks/check-types'
// Neutral/skipped carry no signal and must sink below success. Map provider values to avoid prototype-name ranks
// (e.g. constructor/toString resolving as functions on plain objects).
@@ -1,4 +1,4 @@
import type { PRCheckDetail } from '../../github/check-types'
import type { PRCheckDetail } from '../../github/checks/check-types'
export function getCheckConclusion(check: PRCheckDetail): NonNullable<PRCheckDetail['conclusion']> {
return check.conclusion ?? 'pending'
@@ -4,8 +4,11 @@ import {
summarizeProviderChecks,
type CheckOutcomeInput
} from './provider-check-summary'
import type { PRCheckDetail } from '../../github/check-types'
import type { CheckStatus, ProviderCheckSummary } from '../../github/pull-request-types'
import type { PRCheckDetail } from '../../github/checks/check-types'
import type {
CheckStatus,
ProviderCheckSummary
} from '../../github/pull-requests/pull-request-types'
export function derivePRCheckStatus(checks: readonly PRCheckDetail[]): CheckStatus {
const { state } = summarizeProviderChecks(checks)
@@ -1,4 +1,4 @@
import type { PRCheckJob, PRCheckStep } from '../../github/check-types'
import type { PRCheckJob, PRCheckStep } from '../../github/checks/check-types'
export type StepOutcome = 'success' | 'failure' | 'skipped' | 'pending'
@@ -1,4 +1,4 @@
import type { PRCheckDetail } from '../../github/check-types'
import type { PRCheckDetail } from '../../github/checks/check-types'
// GitHub reports an unset time as the zero date; anything before the epoch is that sentinel, not a run.
export function normalizeCheckTimestamp(value: unknown): string | undefined {
@@ -1,6 +1,6 @@
import { describe, expect, it } from 'vitest'
import { buildFixBrokenChecksPrompt, getCheckDetailsPromptKey } from './pr-checks-fix-prompt'
import type { PRCheckDetail, PRCheckJob, PRCheckRunDetails } from '../../github/check-types'
import type { PRCheckDetail, PRCheckJob, PRCheckRunDetails } from '../../github/checks/check-types'
const failingCheck: PRCheckDetail = {
name: 'unit',
@@ -1,4 +1,4 @@
import type { PRCheckDetail, PRCheckRunDetails } from '../../github/check-types'
import type { PRCheckDetail, PRCheckRunDetails } from '../../github/checks/check-types'
import { getCheckStatusLabel } from './pr-check-status-label'
export const PROMPT_LOG_TAIL_LINES = 150
@@ -1,4 +1,7 @@
import type { CheckStatus, ProviderCheckSummary } from '../../github/pull-request-types'
import type {
CheckStatus,
ProviderCheckSummary
} from '../../github/pull-requests/pull-request-types'
export type CheckOutcome = 'passed' | 'failed' | 'pending' | 'neutral'
@@ -1,10 +1,10 @@
import type { GitConflictOperation } from '../../git/status/git-status-types'
import type { PRInfo } from '../../github/pull-request-types'
import type { PRInfo } from '../../github/pull-requests/pull-request-types'
import {
resolveGitHubPRMergeState,
type GitHubPRMergeStateKind
} from '../../github/pull-request-merge-state'
import { resolveGitHubPRStackMergeDecision } from '../../github/pull-request-stack-merge'
} from '../../github/pull-requests/merge/pull-request-merge-state'
import { resolveGitHubPRStackMergeDecision } from '../../github/pull-requests/merge/pull-request-stack-merge'
import type { SourceControlCommitAreaPrimaryActionDecision } from './source-control-primary-action-decision-types'
// What the branch's hosted review creation offers once nothing local is left to do.
@@ -1,6 +1,6 @@
import type { HostedReviewCreationEligibility } from '../hosted-review/hosted-review-contracts'
import type { GitUpstreamStatus } from '../../git/status/git-status-types'
import type { PRState } from '../../github/pull-request-types'
import type { PRState } from '../../github/pull-requests/pull-request-types'
export type SourceControlPrimaryActionKind =
| 'commit'
@@ -1,12 +1,12 @@
import type { StackedReviewFailureReason } from './stacked-hosted-review-failure-copy'
import type {
CheckStatus,
GitHubRepositoryIdentity,
PRConflictSummary,
PRMergeableState,
PRReviewDecision,
ProviderCheckSummary
} from '../../github/pull-request-types'
} from '../../github/pull-requests/pull-request-types'
import type { GitHubRepositoryIdentity } from '../../github/repositories/repository-identity'
export type HostedReviewProvider =
| 'github'
@@ -1,6 +1,6 @@
import { projectPRCheckOwner } from '../../github/complete-pr-check-owner'
import { projectPRCheckOwner } from '../../github/checks/complete-pr-check-owner'
import type { HostedReviewInfo } from './hosted-review-contracts'
import type { PRInfo } from '../../github/pull-request-types'
import type { PRInfo } from '../../github/pull-requests/pull-request-types'
export function hostedReviewInfoFromGitHubPRInfo(pr: PRInfo): HostedReviewInfo {
const review: HostedReviewInfo = {
@@ -1,4 +1,4 @@
import type { PRComment } from '../../github/comment-types'
import type { PRComment } from '../../github/comments/comment-types'
import { normalizePRCommentAuthorLogin } from './pr-bot-author-overrides'
export type PRCommentAudienceFilter = 'all' | 'human' | 'bot'
@@ -1,4 +1,4 @@
import type { PRComment } from '../../github/comment-types'
import type { PRComment } from '../../github/comments/comment-types'
export type PRCommentGroup =
| { kind: 'standalone'; comment: PRComment }
@@ -1,4 +1,4 @@
import type { PRComment } from '../../github/comment-types'
import type { PRComment } from '../../github/comments/comment-types'
import type { PRCommentGroup } from './pr-comment-groups'
export type PRCommentsResolutionReviewKind = 'PR' | 'MR'