MCPcopy
hub / github.com/github/awesome-copilot / renderWorkflowsHtml

Function renderWorkflowsHtml

website/src/scripts/pages/workflows-render.ts:34–66  ·  view source on GitHub ↗
(
  items: RenderableWorkflow[]
)

Source from the content-addressed store, hash-verified

32}
33
34export function renderWorkflowsHtml(
35 items: RenderableWorkflow[]
36): string {
37 if (items.length === 0) {
38 return renderEmptyStateHtml('No workflows found', 'Try adjusting the selected filters.');
39 }
40
41 return items
42 .map((item) => {
43 const metaHtml = `
44 ${item.triggers
45 .map((trigger) => `<span class="resource-tag tag-trigger">${escapeHtml(trigger)}</span>`)
46 .join('')}
47 ${getLastUpdatedHtml(item.lastUpdated)}
48 `;
49
50 const actionsHtml = `
51 ${getActionButtonsHtml(item.path)}
52 <a href="${getGitHubUrl(item.path)}" class="btn btn-secondary" target="_blank" onclick="event.stopPropagation()" title="View on GitHub">GitHub</a>
53 `;
54
55 return renderSharedCardHtml({
56 title: item.title,
57 description: item.description || 'No description',
58 articleAttributes: {
59 'data-path': item.path,
60 },
61 metaHtml,
62 actionsHtml,
63 });
64 })
65 .join('');
66}

Callers 1

renderItemsFunction · 0.90

Calls 6

renderEmptyStateHtmlFunction · 0.90
escapeHtmlFunction · 0.90
getLastUpdatedHtmlFunction · 0.90
getActionButtonsHtmlFunction · 0.90
getGitHubUrlFunction · 0.90
renderSharedCardHtmlFunction · 0.90

Tested by

no test coverage detected