mirror of
https://github.com/stablyai/orca.git
synced 2026-11-15 18:37:24 +00:00
refactor(github): organize concrete feature owners (#41601)
This commit is contained in:
@@ -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'
|
||||
|
||||
Reference in New Issue
Block a user