Skip to content

Commit 83a2b36

Browse files
authored
feat: debug logging (#216)
1 parent 97ba1fb commit 83a2b36

1 file changed

Lines changed: 11 additions & 1 deletion

File tree

create-node-meeting-artifacts.mjs

Lines changed: 11 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,14 @@ const config = {
3535
meetingGroup: program.args[0],
3636
};
3737

38+
console.log('Application config loaded', config);
39+
3840
// Step 3: Initialize GitHub client
3941
const githubClient = github.createGitHubClient(config);
4042

4143
// Step 4: Read meeting configuration from templates
4244
const meetingConfig = await meetings.readMeetingConfig(config);
45+
console.debug('Meeting config loaded', meetingConfig);
4346

4447
// Step 5: Initialize HackMD client with meeting configuration
4548
const hackmdClient = hackmd.createHackMDClient(config, meetingConfig);
@@ -50,6 +53,7 @@ if (config.dryRun) {
5053
config,
5154
meetingConfig
5255
);
56+
console.debug('Found agenda issues', gitHubAgendaIssues);
5357

5458
const meetingAgenda = meetings.generateMeetingAgenda(gitHubAgendaIssues);
5559

@@ -70,12 +74,14 @@ if (config.dryRun) {
7074
const events = await calendar.getEventsFromCalendar(
7175
meetingConfig.properties.ICAL_URL
7276
);
77+
console.debug('Loaded calendar', events);
7378

7479
const meetingDate = await calendar.findNextMeetingDate(events, meetingConfig);
80+
console.debug('Next meeting date', meetingDate);
7581

7682
// If no meeting is found, exit gracefully
7783
if (!meetingDate) {
78-
const [weekStart, weekEnd] = calendar.getWeekBounds();
84+
const [weekStart, weekEnd] = calendar.getNextWeek();
7985

8086
console.log(
8187
`No meeting found for ${meetingConfig.properties.GROUP_NAME || 'this group'} ` +
@@ -91,13 +97,15 @@ const meetingTitle = meetings.generateMeetingTitle(
9197
meetingConfig,
9298
meetingDate
9399
);
100+
console.debug('Meeting title', meetingTitle);
94101

95102
// Step 9: Get agenda information using native implementation
96103
const gitHubAgendaIssues = await github.getAgendaIssues(
97104
githubClient,
98105
config,
99106
meetingConfig
100107
);
108+
console.debug('Found agenda issues', gitHubAgendaIssues);
101109

102110
// Step 10: Parse meeting agenda from GitHub issues
103111
const meetingAgenda = meetings.generateMeetingAgenda(gitHubAgendaIssues);
@@ -108,6 +116,7 @@ const hackmdNote = await hackmd.getOrCreateMeetingNotesDocument(
108116
meetingTitle,
109117
config
110118
);
119+
console.debug('HackMD document created/retrieved:', hackmdNote);
111120

112121
// Step 12: Get the HackMD document link
113122
const minutesDocLink =
@@ -130,6 +139,7 @@ const githubIssue = await github.createOrUpdateGitHubIssue(
130139
meetingTitle,
131140
issueContent
132141
);
142+
console.debug('GitHub issue created/updated', githubIssue);
133143

134144
// Step 15: Update the minutes content with the HackMD link
135145
const minutesContent = await meetings.generateMeetingMinutes(

0 commit comments

Comments
 (0)