Skip to content

Commit

Permalink
Rename a property and a test
Browse files Browse the repository at this point in the history
  • Loading branch information
Mathieu2301 committed Jul 25, 2023
1 parent c6eeec7 commit 186a48a
Show file tree
Hide file tree
Showing 4 changed files with 6 additions and 6 deletions.
8 changes: 4 additions & 4 deletions src/notion/agent.ts
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ export interface Change {
status: TestStatus;
pageUrl: string;
pageId: string;
priority: string;
importance: string;
assigned: { id: string }[];
active: boolean;
isNewTest: boolean;
Expand Down Expand Up @@ -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,
Expand Down Expand Up @@ -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 },
Expand Down
2 changes: 1 addition & 1 deletion src/notion/databases/IssuesDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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;

Expand Down
2 changes: 1 addition & 1 deletion src/notion/databases/TestsDatabase.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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' },
Expand Down
File renamed without changes.

0 comments on commit 186a48a

Please sign in to comment.