Skip to content

feat(prepare-sources): scaffold pipeline CLI and GitHub Action - #154

Merged
davidfestal merged 17 commits into
redhat-developer:mainfrom
davidfestal:add-downstream-prepare-source-cli
Aug 25, 2026
Merged

feat(prepare-sources): scaffold pipeline CLI and GitHub Action#154
davidfestal merged 17 commits into
redhat-developer:mainfrom
davidfestal:add-downstream-prepare-source-cli

Conversation

@davidfestal

@davidfestal davidfestal commented Aug 3, 2026

Copy link
Copy Markdown
Member

Add the prepare-sources Node.js package with a pluggable pipeline runner, CLI argument parsing, a composite GitHub Action, and a CI workflow. Includes shared types, fixture-based test utilities, a template module, and placeholder pipeline modules for the RHDH supported sources flow.

Fixes RHIDP-15831

…b Action

Add the initial `prepare-rhdh-supported-sources` Node.js package with a
pluggable pipeline runner, CLI argument parsing, a composite GitHub Action,
and a CI workflow. Includes shared types, fixture-based test utilities, a
template module, and placeholder pipeline modules for the RHDH supported
sources flow.

Signed-off-by: David Festal <dfestal@redhat.com>
…mat test utilities

Signed-off-by: David Festal <dfestal@redhat.com>
Comment thread prepare-sources/lib/pipeline.ts Fixed
Comment thread prepare-sources/lib/pipeline.ts Fixed
Comment thread .github/workflows/check-packages.yaml Fixed
Comment thread .github/workflows/check-packages.yaml Fixed
@jonkoops
jonkoops requested review from jonkoops and polasudo August 11, 2026 10:26
davidfestal and others added 4 commits August 11, 2026 18:25
…r dependency install

Signed-off-by: David Festal <dfestal@redhat.com>
…ilities.

Signed-off-by: David Festal <dfestal@redhat.com>
The rhdh prefix is redundant since the repo is already RHDH-scoped, and
"supported" is implied by context. Renamed the package directory, CI
workflow references, GitHub Action metadata, and CLI usage string.

Signed-off-by: Jon Koops <jonkoops@gmail.com>
Bump to Node 24, @types/node 24, vite-plus 0.2.9, and add explicit
typescript 7. Replace .node-version with devEngines. Use setup-vp in
CI instead of setup-node + npm ci, pin actions to commit hashes, and
rename the workflow. Trim tsconfig to TS7 defaults and add stricter
checks (noUncheckedIndexedAccess, noImplicitReturns,
noFallthroughCasesInSwitch). Configure type-aware linting in
vite.config.

Signed-off-by: Jon Koops <jonkoops@gmail.com>
@jonkoops jonkoops changed the title feat(prepare-rhdh-supported-sources): scaffold pipeline CLI and GitHub Action feat(prepare-sources): scaffold pipeline CLI and GitHub Action Aug 18, 2026
Assisted-by: Cursor
Signed-off-by: David Festal <dfestal@redhat.com>
@davidfestal
davidfestal force-pushed the add-downstream-prepare-source-cli branch from 6fa4274 to 9cd9a2a Compare August 20, 2026 16:11
Comment thread prepare-sources/README.md Outdated
Comment thread prepare-sources/README.md Outdated
Comment thread prepare-sources/README.md Outdated
Comment thread prepare-sources/README.md Outdated
Comment thread prepare-sources/README.md Outdated
Comment thread prepare-sources/README.md Outdated
Comment thread prepare-sources/README.md
Comment thread prepare-sources/README.md Outdated
Comment thread prepare-sources/README.md Outdated
Comment thread prepare-sources/README.md
davidfestal and others added 3 commits August 20, 2026 19:53
Assisted-by: Cursor
Signed-off-by: David Festal <dfestal@redhat.com>
Remove the structured logging and minimal dependencies sections,
move pipeline modules up below usage, add the --help flag, and
fix inaccurate descriptions.

Signed-off-by: Jon Koops <jonkoops@gmail.com>
Merge parseArgs into cli.ts since it has no other consumers. Refactor
CliArgs to a discriminated union for type-safe command dispatch, fix
--help to print to stdout and exit 0, report missing required flags
individually, and rewrite the usage text to follow GNU conventions.

Signed-off-by: Jon Koops <jonkoops@gmail.com>
Comment thread prepare-sources/action.yaml
…dirs

Replace module-level tempDirs arrays and afterEach hooks with the
Disposable protocol. ModuleFixture and TempDir implement Symbol.dispose,
so callers use `using` declarations for automatic cleanup tied to scope
rather than shared mutable state. Consolidate the duplicated tempDir
helpers into a single exported makeTempDir in test-utils.

Signed-off-by: Jon Koops <jonkoops@gmail.com>
Replace switch with if/else if, remove the try/catch wrapper, and drop
explicit exit codes. Errors now propagate naturally with full stack
traces and Node.js sets the exit status automatically.

Ref: https://redhat.atlassian.net/browse/RHIDP-1234
Signed-off-by: Jon Koops <jonkoops@gmail.com>
… module

Move SourceJson type, field validation, file reading, and parsing logic
from pipeline.ts into source.ts. The new readSourceFile() function
provides validated, cast-free parsing with chained error causes. Error
messages now consistently quote file paths and use a unified prefix.

Signed-off-by: Jon Koops <jonkoops@gmail.com>
Comment thread prepare-sources/lib/source.ts Fixed
Extract each variant of the CliArgs discriminated union into a named
interface (HelpArgs, ListModulesArgs, RunArgs) for readability.

Signed-off-by: Jon Koops <jonkoops@gmail.com>
… pipeline.ts

Co-locate the pipeline types with the code that creates and consumes
them, eliminating the types.ts barrel file.

Signed-off-by: Jon Koops <jonkoops@gmail.com>
Enable the oxlint suspicious category as errors and fix the three
violations: inline a test helper to satisfy consistent-function-scoping,
replace sort() with toSorted() to avoid array mutation.

Signed-off-by: Jon Koops <jonkoops@gmail.com>
Wrap module failures with Error cause instead of log-and-rethrow, and
switch progress logging from console.error to console.info.

Signed-off-by: Jon Koops <jonkoops@gmail.com>
@sonarqubecloud

Copy link
Copy Markdown

@davidfestal
davidfestal merged commit 5b93eea into redhat-developer:main Aug 25, 2026
3 checks passed
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.

4 participants