mirror of
https://github.com/spacebarchat/spacebarchat.git
synced 2024-11-25 11:52:56 +01:00
🐛 fix notion sync
This commit is contained in:
parent
046a30e9a6
commit
21ba7f28d3
@ -44,7 +44,7 @@ class GithubNotionSync {
|
|||||||
|
|
||||||
for (let repo of this.repos) {
|
for (let repo of this.repos) {
|
||||||
for (let issue of await this.getAllIssuesPerRepo(repo)) {
|
for (let issue of await this.getAllIssuesPerRepo(repo)) {
|
||||||
await this.addItemToDb(issue);
|
this.addItemToDb(issue);
|
||||||
issues++;
|
issues++;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@ -133,7 +133,7 @@ class GithubNotionSync {
|
|||||||
}
|
}
|
||||||
|
|
||||||
async addItemToDb(issue) {
|
async addItemToDb(issue) {
|
||||||
const priority = issue.labels.find((x) => PRIORITIES.includes(x.name))?.name;
|
const priority = issue.labels.find((x) => PRIORITIES.includes(x.name.toLowerCase()))?.name;
|
||||||
|
|
||||||
const options = {
|
const options = {
|
||||||
parent: { database_id: this.databaseID },
|
parent: { database_id: this.databaseID },
|
||||||
@ -169,7 +169,7 @@ class GithubNotionSync {
|
|||||||
...(issue.labels && {
|
...(issue.labels && {
|
||||||
Label: {
|
Label: {
|
||||||
multi_select: issue.labels
|
multi_select: issue.labels
|
||||||
.filter((x) => !PRIORITIES.includes(x.name))
|
.filter((x) => !PRIORITIES.includes(x.name.toLowerCase()))
|
||||||
.map((x) => ({ name: x.name })),
|
.map((x) => ({ name: x.name })),
|
||||||
},
|
},
|
||||||
}),
|
}),
|
||||||
|
Loading…
Reference in New Issue
Block a user