diff --git a/src/notion/agent.ts b/src/notion/agent.ts index 8aea377..5ae4ee8 100644 --- a/src/notion/agent.ts +++ b/src/notion/agent.ts @@ -64,7 +64,7 @@ export interface Change { status: TestStatus; pageUrl: string; pageId: string; - priority: string; + importance: string; assigned: { id: string }[]; active: boolean; isNewTest: boolean; @@ -220,7 +220,7 @@ export async function updateNotionTestsDB(files?: File[]) { status: test.status, pageId: testOldPage.id, pageUrl: testOldPage.url, - priority: testOldPage.properties.priority.select?.name ?? null, + importance: testOldPage.properties.importance.select?.name ?? null, assigned: testOldPage.properties.assigned.people.map(({ id }) => ({ id })), active: testOldPage.properties.active.checkbox || newActive, isNewTest, @@ -328,8 +328,8 @@ export async function updateNotionIssuesDB(stacks: Stack[], changes: Changes, re test: { relation: [{ id: changes[stack.id].pageId, }] }, - priority: (changes[stack.id].priority - ? { select: { name: changes[stack.id].priority } } + importance: (changes[stack.id].importance + ? { select: { name: changes[stack.id].importance } } : undefined ), assigned: { people: changes[stack.id].assigned }, diff --git a/src/notion/databases/IssuesDatabase.ts b/src/notion/databases/IssuesDatabase.ts index c491ff7..6b8b248 100644 --- a/src/notion/databases/IssuesDatabase.ts +++ b/src/notion/databases/IssuesDatabase.ts @@ -10,7 +10,7 @@ const requiredProps = { name: { name: { EN: 'Message', FR: 'Message' }, type: 'title' }, test: { name: { EN: 'Associated test', FR: 'Test associé' }, type: 'relation' }, assigned: { name: { EN: 'Assigned', FR: 'Assigné' }, type: 'people' }, - priority: { name: { EN: 'Priority', FR: 'Priorité' }, type: 'select' }, + importance: { name: { EN: 'Importance', FR: 'Importance' }, type: 'select' }, status: { name: { EN: 'Test status', FR: 'État du test' }, type: 'rollup', optional: true }, } as const; diff --git a/src/notion/databases/TestsDatabase.ts b/src/notion/databases/TestsDatabase.ts index 3983204..594725e 100644 --- a/src/notion/databases/TestsDatabase.ts +++ b/src/notion/databases/TestsDatabase.ts @@ -23,7 +23,7 @@ const requiredProps = { tag: { name: { EN: 'Tag', FR: 'Tag' }, type: 'select' }, fileName: { name: { EN: 'File', FR: 'Fichier' }, type: 'select' }, assigned: { name: { EN: 'Assigned', FR: 'Assigné' }, type: 'people' }, - priority: { name: { EN: 'Priority', FR: 'Priorité' }, type: 'select' }, + importance: { name: { EN: 'Importance', FR: 'Importance' }, type: 'select' }, status: { name: { EN: 'Status', FR: 'État' }, type: 'status' }, archived: { name: { EN: 'Archived', FR: 'Archivé' }, type: 'checkbox' }, active: { name: { EN: 'Active', FR: 'Actif' }, type: 'checkbox' }, diff --git a/tests/sameStackExample.test.ts b/tests/sameStack/examples.test.ts similarity index 100% rename from tests/sameStackExample.test.ts rename to tests/sameStack/examples.test.ts