From e993d1cba27139962128d0757c06e37ecfc20acd Mon Sep 17 00:00:00 2001 From: IronBlood Date: Fri, 6 Feb 2026 12:57:58 +0800 Subject: [PATCH 1/2] refactor: rename maps_url to url --- .github/workflows/publish.yml | 2 ++ data/dummy.yml | 8 ++++---- events.schema.json | 2 +- src/types.ts | 2 +- 4 files changed, 8 insertions(+), 6 deletions(-) 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/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 } From 7b53a652a7ca82b905c7b3ff2b9184a880b02883 Mon Sep 17 00:00:00 2001 From: IronBlood Date: Wed, 11 Mar 2026 14:32:31 +0800 Subject: [PATCH 2/2] fix: field --- src/data.ts | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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,