chadtmiller.com/pds.js
An atproto PDS in JavaScript, for Cloudflare Workers and Node
0
0
import { checkLook, summaryWords } from '#/lib/checks.js';
import { cn } from '#/lib/utils.js';
/**
* How a commit's checks ended, as one icon. A commit checked by several
* workflows reads as one status: a single failure makes the commit failed,
* whatever its other workflows say.
*
* The icon carries its words in a title, so a commit list row stays one line
* and one anchor. The commit page shows the runs themselves instead.
*/
export function CheckStatus({ summary, runs, className }) {
if (!summary) return null;
const look = checkLook(summary.status);
const words = summaryWords(summary, runs);
return (
<span title={words} className={cn('inline-flex shrink-0', className)}>
<look.Icon
className={cn('size-3.5', look.className)}
aria-hidden="true"
/>
<span className="sr-only">{words}</span>
</span>
);
}