Skip to content

Commit 3015c48

Browse files
committed
feat: updated code/refactored added hackmd integration
1 parent bb43655 commit 3015c48

35 files changed

+4412
-543
lines changed

.env.example

Lines changed: 9 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,15 +1,14 @@
1-
# GitHub Authentication
2-
GITHUB_TOKEN=your_github_personal_access_token_here
1+
# Required: GitHub Token (Needs "repo" permissions)
2+
# GITHUB_TOKEN=your_personal_access_token_or_org_token
33

4-
# Google APIs Authentication
5-
# You can get these from the Google Cloud Console
6-
GOOGLE_CLIENT_ID=your_google_client_id_here
7-
GOOGLE_CLIENT_SECRET=your_google_client_secret_here
8-
GOOGLE_REDIRECT_URI=http://localhost:3000/oauth2callback
4+
# Required: HackMD Configuration
5+
# HACKMD_API_TOKEN=your_hackmd_api_token
6+
# HACKMD_TEAM_NAME=your_hackmd_team_name_optional # Defaults to your own personal space
97

10-
# Optional: Google Service Account (for GitHub Actions)
11-
# GOOGLE_SERVICE_ACCOUNT_EMAIL=your_service_account_email_here
12-
# GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY=your_service_account_private_key_here
8+
# Google Calendar API Authentication
9+
# You can get this from the Google Cloud Console
10+
# Create an API Key and restrict it to the Google Calendar API
11+
# GOOGLE_API_KEY=your_google_calendar_api_key_here
1312

1413
# Optional: Directory paths (defaults to current directory and home)
1514
# MEETINGS_CONFIG_DIR=./

.github/workflows/create-meeting-artifacts.yml

Lines changed: 7 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -40,10 +40,10 @@ jobs:
4040

4141
steps:
4242
- name: Checkout repository
43-
uses: actions/checkout@v4
43+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
4444

4545
- name: Setup Node.js
46-
uses: actions/setup-node@v4
46+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
4747
with:
4848
node-version-file: '.nvmrc'
4949
cache: 'npm'
@@ -54,17 +54,18 @@ jobs:
5454
- name: Create meeting artifacts
5555
env:
5656
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
57-
GOOGLE_SERVICE_ACCOUNT_EMAIL: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_EMAIL }}
58-
GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY: ${{ secrets.GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY }}
57+
HACKMD_API_TOKEN: ${{ secrets.HACKMD_API_TOKEN }}
58+
HACKMD_TEAM_NAME: ${{ secrets.HACKMD_TEAM_NAME }}
59+
GOOGLE_API_KEY: ${{ secrets.GOOGLE_API_KEY }}
5960
run: node create-node-meeting-artifacts.mjs ${{ github.event.inputs.meeting_group }}
6061

6162
- name: Upload artifacts
6263
if: always()
63-
uses: actions/upload-artifact@v4
64+
uses: actions/upload-artifact@50769540e7f4bd5e21e526ee35c689e35e0d6874 # v4.4.0
6465
with:
6566
name: meeting-artifacts-${{ github.event.inputs.meeting_group || 'tsc' }}
6667
path: |
6768
~/.make-node-meeting/
68-
minutes_temp.txt
69+
*.md
6970
retention-days: 7
7071
if-no-files-found: ignore

.github/workflows/test.yml

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,39 @@
1+
name: Test Suite
2+
3+
on:
4+
push:
5+
branches:
6+
- main
7+
pull_request:
8+
branches:
9+
- main
10+
11+
jobs:
12+
test:
13+
runs-on: ubuntu-latest
14+
15+
strategy:
16+
matrix:
17+
node-version: [22.x, 'latest']
18+
19+
steps:
20+
- name: Checkout repository
21+
uses: actions/checkout@692973e3d937129bcbf40652eb9f2f61becf3332 # v4.1.7
22+
23+
- name: Setup Node.js ${{ matrix.node-version }}
24+
uses: actions/setup-node@1e60f620b9541d16bece96c5465dc8ee9832be0b # v4.0.3
25+
with:
26+
node-version: ${{ matrix.node-version }}
27+
cache: 'npm'
28+
29+
- name: Install dependencies
30+
run: npm ci
31+
32+
- name: Run linting
33+
run: npm run lint
34+
35+
- name: Run tests
36+
run: npm test
37+
38+
- name: Check format
39+
run: npm run format:check

.gitignore

Lines changed: 14 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,15 @@
1+
# Node.js Packages
12
node_modules/
2-
client_secret.json
3-
package-lock.json
3+
4+
# Environment File
5+
.env
6+
7+
# Test artifacts and temporary files
8+
test/fixtures/temp/
9+
test/snapshots/*.snap
10+
*.log
11+
coverage/
12+
13+
# Files created during unit test runs
14+
*.sh
15+
meeting-test/

.prettierignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
templates/

AUTHORS

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1 +1,2 @@
11
Michael Dawson <mdawson@devrus.com>
2+
Claudio Wunder <cwunder@gnome.org>

README.md

Lines changed: 24 additions & 25 deletions
Original file line numberDiff line numberDiff line change
@@ -1,13 +1,14 @@
11
# Node.js Meeting Artifacts Creator
22

3-
A modern Node.js application that creates GitHub issues and Google Docs for Node.js team meetings. This tool automates the process of reading meeting configuration, fetching calendar events, creating meeting minutes documents, and posting GitHub issues.
3+
A modern Node.js application that creates GitHub issues and HackMD documents for Node.js team meetings. This tool automates the process of reading meeting configuration, fetching calendar events, creating meeting minutes documents, and posting GitHub issues.
44

55
## 📋 Requirements
66

77
- Node.js 22+ (LTS)
88
- GitHub Personal Access Token
9-
- Google Cloud Project with Calendar and Drive APIs enabled
10-
- OAuth credentials or Service Account credentials
9+
- Google Cloud Project with Calendar API enabled (for meeting scheduling)
10+
- Google API Key for Calendar access
11+
- HackMD API Token (for meeting minutes)
1112

1213
## 🔑 Authentication Setup
1314

@@ -18,23 +19,25 @@ A modern Node.js application that creates GitHub issues and Google Docs for Node
1819
- `repo` (Full control of private repositories)
1920
- `user` (Read user information)
2021

21-
### Google Authentication
22+
### HackMD Authentication
2223

23-
#### Option 1: OAuth (for local development)
24+
1. Go to [HackMD](https://hackmd.io/) and sign in to your account
25+
2. Navigate to Account Settings > API Tokens
26+
3. Create a new API token for the meeting artifacts tool
27+
4. Optionally, create or join a team workspace for better organization
2428

25-
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
26-
2. Create a new project or select an existing one
27-
3. Enable the Google Calendar API and Google Drive API
28-
4. Create OAuth 2.0 credentials (Desktop Application)
29-
5. Add credentials to `.env` file
29+
### Google Authentication (Calendar Only)
3030

31-
#### Option 2: Service Account (for GitHub Actions)
31+
#### API Key Authentication (Recommended)
3232

3333
1. Go to [Google Cloud Console](https://console.cloud.google.com/)
3434
2. Create a new project or select an existing one
35-
3. Enable the Google Calendar API and Google Drive API
36-
4. Create a Service Account and generate JSON key file
37-
5. Add credentials to environment variables
35+
3. Enable the Google Calendar API
36+
4. Go to **Credentials****Create Credentials****API Key**
37+
5. Restrict the API key to the Google Calendar API for security
38+
6. Add the API key to your environment variables as `GOOGLE_API_KEY`
39+
40+
**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.
3841

3942
## 🎯 Available Meeting Commands
4043

@@ -195,8 +198,8 @@ node --env-file=.env create-node-meeting-artifacts.mjs tsc
195198
The application creates:
196199

197200
1. **GitHub Issue**: Posted to the configured repository with meeting details and agenda
198-
2. **Google Doc**: Meeting minutes document stored in the `/nodejs-meetings` folder
199-
3. **Console Output**: Links to both the created issue and document
201+
2. **HackMD Document**: Meeting minutes document in Markdown format with collaborative editing
202+
3. **Console Output**: Links to both the created issue and HackMD document
200203

201204
## 🔧 Configuration
202205

@@ -205,19 +208,15 @@ The application creates:
205208
#### Required
206209

207210
- `GITHUB_TOKEN`: GitHub Personal Access Token
211+
- `HACKMD_API_TOKEN`: HackMD API token for creating and managing documents
208212

209-
#### Google Authentication (choose one)
210-
211-
**OAuth (Local Development):**
213+
#### HackMD Configuration (optional)
212214

213-
- `GOOGLE_CLIENT_ID`: OAuth client ID
214-
- `GOOGLE_CLIENT_SECRET`: OAuth client secret
215-
- `GOOGLE_REDIRECT_URI`: OAuth redirect URI (default: `http://localhost:3000/oauth2callback`)
215+
- `HACKMD_TEAM_NAME`: HackMD team name/path for team workspaces
216216

217-
**Service Account (GitHub Actions):**
217+
#### Google Authentication
218218

219-
- `GOOGLE_SERVICE_ACCOUNT_EMAIL`: Service account email
220-
- `GOOGLE_SERVICE_ACCOUNT_PRIVATE_KEY`: Service account private key (JSON format)
219+
- `GOOGLE_API_KEY`: Google Calendar API Key for read-only calendar access
221220

222221
#### Optional
223222

TEMPLATES_DOCUMENTATION.md

Lines changed: 19 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,8 @@
11
This document contains empty versions of each template needed to successfully create meeting artifacts for a Committee, Working Group, Initiative, or Team. These documents need to go in the [/templates](./templates) directory in this repository.
22

3-
There are only four variables in the documents that _need_ to be changed:
3+
## Template Variables
4+
5+
There are several variables in the documents that need to be configured:
46

57
- **`<name>`:** The name of the Committee, Working Group, Initiative, or Team that meeting artifacts are being created for.
68
- **`<shortname>`:** The abbreviated or shortened name for a group, used in each filename to connect associated files together.
@@ -11,6 +13,22 @@ There are only four variables in the documents that _need_ to be changed:
1113
- **`<issue-label>`:** an optional label for the created issue itself.
1214
- **`<observer>`:** Name of an observer in a group's meetings.
1315

16+
## Meeting Properties Reference
17+
18+
The following properties are available in meeting base templates and can be used in meeting issue generation:
19+
20+
- **`CALENDAR_FILTER`:** The name of calendar events that mark the group's meeting date/time
21+
- **`CALENDAR_ID`:** The Google Calendar ID for the Node.js calendar (typically `nodejs.org_nr77ama8p7d7f9ajrpnu506c98@group.calendar.google.com`)
22+
- **`USER`:** The GitHub username/organization (typically `nodejs`)
23+
- **`REPO`:** The repository name where meeting issues are created
24+
- **`GROUP_NAME`:** The full name of the Committee, Working Group, Initiative, or Team
25+
- **`AGENDA_TAG`:** The label used to search for agenda items in GitHub issues and PRs
26+
- **`HOST`:** Meeting host information
27+
- **`JOINING_INSTRUCTIONS`:** Instructions for joining the meeting (Zoom links, YouTube streams, etc.)
28+
- **`ISSUE_LABEL`:** Optional label to apply to the created meeting issue
29+
30+
These properties are defined in the `meeting_base_<shortname>` template files and are substituted when generating meeting issues.
31+
1432
# Invited
1533

1634
The [GitHub Team](https://help.github.com/articles/about-teams/) to invite. The @mention should be a GitHub Team whose members are all invidiuals who are always invited.

0 commit comments

Comments
 (0)