feat(action): Add sync-meetup-events action and workflow#16
feat(action): Add sync-meetup-events action and workflow#16
Conversation
There was a problem hiding this comment.
Pull Request Overview
This PR introduces automation to scrape and sync Meetup.com events into a JSON file. The implementation provides a reusable GitHub Action that uses Puppeteer for web scraping and Cheerio for HTML parsing, along with a scheduled workflow to run the sync daily.
Key Changes:
- New custom GitHub Action for scraping Meetup events with configurable organization and output path
- Scheduled workflow that runs daily at 6 AM UTC and supports manual dispatch
- Event data includes ID, name, link, date, and images extracted from OpenGraph meta tags
Reviewed Changes
Copilot reviewed 6 out of 7 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| actions/sync-meetup-events/package.json | Defines Node.js dependencies (Puppeteer 23.0.0, Cheerio 1.0.0) |
| actions/sync-meetup-events/index.js | Core scraping logic with Puppeteer browser automation and image extraction |
| actions/sync-meetup-events/action.yml | GitHub Action metadata defining inputs and Node 20 runtime |
| actions/sync-meetup-events/README.md | Comprehensive documentation with usage examples and JSON structure |
| actions/sync-meetup-events/.gitignore | Standard Node.js gitignore patterns |
| .github/workflows/sync-events.yml | Workflow orchestrating the action execution with git commit automation |
Files not reviewed (1)
- actions/sync-meetup-events/package-lock.json: Language not supported
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
| Jul: '07', Aug: '08', Sep: '09', Oct: '10', Nov: '11', Dec: '12' | ||
| }; | ||
| const monthNum = monthMap[month]; | ||
| const year = '2025'; // Asumir 2025 |
There was a problem hiding this comment.
Hardcoded year '2025' will cause incorrect dates once 2026 begins. The year should be determined dynamically based on the current date and the event's month/day to handle year boundaries correctly.
| const year = '2025'; // Asumir 2025 | |
| // Determine year dynamically | |
| const now = new Date(); | |
| const eventMonth = parseInt(monthNum, 10); | |
| const eventDay = parseInt(day, 10); | |
| let year = now.getFullYear(); | |
| // If event month/day is before today, assume next year | |
| if ( | |
| eventMonth < (now.getMonth() + 1) || | |
| (eventMonth === (now.getMonth() + 1) && eventDay < now.getDate()) | |
| ) { | |
| year = year + 1; | |
| } |
| await page.goto(meetupUrl, { waitUntil: 'networkidle2', timeout: 60000 }); | ||
|
|
||
| // Esperar a que cargue | ||
| await new Promise(resolve => setTimeout(resolve, 5000)); |
There was a problem hiding this comment.
[nitpick] Magic number 5000 (milliseconds) should be extracted to a named constant like PAGE_LOAD_DELAY_MS to improve code clarity and maintainability.
| with: | ||
| json-path: 'public/data/issues.json' | ||
| meetup-org: 'ghspain' | ||
|
|
There was a problem hiding this comment.
The example references steps.verify-changed-files but the actual step ID in the workflow file is verify-changed-files. This step doesn't exist in the example workflow, causing the conditional to always evaluate as false.
| - name: Verify changed files | |
| id: verify-changed-files | |
| run: | | |
| if git diff --quiet public/data/issues.json; then | |
| echo "changed=false" >> $GITHUB_OUTPUT | |
| else | |
| echo "changed=true" >> $GITHUB_OUTPUT | |
| fi |
…ción de eventos Meetup
|
Resumen del último commit: afecta únicamente a ¿Qué cambia y por qué:
Motivación:
Si queréis, en una iteración posterior podemos añadir protección para evitar que el job se ejecute en forks (comprobando |
Adds a reusable GitHub Action to scrape/sync Meetup events and a workflow to run it on schedule and dispatch.