feat: add tags for new forum channels
Security Scan and Upload / Security & DefectDojo Upload (push) Failing after 24s
Node.js CI / Lint and Test (push) Successful in 26s

This commit is contained in:
2025-12-17 17:18:17 -08:00
parent 72b7571b92
commit e6112f57cb
2 changed files with 44 additions and 16 deletions
+14
View File
@@ -6,19 +6,26 @@
export const ids = { export const ids = {
channels: { channels: {
accessibilityForum: "1451006622838030509",
billingQuestions: "1451010972771811480",
bugReports: "1447723804330823763", bugReports: "1447723804330823763",
communityFeedback: "1447726591189975210", communityFeedback: "1447726591189975210",
featureRequests: "1447726510369931295", featureRequests: "1447726510369931295",
formSubmissions: "1448445144071147520", formSubmissions: "1448445144071147520",
gaming: "1385797656307175468", gaming: "1385797656307175468",
general: "1385797320389431336", general: "1385797320389431336",
legalNotices: "1451009920479793254",
marketingProposals: "1451012386327756902",
menteeChat: "1400589073613062204", menteeChat: "1400589073613062204",
mentorshipGoalForum: "1400629118110011526", mentorshipGoalForum: "1400629118110011526",
mentorshipProjectForum: "1400616702265266186", mentorshipProjectForum: "1400616702265266186",
naomiDiscussionForum: "1408154690121633917", naomiDiscussionForum: "1408154690121633917",
news: "1407804798677418198", news: "1407804798677418198",
partnershipRequests: "1451009066355654829",
policyIdeation: "1417294974046965842", policyIdeation: "1417294974046965842",
pressInquiries: "1451011543482368163",
resumeReviewForum: "1407807555266154496", resumeReviewForum: "1407807555266154496",
technicalSupport: "1451014823440678972",
}, },
guilds: { guilds: {
nhcarrigan: "1354624415861833870", nhcarrigan: "1354624415861833870",
@@ -46,10 +53,17 @@ export const ids = {
naomi: "1407807752549699727", naomi: "1407807752549699727",
}, },
unanswered: { unanswered: {
accessibilityForum: "1451008476779122869",
billingQuestions: "1451011252301205524",
bugReports: "1447726213446500555", bugReports: "1447726213446500555",
communityFeedback: "1447726807595094036", communityFeedback: "1447726807595094036",
featureRequests: "1447726899919978677", featureRequests: "1447726899919978677",
legalNotices: "1451010521687130313",
marketingProposals: "1451012664858906720",
partnershipRequests: "1451009530459586650",
policyIdeation: "1447755602318196828", policyIdeation: "1447755602318196828",
pressInquiries: "1451012067841544223",
technicalSupport: "1451015143646298132",
}, },
}, },
users: { users: {
+22 -8
View File
@@ -11,18 +11,32 @@ import { ids } from "../config/ids.js";
* @param id - The ID of the forum channel. * @param id - The ID of the forum channel.
* @returns The ID of the "unanswered" tag, or null if not found. * @returns The ID of the "unanswered" tag, or null if not found.
*/ */
// eslint-disable-next-line complexity -- This is less complex than trying to narrow the type...
export const getForumTagId = (id: string): string | null => { export const getForumTagId = (id: string): string | null => {
if (id === ids.channels.bugReports) { switch (id) {
case ids.channels.bugReports:
return ids.tags.unanswered.bugReports; return ids.tags.unanswered.bugReports;
} case ids.channels.communityFeedback:
if (id === ids.channels.communityFeedback) {
return ids.tags.unanswered.communityFeedback; return ids.tags.unanswered.communityFeedback;
} case ids.channels.featureRequests:
if (id === ids.channels.featureRequests) {
return ids.tags.unanswered.featureRequests; return ids.tags.unanswered.featureRequests;
} case ids.channels.policyIdeation:
if (id === ids.channels.policyIdeation) {
return ids.tags.unanswered.policyIdeation; return ids.tags.unanswered.policyIdeation;
} case ids.channels.accessibilityForum:
return ids.tags.unanswered.accessibilityForum;
case ids.channels.marketingProposals:
return ids.tags.unanswered.marketingProposals;
case ids.channels.technicalSupport:
return ids.tags.unanswered.technicalSupport;
case ids.channels.billingQuestions:
return ids.tags.unanswered.billingQuestions;
case ids.channels.pressInquiries:
return ids.tags.unanswered.pressInquiries;
case ids.channels.partnershipRequests:
return ids.tags.unanswered.partnershipRequests;
case ids.channels.legalNotices:
return ids.tags.unanswered.legalNotices;
default:
return null; return null;
}
}; };