Skip to content

Commit

Permalink
fix: 🐛 add onSite option, and remove unnecessary files
Browse files Browse the repository at this point in the history
  • Loading branch information
ilirbeqirii committed Jun 29, 2024
1 parent ceb227f commit 78ad4bd
Show file tree
Hide file tree
Showing 7 changed files with 15 additions and 7 deletions.

This file was deleted.

This file was deleted.

7 changes: 6 additions & 1 deletion plugin/src/generators/create-event/generator.ts
Original file line number Diff line number Diff line change
Expand Up @@ -39,6 +39,11 @@ export async function createEventGenerator(
return exit(1);
}

if (options.isOnsite === null || options.isOnsite === undefined) {
logger.error('[angular-hub] isOnsite is missing');
return exit(1);
}

const communities: Community[] = readJson(tree, COMMUNITIES_PATH);
const selectedCommunity = communities.find(
(community) =>
Expand Down Expand Up @@ -71,7 +76,7 @@ export async function createEventGenerator(
language: options.language,
isFree: options.isFree,
isRemote: options.isRemote,
isOnsite: !options.isRemote,
isOnsite: options.isOnsite,
callForPapers: options.callForPapers ?? '',
callForPapersDueDate: options.callForPapersDueDate ?? '',
url: options.url ?? '',
Expand Down
2 changes: 1 addition & 1 deletion plugin/src/generators/create-event/schema.d.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ export interface CreateEventGeneratorSchema {
language: string;
isFree: boolean;
isRemote: boolean;
// isOnsite: boolean; detected through isRemote flag
isOnsite: boolean;
callForPapers?: string | null;
callForPapersDueDate?: string | null;
url?: string;
Expand Down
8 changes: 7 additions & 1 deletion plugin/src/generators/create-event/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,11 @@
"description": "if it's a remote event or not",
"x-prompt": "Is it a remote event?"
},
"isOnsite": {
"type": "boolean",
"description": "if it's an on-site event or not",
"x-prompt": "Is it on-site event?"
},
"callForPapers": {
"type": "string",
"description": "Provide the Call-For-Paper (CFP) form url",
Expand All @@ -92,6 +97,7 @@
"date",
"language",
"isFree",
"isRemote"
"isRemote",
"isOnsite"
]
}

This file was deleted.

2 changes: 1 addition & 1 deletion plugin/src/generators/create-podcast/schema.json
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"url": {
"type": "string",
"description": "Provide the site url",
"x-prompt": "Provide the site url"
"x-prompt": "Provide the preferred podcast platform link"
},
"logo": {
"type": "string",
Expand Down

0 comments on commit 78ad4bd

Please sign in to comment.