Skip to content

Commit ddae614

Browse files
committed
fix: remove styling that prevented proper rendering of TSC_VOTING_OVERVIEW on website. Update generation path according to new structure
1 parent dfdc04e commit ddae614

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

.github/scripts/vote_tracker/index.js

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -134,8 +134,8 @@ module.exports = async ({ github, context, botCommentURL }) => {
134134

135135
const markdownTable = await jsonToMarkdownTable(updatedVoteDetails, orgName, repoName);
136136
try {
137-
await writeFile("TSC_VOTING_OVERVIEW.md", markdownTable);
138-
console.log("Markdown table has been written to TSC_VOTING_OVERVIEW.md");
137+
await writeFile("docs/020-governance-and-policies/TSC_VOTING_OVERVIEW.md", markdownTable);
138+
console.log("Markdown table has been written to docs/020-governance-and-policies/TSC_VOTING_OVERVIEW.md");
139139
} catch (writeError) {
140140
console.error("Error writing to TSC_VOTING_OVERVIEW.md:", writeError);
141141
throw writeError;

.github/scripts/vote_tracker/markdownTable.js

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -18,7 +18,7 @@ function renderVoteIcon(value) {
1818
Abstain: "👀",
1919
"Not participated": "🔕",
2020
};
21-
return `<span style="position: relative; cursor: pointer;" title="${value}">${icons[value] || value}</span>`;
21+
return icons[value] || value;
2222
}
2323

2424
/**
@@ -46,8 +46,7 @@ function renderHeaderCell(key, titles, orgName, repoName) {
4646
return `[${title}](https://github.com/${orgName}/${repoName}/issues/${issueNumber})`;
4747
}
4848

49-
const tooltip = titles[key] || key;
50-
return `<span style="position: relative; cursor: pointer;" title="${tooltip}">${key}</span>`;
49+
return key;
5150
}
5251

5352
/**
@@ -192,7 +191,12 @@ async function jsonToMarkdownTable(data, orgName, repoName) {
192191
const keys = Object.keys(data[0]).filter(k => k !== "firstVoteClosedTime");
193192
const normalizedData = normalizeTableData(data, keys);
194193

195-
let markdown = `<!-- This file is generated by a script. Do not manually update it unless there is a visible mistake and point to the script that is responsible for updating the document. -->\n`;
194+
let markdown = `---
195+
title: TSC Voting Overview
196+
weight: 40
197+
---
198+
199+
<!-- This file is generated by a script. Do not manually update it unless there is a visible mistake and point to the script that is responsible for updating the document. -->\n`;
196200

197201
markdown += generateMarkdownHeader(keys, titles, orgName, repoName) + "\n";
198202
markdown += generateMarkdownRows(normalizedData, keys);

0 commit comments

Comments
 (0)