Add db cli for registering workloads and DT projects#45
Open
lukpueh wants to merge 1 commit into
Open
Conversation
Adds a `pia` console entry point with two subcommands: pia add-workload <ef_project_id> <url> pia add-dt-project <ef_project_id> <dt_url> <parent_name> <project_name> `add-workload` accepts a GitHub repo URL (creates a GitHubWorkload, looking up the owner id via the GitHub API), or a URL prefixed with the Jenkins issuer prefix (creates a JenkinsWorkload). `add-dt-project` resolves a DependencyTrack root/child project pair by name and stores its UUID. **Notes on remote access** * Pia DB write access via PIA_DATABASE_URL, e.g. `postgresql://user:secret@localhost:5432/pia ` * GitHub API calls are not authenticated * DT API access requires a PIA_DEPENDENCY_TRACK_API_KEY with VIEW_PORTFOLIO permission. Documented in DESIGN.md section 5.5. Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com> Signed-off-by: Lukas Puehringer <lukas.puehringer@eclipse-foundation.org>
mbarbero
approved these changes
May 12, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Adds a
piaconsole entry point with two subcommands:add-workloadaccepts a GitHub repo URL (creates a GitHubWorkload, looking up the owner id via the GitHub API), or a URL prefixed with the Jenkins issuer prefix (creates a JenkinsWorkload).add-dt-projectresolves a DependencyTrack root/child project pair by name and stores its UUID.Notes on remote access
postgresql://user:secret@localhost:5432/piaDocumented in DESIGN.md section 5.5.