Skip to main content
The meeting.mjs module is responsible for reading group-specific template files and generating the markdown content for GitHub issues and HackMD meeting minutes.

readMeetingConfig(config)

Reads and parses the meeting configuration from template files for the specified group.
import * as meetings from './src/meeting.mjs';

const meetingConfig = await meetings.readMeetingConfig(config);

Parameters

config
AppConfig
required
The application configuration object. The function reads config.meetingGroup (the CLI argument) and config.directories.templates (the path to the templates directory).

Returns

Promise<MeetingConfig> — an object with the following fields:
invited
string
required
Raw contents of the invited_<group> template file. A markdown-formatted list of invited attendees.
observers
string
required
Raw contents of the observers_<group> template file. A markdown-formatted list of observers.
baseMeetingInfo
string
required
Raw contents of the meeting_base_<group> template file as a string.
properties
MeetingProperties
required
The meeting_base_<group> file parsed as dotenv key-value pairs. Common keys include GROUP_NAME, REPO, USER, ICAL_URL, CALENDAR_FILTER, AGENDA_TAG, ISSUE_LABEL, HACKMD_TEAM_NAME, and JOINING_INSTRUCTIONS.

generateMeetingTitle(config, meetingConfig, meetingDate)

Builds the canonical meeting title string used for both the GitHub issue title and the HackMD document title.
const title = meetings.generateMeetingTitle(config, meetingConfig, meetingDate);
// e.g. "Node.js Technical Steering Committee (TSC) Meeting 2025-03-19"

Parameters

config
AppConfig
required
Application configuration. Used as a fallback for meetingGroup when GROUP_NAME is not set in the template.
meetingConfig
MeetingConfig
required
Meeting configuration returned by readMeetingConfig. The function reads meetingConfig.properties.HOST and meetingConfig.properties.GROUP_NAME.
meetingDate
Date
required
The date of the upcoming meeting. The UTC date portion (YYYY-MM-DD) is appended to the title.

Returns

string — a title in the format "<HOST> <GROUP_NAME> Meeting <YYYY-MM-DD>". HOST defaults to "Node.js" when not set in the template; GROUP_NAME defaults to the raw meetingGroup shortname.

generateMeetingAgenda(agendaIssues)

Formats a collection of GitHub issues into a markdown agenda section.
const agenda = meetings.generateMeetingAgenda(agendaIssues);

Parameters

agendaIssues
Record<string, GitHubIssue[]>
required
An object mapping repository paths (e.g., "nodejs/node") to arrays of GitHub issue objects. Produced by getAgendaIssues.

Returns

string — markdown text. Each repository with at least one issue gets a ### repoName heading followed by a bullet list in the format * title [#number](html_url). Markdown bracket characters in issue titles are escaped. Returns an empty string if there are no issues.
Reads the templates/meeting_issue.md template and substitutes all placeholder variables to produce the full GitHub issue body.
const issueBody = await meetings.generateMeetingIssue(
  config,
  meetingConfig,
  meetingDate,
  meetingAgenda,
  minutesDocLink
);

Parameters

config
AppConfig
required
Application configuration. Used to resolve the templates directory and meeting group name.
meetingConfig
MeetingConfig
required
Meeting configuration returned by readMeetingConfig. Provides invited, observers, and all properties.
meetingDate
Date
required
The date of the meeting. Used to format the UTC time, generate the timezone conversion table, and produce time.anddate.com and Wolfram Alpha links.
meetingAgenda
string
required
The formatted agenda string returned by generateMeetingAgenda. Falls back to '*No agenda items found.*' when empty.
The URL of the HackMD minutes document. Substituted into the template as MINUTES_DOC. Pass an empty string in --dry-run mode.

Returns

Promise<string> — the fully substituted issue body as a markdown string. The following template variables are substituted:
VariableValue
UTC_TIMEFormatted UTC date/time of the meeting
TIMEZONE_TABLEMarkdown table of times across 12 timezones
TIME_AND_DATE_LINKLink to timeanddate.com converter
WOLFRAM_ALPHA_LINKLink to Wolfram Alpha time converter
AGENDA_LABELIssue label used for agenda items (AGENDA_TAG or <group>-agenda)
GITHUB_ORGGitHub organisation (USER property or "nodejs")
AGENDA_CONTENTFormatted agenda markdown
INVITEESContents of invited_<group>
JOINING_INSTRUCTIONSMeeting join link from meeting_base_<group>
MINUTES_DOCHackMD document URL
OBSERVERSContents of observers_<group>

Reads the templates/minutes_base_<group> template and substitutes all placeholder variables to produce the HackMD minutes document content.
const minutesContent = await meetings.generateMeetingMinutes(
  config,
  meetingConfig,
  meetingTitle,
  meetingAgenda,
  minutesDocLink,
  githubIssue.html_url
);

Parameters

config
AppConfig
required
Application configuration. Used to resolve the templates directory and the meeting group shortname.
meetingConfig
MeetingConfig
required
Meeting configuration returned by readMeetingConfig. Provides invited and observers lists.
meetingTitle
string
required
The meeting title string returned by generateMeetingTitle. Substituted as TITLE.
meetingAgenda
string
required
The formatted agenda string returned by generateMeetingAgenda. Substituted as AGENDA_CONTENT.
The URL of the HackMD document itself. Substituted as MINUTES_DOC (used for self-referencing within the document).
The html_url of the created or updated GitHub issue. Substituted as GITHUB_ISSUE.

Returns

Promise<string> — the fully substituted minutes document content as a markdown string. The following template variables are substituted:
VariableValue
TITLEMeeting title
AGENDA_CONTENTFormatted agenda markdown
INVITEDContents of invited_<group>
OBSERVERSContents of observers_<group>
MINUTES_DOCHackMD document URL
GITHUB_ISSUEGitHub issue URL

Build docs developers (and LLMs) love