You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Improve completeness and reliability of Meetup event data by including recent past events and more robust parsing of iCal/JSON-LD sources.
Make debugging easier when running the sync script in CI by emitting diagnostics.
Expand when the GitHub Actions job runs to include pull requests and avoid committing from PR or workflow runs.
Description
Add MEETUP_PAST_EVENTS_URL and MEETUP_SYNC_DEBUG options, and wire MEETUP_SYNC_DEBUG into the script to emit debug logs.
Improve iCal handling by unescaping ical text (unescape_ical_text) and preserving multi-line values, and add debug counters for parsed iCal events.
Extend JSON-LD parsing to handle @graph nodes and extract performer names more reliably, with debug output for parsed counts.
Add a past-events crawl: extract event URLs from the past-events page (extract_event_urls_from_html), fetch event detail pages, parse their JSON-LD, and merge/dedupe results with merge_events to combine iCal and past-event data.
Add fetch_url helper with standardized headers, timeouts, and debug payload size logging.
Update fetch_events flow to try iCal first, then supplement with past-event crawl, then fallback to the main events page; raise consolidated errors when all sources fail.
Update the GitHub Actions workflow to run on pull_request, set MEETUP_SYNC_DEBUG: '1' in the job, refine the commit step to only run for push, schedule, or workflow_dispatch, and enhance stats printed after sync to show the most recent past event and its URL.
Document new environment variables and workflow behavior in README.md.
Add unit tests in tests/test_sync_meetup_events.py covering URL extraction, JSON-LD @graph support, and JSON-escaped URLs.
Testing
Ran the new unit tests with python -m unittest tests/test_sync_meetup_events.py, and all tests passed.
Executed the sync script locally to validate iCal parse and merged output with MEETUP_SYNC_DEBUG=1, and observed expected debug and log output (no automated failures).
Fallback to events page when iCal fetch yields no events
Returning immediately on any non-empty merged_events skips the main events-page fallback in cases where iCal fails/comes back empty but past-event crawling still finds historical items. In that scenario the sync publishes only past events and drops upcoming events that are still available on MEETUP_EVENTS_URL, which is a functional regression from the prior flow that always tried the events page after an iCal miss.
If Codex has suggestions, it will comment; otherwise it will react with 👍.
Codex can also answer questions or update the PR. Try commenting "@codex address that feedback".
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Motivation
Description
MEETUP_PAST_EVENTS_URLandMEETUP_SYNC_DEBUGoptions, and wireMEETUP_SYNC_DEBUGinto the script to emit debug logs.unescape_ical_text) and preserving multi-line values, and add debug counters for parsed iCal events.@graphnodes and extract performer names more reliably, with debug output for parsed counts.extract_event_urls_from_html), fetch event detail pages, parse their JSON-LD, and merge/dedupe results withmerge_eventsto combine iCal and past-event data.fetch_urlhelper with standardized headers, timeouts, and debug payload size logging.fetch_eventsflow to try iCal first, then supplement with past-event crawl, then fallback to the main events page; raise consolidated errors when all sources fail.pull_request, setMEETUP_SYNC_DEBUG: '1'in the job, refine the commit step to only run forpush,schedule, orworkflow_dispatch, and enhance stats printed after sync to show the most recent past event and its URL.README.md.tests/test_sync_meetup_events.pycovering URL extraction, JSON-LD@graphsupport, and JSON-escaped URLs.Testing
python -m unittest tests/test_sync_meetup_events.py, and all tests passed.MEETUP_SYNC_DEBUG=1, and observed expected debug and log output (no automated failures).Codex Task