diff --git a/dist/index.js b/dist/index.js index e8176c9..760d01f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -77,6 +77,7 @@ class NotionAdapter extends NotionClient { } } async createPage(input) { + const ghLabels = input.lables.map((l) => ({ name: l.name })); try { await this.client.pages.create({ parent: { @@ -101,6 +102,9 @@ class NotionAdapter extends NotionClient { }, State: { select: { name: input.state } + }, + Label: { + multi_select: ghLabels } } }); diff --git a/src/adapter.ts b/src/adapter.ts index 309a290..10a6530 100644 --- a/src/adapter.ts +++ b/src/adapter.ts @@ -63,6 +63,7 @@ export class NotionAdapter extends NotionClient { } async createPage(input: IPageInput): Promise<{ error?: Error | unknown; }> { + const ghLabels = input.lables.map((l: any) => ({name: l.name})) try { await this.client.pages.create({ parent: { @@ -87,6 +88,9 @@ export class NotionAdapter extends NotionClient { }, State: { select: { name: input.state } + }, + Label: { + multi_select: ghLabels } } });