@@ -42,8 +42,31 @@ const githubClient = github.createGitHubClient(config);
4242const meetingConfig = await meetings . readMeetingConfig ( config ) ;
4343
4444// Step 5: Initialize HackMD client with meeting configuration
45- const hackmdClient =
46- config . dryRun || hackmd . createHackMDClient ( config , meetingConfig ) ;
45+ const hackmdClient = hackmd . createHackMDClient ( config , meetingConfig ) ;
46+
47+ if ( config . dryRun ) {
48+ const meetingDate = new Date ( ) ;
49+
50+ const gitHubAgendaIssues = await github . getAgendaIssues (
51+ githubClient ,
52+ config ,
53+ meetingConfig
54+ ) ;
55+
56+ const meetingAgenda = meetings . generateMeetingAgenda ( gitHubAgendaIssues ) ;
57+
58+ const issueContent = await meetings . generateMeetingIssue (
59+ config ,
60+ meetingConfig ,
61+ meetingDate ,
62+ meetingAgenda ,
63+ ''
64+ ) ;
65+
66+ console . log ( issueContent ) ;
67+
68+ process . exit ( 0 ) ;
69+ }
4770
4871// Step 6: Find next meeting event in calendar
4972const event = await google . findNextMeetingEvent ( calendarClient , meetingConfig ) ;
@@ -69,9 +92,11 @@ const gitHubAgendaIssues = await github.getAgendaIssues(
6992const meetingAgenda = meetings . generateMeetingAgenda ( gitHubAgendaIssues ) ;
7093
7194// Step 11: Create HackMD document with meeting notes and tags
72- const hackmdNote = config . dryRun
73- ? { }
74- : await hackmd . createMeetingNotesDocument ( hackmdClient , meetingTitle , '' ) ;
95+ const hackmdNote = await hackmd . createMeetingNotesDocument (
96+ hackmdClient ,
97+ meetingTitle ,
98+ ''
99+ ) ;
75100
76101// Step 12: Get the HackMD document link
77102const minutesDocLink =
@@ -87,14 +112,12 @@ const issueContent = await meetings.generateMeetingIssue(
87112) ;
88113
89114// Step 14: Create GitHub issue with HackMD link
90- const githubIssue = config . dryRun
91- ? { }
92- : await github . createGitHubIssue (
93- githubClient ,
94- meetingConfig ,
95- meetingTitle ,
96- issueContent
97- ) ;
115+ const githubIssue = await github . createGitHubIssue (
116+ githubClient ,
117+ meetingConfig ,
118+ meetingTitle ,
119+ issueContent
120+ ) ;
98121
99122// Step 15: Update the minutes content with the HackMD link
100123const minutesContent = await meetings . generateMeetingMinutes (
@@ -106,19 +129,13 @@ const minutesContent = await meetings.generateMeetingMinutes(
106129 githubIssue . html_url
107130) ;
108131
109- if ( config . dryRun ) {
110- console . log ( 'Would create GitHub issue with the following content:' ) ;
111- console . log ( issueContent ) ;
112- console . log ( 'Would create HackMD note with the following content:' ) ;
113- console . log ( minutesContent ) ;
114- } else {
115- // Step 16: Update the HackMD document with the self-referencing link
116- await hackmd . updateMeetingNotesDocument (
117- hackmdClient ,
118- hackmdNote . id ,
119- minutesContent
120- ) ;
132+ // Step 16: Update the HackMD document with the self-referencing link
133+ await hackmd . updateMeetingNotesDocument (
134+ hackmdClient ,
135+ hackmdNote . id ,
136+ minutesContent
137+ ) ;
121138
122- console . log ( `Created GitHub issue: ${ githubIssue . html_url } ` ) ;
123- console . log ( `Created HackMD document : ${ minutesDocLink } ` ) ;
124- }
139+ // Step 16: Update the HackMD document with the self-referencing link
140+ console . log ( `Created GitHub issue : ${ githubIssue . html_url } ` ) ;
141+ console . log ( `Created HackMD document: ${ minutesDocLink } ` ) ;
0 commit comments