Licens check - #22
Merged
Merged
Conversation
…improving fallback logic
… in license check
… output for fetched licenses
…nown license count categorization
…rmatting for clarity
ACodingPhilosopher
approved these changes
Jul 21, 2026
There was a problem hiding this comment.
Pull request overview
Adds a reusable Dependency-Track “license inventory” capability as a composite action and a reusable workflow, including a shared helper for resolving Dependency-Track project UUIDs. The goal is to soft-fail and publish a grouped license summary to the GitHub Job Summary.
Changes:
- Added
resolve-dt-projectcomposite action + script to resolve/validate a DT project UUID (with retry + soft-fail outputs). - Added
dt-license-checkcomposite action that paginates project components, enriches licenses from the DT catalog, and writes a grouped report toGITHUB_STEP_SUMMARY. - Added reusable workflow
.github/workflows/license-check.ymlto run the license check on a self-hosted runner.
Reviewed changes
Copilot reviewed 4 out of 4 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
resolve-dt-project/resolve-project.sh |
New bash resolver script for DT project UUID lookup + outputs. |
resolve-dt-project/action.yml |
New composite action wrapper around the resolver script. |
dt-license-check/action.yml |
New composite action to fetch components/licenses and write Job Summary report. |
.github/workflows/license-check.yml |
New reusable workflow that runs the license check action. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Comment on lines
+10
to
+17
| warn_and_exit() { | ||
| local message="$1" | ||
| echo "project_uuid=" >> "$GITHUB_OUTPUT" | ||
| echo "resolved=false" >> "$GITHUB_OUTPUT" | ||
| echo "base_url=${BASE_URL}" >> "$GITHUB_OUTPUT" | ||
| echo "::warning::${WARNING_PREFIX}: ${message}" | ||
| exit 0 | ||
| } |
Comment on lines
+81
to
+82
| trap 'warn_and_exit "Unexpected error while generating license inventory."' ERR | ||
|
|
Comment on lines
+380
to
+382
| if [[ "$UNKNOWN_LICENSE_COUNT" -gt 0 ]]; then | ||
| echo "::warning::DT license check: ${UNKNOWN_LICENSE_COUNT} component(s) have unknown licenses in ${DT_PROJECT_NAME}" | ||
| fi |
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.
Her e mykje greior.
Dinna finne ut kalla lisensa som blir brukt i prosjekta og vise det til dei som e interessert (github summary).
Be my guest.