Skip to content

refactor: simplify card validation and option parsing - #121

Open
marcalexiei wants to merge 1 commit into
stats-organization:mainfrom
marcalexiei:validation
Open

refactor: simplify card validation and option parsing#121
marcalexiei wants to merge 1 commit into
stats-organization:mainfrom
marcalexiei:validation

Conversation

@marcalexiei

@marcalexiei marcalexiei commented Aug 15, 2026

Copy link
Copy Markdown
Contributor
  • Replace supportedCoreExports, the handler map and the required-option switch with a single CARDS map (card type → core export + required option); adding a card is now a one-line change.
  • Replace createCardHandlers + validateCardOptions with resolveCardHandler, which validates the card type, core exports and required option, then returns the handler.
  • Fold normalizeOptions into parseOptions, using URLSearchParams.getAll(key).join(",") instead of manual duplicate-key merging.
  • Move the usernameGITHUB_REPOSITORY_OWNER fallback into run(), since it's action behavior rather than card logic.

@marcalexiei

Copy link
Copy Markdown
Contributor Author

Hi @martin-mfg,
Could I get a review on this when you have a moment?
It's independent of my other open PR, so the two can be merged in either order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant