{short}
);
}
return (
);
}
function PullRequestCommitRow({
author,
branch,
createdAt,
hash,
message,
onOpenCommit,
profiles,
}: {
author: string;
branch: string | null;
createdAt: number;
hash: string | null;
message: string;
onOpenCommit?: (commitHash: string) => void;
profiles?: UserProfileLookup;
}) {
const authorProfile = profileForPubkey(author, profiles);
const authorLabel = labelForPubkey(author, profiles);
const openCommit =
hash && onOpenCommit ? () => onOpenCommit(hash) : undefined;
return (
No checks have been reported for this pull request yet.
); } const reviewHistory = pullRequest.comments .map((item) => ({ item, timelineKind: projectPullRequestCommentTimelineKind(item), })) .sort( (left, right) => left.item.createdAt - right.item.createdAt || left.item.id.localeCompare(right.item.id), ); const reviewHistoryCollapsed = collapsedReviewHistoryPullRequestIds.has( pullRequest.id, ); const reviewHistoryExpanded = expandedReviewHistoryPullRequestIds.has( pullRequest.id, ); const earlierReviewHistoryCount = Math.max(0, reviewHistory.length - 3); const visibleReviewHistory = reviewHistoryExpanded || earlierReviewHistoryCount === 0 ? reviewHistory : reviewHistory.slice(-3); const displayedReviewHistory = reviewHistoryCollapsed ? [] : visibleReviewHistory; const canRequestChanges = canReviewProjectPullRequest( project, pullRequest, identityQuery.data?.pubkey, ); return (Loading pull requests…
); } if (pullRequests.length === 0) { return ({error ? "Could not load pull requests for this repository." : "No pull requests yet."}
); } if (selectedPullRequest) { return (