MCPcopy Index your code
hub / github.com/github/awesome-copilot / statusBadge

Function statusBadge

extensions/java-modernization-studio/renderer.mjs:225–238  ·  view source on GitHub ↗
(status)

Source from the content-addressed store, hash-verified

223 }
224
225 function statusBadge(status) {
226 const map = {
227 completed: ["b-green", "Completed"],
228 in_progress: ["b-amber", "In progress"],
229 not_started: ["b-gray", "Not started"],
230 done: ["b-green", "Done"],
231 pending: ["b-gray", "Pending"],
232 failed: ["b-red", "Failed"],
233 not_run: ["b-gray", "Not run"],
234 pass: ["b-green", "Pass"],
235 };
236 const [cls, label] = map[status] || ["b-gray", status || "—"];
237 return '<span class="badge ' + cls + '">' + esc(label) + "</span>";
238 }
239
240 function btn(label, kind, payload, opts) {
241 opts = opts || {};

Callers 3

planTabFunction · 0.85
validationTabFunction · 0.85
renderHeaderFunction · 0.85

Calls 1

escFunction · 0.85

Tested by

no test coverage detected