Skip to content

Commit 4ed14f8

Browse files
committed
πŸ› Fix generated vote records
1 parent 48ab0b7 commit 4ed14f8

File tree

3 files changed

+9
-2
lines changed

3 files changed

+9
-2
lines changed

β€Žactions/count-votes/action.ymlβ€Ž

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -109,6 +109,7 @@ runs:
109109
# Stage the index.
110110
git add -A -- "${INDEX_FILE}"
111111
fi
112+
git status
112113
113114
- name: Commit and push changes
114115
id: commit_push

β€Žsrc/votes.tsβ€Ž

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ for (const arg of process.argv) {
2020
// filter out recent, not a dir
2121
config.options.all = arg === "all";
2222
} else if (arg.startsWith("--md=")) {
23-
config.markdownDir = arg.slice(5);
23+
config.markdownDir = arg.slice(5).replace('"', "");
2424
} else if (arg.startsWith("--removeTag=")) {
2525
config.options.removeTags = arg.slice(12).split(",");
2626
} else if (arg.startsWith("--bot=")) {

β€Žtemplates/result.etaβ€Ž

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -31,8 +31,14 @@ This vote was [closed](<%= it.voteData.manualCloseComments.url %>) by [<%= it.vo
3131
<%- for (const [k, category] of it.sortedCategories) {
3232
const reactions = category.reactions.length ? ` (${category.reactions.join(", ")})` : '';
3333
const team = category.team?.map(v => `[${v.login}](${v.url})`).join(', ') || '';
34+
const teamTotal = category.teamTotal
35+
? category.teamTotal
36+
: (category.team ? Object.keys(category.team).length : 0)
37+
const total = category.total
38+
? category.total
39+
: teamTotal + (category.otherVotes ? Object.keys(category.otherVotes).length : 0)
3440
%>
35-
| <%= k %><%= reactions %> | <%= category.total %> | <%= category.teamTotal %> | <%= team %> |
41+
| <%= k %><%= reactions %> | <%= total %> | <%= teamTotal %> | <%= team %> |
3642
<%- } %>
3743
| **Total** | <%= it.voteData.countedVotes %> | <%= it.voteData.groupVotes %> | |
3844
<%- if (it.voteData.otherVotes && it.voteData.otherVotes.length) { %>

0 commit comments

Comments
Β (0)