diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index cf8a10c..e4f3a27 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -4,11 +4,13 @@ on: pull_request: paths: - "data/events.yml" + - "events.schema.json" push: branches: - main paths: - "data/events.yml" + - "events.schema.json" permissions: contents: read diff --git a/data/dummy.yml b/data/dummy.yml index f27e9a4..fc942f6 100644 --- a/data/dummy.yml +++ b/data/dummy.yml @@ -15,18 +15,18 @@ location: Garden Books, 325 Changle Road, Xuhui District, shanghai - id: 9193c7ad-db78-4cd6-8d6c-8ce5daef61aa - title: test event with location and maps_url + title: test event with location and url kind: test start: 2026-02-04T17:00:00+08:00 end: 2026-02-04T18:00:00+08:00 location: Garden Books, 325 Changle Road, Xuhui District, shanghai - maps_url: https://www.openstreetmap.org/#map=18/31.221825/121.452855 + url: https://www.openstreetmap.org/#map=18/31.221825/121.452855 - id: 9193c7ad-db78-4cd6-8d6c-8ce5daef2222 - title: test event with location, maps_url and description + title: test event with location, url and description kind: test start: 2026-02-05T17:00:00+08:00 end: 2026-02-05T18:00:00+08:00 location: Garden Books, 325 Changle Road, Xuhui District, shanghai - maps_url: https://www.openstreetmap.org/#map=18/31.221825/121.452855 + url: https://www.openstreetmap.org/node/4623058291 description: foo diff --git a/events.schema.json b/events.schema.json index 07d4e92..b6cac2d 100644 --- a/events.schema.json +++ b/events.schema.json @@ -44,7 +44,7 @@ "location": { "type": "string" }, - "maps_url": { + "url": { "type": "string" }, "description": { diff --git a/src/data.ts b/src/data.ts index 35d47fe..375fed7 100644 --- a/src/data.ts +++ b/src/data.ts @@ -114,7 +114,7 @@ export function to_ics_event(e: EventRecord): EventAttributes { title: e.title, description: e.description, location: e.location, - url: e.maps_url, + url: e.url, organizer: ORGANIZER, alarms: DEFAULT_ALARMS, diff --git a/src/types.ts b/src/types.ts index d7efa6b..01fdb1d 100644 --- a/src/types.ts +++ b/src/types.ts @@ -11,5 +11,5 @@ export interface EventRecord { description?: string; location?: string; // human-friendly address is usually enough - maps_url?: string; // event page + url?: string; // event page }