Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
7 changes: 1 addition & 6 deletions .env.example
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,4 @@

# Required: HackMD Configuration
# HACKMD_API_TOKEN=your_hackmd_api_token
# HACKMD_TEAM_NAME=your_hackmd_team_name_optional # Defaults to your own personal space

# Google Calendar API Authentication
# You can get this from the Google Cloud Console
# Create an API Key and restrict it to the Google Calendar API
# GOOGLE_API_KEY=your_google_calendar_api_key_here
# HACKMD_TEAM_NAME=your_hackmd_team_name_optional # Defaults to your own personal space
3 changes: 1 addition & 2 deletions .github/workflows/create-meeting-artifacts-manual.yml
Original file line number Diff line number Diff line change
Expand Up @@ -57,8 +57,7 @@ jobs:
env:
GITHUB_TOKEN: ${{ steps.app-token.outputs.token }}
HACKMD_API_TOKEN: ${{ secrets.HACKMD_API_TOKEN }}
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
ADDITIONAL_ARGS: ${{ inputs.dry_run == 'true' && '--dry-run' || '' }}
ADDITIONAL_ARGS: ${{ github.event.inputs.dry_run == 'true' && '--dry-run' || '' }}
run: node create-node-meeting-artifacts.mjs ${{ inputs.meeting_group }} --verbose $ADDITIONAL_ARGS

- name: Upload artifacts
Expand Down
19 changes: 1 addition & 18 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,6 @@ A modern Node.js application that creates GitHub issues and HackMD documents for

- Node.js 22+ (LTS)
- GitHub Personal Access Token
- Google Cloud Project with Calendar API enabled (for meeting scheduling)
- Google API Key for Calendar access
- HackMD API Token (for meeting minutes)

## 🔑 Authentication Setup
Expand All @@ -26,19 +24,6 @@ A modern Node.js application that creates GitHub issues and HackMD documents for
3. Create a new API token for the meeting artifacts tool
4. Optionally, create or join a team workspace for better organization

### Google Authentication (Calendar Only)

#### API Key Authentication (Recommended)

1. Go to [Google Cloud Console](https://console.cloud.google.com/)
2. Create a new project or select an existing one
3. Enable the Google Calendar API
4. Go to **Credentials** → **Create Credentials** → **API Key**
5. Restrict the API key to the Google Calendar API for security
6. Add the API key to your environment variables as `GOOGLE_API_KEY`

**Note:** API Keys provide simplified authentication and are sufficient for read-only calendar access. They don't require complex OAuth flows or service account setup.

## 📁 Project Structure

```
Expand All @@ -47,7 +32,7 @@ create-node-meeting-artifacts/
│ ├── config.mjs # Configuration management
│ ├── constants.mjs # Application constants
│ ├── github.mjs # GitHub API integration
│ ├── google.mjs # Google APIs integration
│ ├── calendar.mjs # Calendar integration
│ ├── meeting.mjs # Meeting operations
│ └── utils.mjs # Utility functions
├── templates/ # Meeting templates
Expand Down Expand Up @@ -202,15 +187,13 @@ The application creates:

- `GITHUB_TOKEN`: GitHub Personal Access Token
- `HACKMD_API_TOKEN`: HackMD API token for creating and managing documents
- `GOOGLE_API_KEY`: Google Calendar API Key for read-only calendar access

### Meeting Base Configuration

Each `meeting_base_<group>` file contains:

```bash
CALENDAR_FILTER="Meeting Name in Calendar"
CALENDAR_ID="nodejs.org_nr77ama8p7d7f9ajrpnu506c98@group.calendar.google.com"
USER="nodejs"
REPO="repository-name"
GROUP_NAME="Full Group Name"
Expand Down
6 changes: 3 additions & 3 deletions TEMPLATES_DOCUMENTATION.md
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ There are several variables in the documents that need to be configured:
The following properties are available in meeting base templates and can be used in meeting issue generation:

- **`CALENDAR_FILTER`:** The name of calendar events that mark the group's meeting date/time
- **`CALENDAR_ID`:** The Google Calendar ID for the Node.js calendar (typically `nodejs.org_nr77ama8p7d7f9ajrpnu506c98@group.calendar.google.com`)
- **`ICAL_URL`:** The ICAL URL for a given meetings' calendar
- **`USER`:** The GitHub username/organization (typically `nodejs`)
- **`REPO`:** The repository name where meeting issues are created
- **`GROUP_NAME`:** The full name of the Committee, Working Group, Initiative, or Team
Expand Down Expand Up @@ -55,7 +55,7 @@ A base of metadata and some content for the issue to be created on time, with ag

```
CALENDAR_FILTER="<calendar event name>"
CALENDAR_ID="nodejs.org_nr77ama8p7d7f9ajrpnu506c98@group.calendar.google.com"
ICAL_URL="<ical url>"
USER="nodejs"
REPO="<repo>"
GROUP_NAME="<name>"
Expand All @@ -72,7 +72,7 @@ JOINING_INSTRUCTIONS="

```
CALENDAR_FILTER="Node.js Community Committee"
CALENDAR_ID="nodejs.org_nr77ama8p7d7f9ajrpnu506c98@group.calendar.google.com"
ICAL_URL="<...>"
USER="nodejs"
REPO="community-committee"
GROUP_NAME="Community Committee"
Expand Down
12 changes: 5 additions & 7 deletions create-node-meeting-artifacts.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@

import { Command } from 'commander';

import * as calendar from './src/calendar.mjs';
import environmentConfig from './src/config.mjs';
import * as github from './src/github.mjs';
import * as google from './src/google.mjs';
import * as hackmd from './src/hackmd.mjs';
import * as meetings from './src/meeting.mjs';

Expand All @@ -32,9 +32,6 @@ const config = {
meetingGroup: program.args[0],
};

// Step 2: Initialize Google Calendar client with API Key
const calendarClient = google.createCalendarClient(config.google);

// Step 3: Initialize GitHub client
const githubClient = github.createGitHubClient(config);

Expand Down Expand Up @@ -67,10 +64,11 @@ if (config.dryRun) {
}

// Step 6: Find next meeting event in calendar
const event = await google.findNextMeetingEvent(calendarClient, meetingConfig);
const events = await calendar.getEventsFromCalendar(
meetingConfig.properties.ICAL_URL
);

// Step 7: Extract meeting date from event
const meetingDate = new Date(event.start.dateTime);
const meetingDate = await calendar.findNextMeetingDate(events, meetingConfig);

// Step 8: Get Meeting Title
const meetingTitle = meetings.generateMeetingTitle(
Expand Down
4 changes: 0 additions & 4 deletions global.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,15 +3,11 @@
* This file makes types from third-party libraries available globally without imports in JSDoc comments
*/

import type { calendar_v3 } from '@googleapis/calendar';
import type { RestEndpointMethodTypes } from '@octokit/rest';
import type { API } from '@hackmd/api';
import type { SingleNote } from '@hackmd/api/dist/type.d.ts';

declare global {
// Google API type aliases
type CalendarEvent = calendar_v3.Schema$Event;
type CalendarClient = calendar_v3.Calendar;
type HackMDClient = API;
type HackMDNote = SingleNote;

Expand Down
Loading
Loading