Skip to content

Commit

Permalink
connectors: cli remove skipReason for page and databases (#3352)
Browse files Browse the repository at this point in the history
  • Loading branch information
spolu authored Jan 22, 2024
1 parent 659de6a commit 24fa8ce
Showing 1 changed file with 26 additions and 0 deletions.
26 changes: 26 additions & 0 deletions connectors/src/admin/cli.ts
Original file line number Diff line number Diff line change
Expand Up @@ -335,6 +335,18 @@ const notion = async (command: string, args: parseArgs.ParsedArgs) => {
},
});

if (args.remove) {
if (existingPage) {
console.log(`Removing skipped page reason for ${pageId}`);
await existingPage.update({
skipReason: null,
});
} else {
console.log(`Page ${pageId} is not skipped, nothing to remove`);
}
return;
}

const skipReason = args.reason || "blacklisted";

if (existingPage) {
Expand Down Expand Up @@ -387,6 +399,20 @@ const notion = async (command: string, args: parseArgs.ParsedArgs) => {
},
});

if (args.remove) {
if (existingDatabase) {
console.log(`Removing skipped database reason for ${databaseId}`);
await existingDatabase.update({
skipReason: null,
});
} else {
console.log(
`Database ${databaseId} is not skipped, nothing to remove`
);
}
return;
}

if (existingDatabase) {
if (args.reason) {
console.log(
Expand Down

0 comments on commit 24fa8ce

Please sign in to comment.