clairo 1.2.2 → 1.2.3
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/cli.js +17 -12
- package/package.json +1 -1
package/dist/cli.js
CHANGED
|
@@ -192,7 +192,7 @@ function timeAgo(dateStr) {
|
|
|
192
192
|
}
|
|
193
193
|
function resolveCheckStatus(check) {
|
|
194
194
|
const conclusion = check.conclusion ?? check.state;
|
|
195
|
-
if (conclusion === "SUCCESS"
|
|
195
|
+
if (conclusion === "SUCCESS") return "success";
|
|
196
196
|
if (conclusion === "FAILURE" || conclusion === "ERROR") return "failure";
|
|
197
197
|
if (conclusion === "SKIPPED" || conclusion === "NEUTRAL") return "skipped";
|
|
198
198
|
if (conclusion === "PENDING" || check.status === "IN_PROGRESS" || check.status === "QUEUED" || check.status === "WAITING")
|
|
@@ -209,18 +209,19 @@ var CHECK_ICONS = { success: "\u2713", failure: "\u2717", pending: "\u25CF", ski
|
|
|
209
209
|
var CHECK_SORT_ORDER = { failure: 0, pending: 1, skipped: 2, success: 3 };
|
|
210
210
|
function resolveReviewDisplay(reviewDecision) {
|
|
211
211
|
const status = reviewDecision ?? "PENDING";
|
|
212
|
-
if (status === "APPROVED") return { text:
|
|
213
|
-
if (status === "CHANGES_REQUESTED") return { text:
|
|
214
|
-
return { text:
|
|
212
|
+
if (status === "APPROVED") return { text: "Approved", color: "green" };
|
|
213
|
+
if (status === "CHANGES_REQUESTED") return { text: "Changes Requested", color: "red" };
|
|
214
|
+
if (status === "REVIEW_REQUIRED") return { text: "Review Required", color: "yellow" };
|
|
215
|
+
return { text: "Pending", color: "yellow" };
|
|
215
216
|
}
|
|
216
217
|
function resolveMergeDisplay(pr) {
|
|
217
|
-
if (!pr) return { text: "
|
|
218
|
-
if (pr.state === "MERGED") return { text: "
|
|
219
|
-
if (pr.state === "CLOSED") return { text: "
|
|
220
|
-
if (pr.isDraft) return { text: "
|
|
221
|
-
if (pr.mergeable === "MERGEABLE") return { text: "
|
|
222
|
-
if (pr.mergeable === "CONFLICTING") return { text: "
|
|
223
|
-
return { text:
|
|
218
|
+
if (!pr) return { text: "Unknown", color: "yellow" };
|
|
219
|
+
if (pr.state === "MERGED") return { text: "Merged", color: "magenta" };
|
|
220
|
+
if (pr.state === "CLOSED") return { text: "Closed", color: "red" };
|
|
221
|
+
if (pr.isDraft) return { text: "Draft", color: "yellow" };
|
|
222
|
+
if (pr.mergeable === "MERGEABLE") return { text: "Open", color: "green" };
|
|
223
|
+
if (pr.mergeable === "CONFLICTING") return { text: "Conflicts", color: "red" };
|
|
224
|
+
return { text: "Unknown", color: "yellow" };
|
|
224
225
|
}
|
|
225
226
|
async function isGhInstalled() {
|
|
226
227
|
try {
|
|
@@ -1338,7 +1339,11 @@ function PRDetailsBox({ pr, loading, error, isActive }) {
|
|
|
1338
1339
|
pr.deletions
|
|
1339
1340
|
] })
|
|
1340
1341
|
] }),
|
|
1341
|
-
(((_c = pr.labels) == null ? void 0 : _c.length) ?? 0) > 0 && /* @__PURE__ */ jsx3(
|
|
1342
|
+
(((_c = pr.labels) == null ? void 0 : _c.length) ?? 0) > 0 && /* @__PURE__ */ jsx3(Box3, { gap: 1, children: pr.labels.map((l) => /* @__PURE__ */ jsxs2(Box3, { children: [
|
|
1343
|
+
/* @__PURE__ */ jsx3(Text2, { color: "gray", children: "\uE0B6" }),
|
|
1344
|
+
/* @__PURE__ */ jsx3(Text2, { color: "black", backgroundColor: "gray", children: l.name }),
|
|
1345
|
+
/* @__PURE__ */ jsx3(Text2, { color: "gray", children: "\uE0B4" })
|
|
1346
|
+
] }, l.name)) }),
|
|
1342
1347
|
/* @__PURE__ */ jsx3(Box3, { marginTop: 1, children: /* @__PURE__ */ jsx3(Divider, {}) }),
|
|
1343
1348
|
(((_d = pr.assignees) == null ? void 0 : _d.length) ?? 0) > 0 && /* @__PURE__ */ jsxs2(Box3, { marginTop: 1, children: [
|
|
1344
1349
|
/* @__PURE__ */ jsx3(Text2, { dimColor: true, children: "Assignees: " }),
|