Skip to content

Licens check - #22

Merged
ACodingPhilosopher merged 19 commits into
mainfrom
licens-check
Jul 21, 2026
Merged

Licens check#22
ACodingPhilosopher merged 19 commits into
mainfrom
licens-check

Conversation

@SondreFjaertoft

Copy link
Copy Markdown
Contributor

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.

@ACodingPhilosopher
ACodingPhilosopher merged commit 9d366d7 into main Jul 21, 2026
1 check passed
@ACodingPhilosopher
ACodingPhilosopher deleted the licens-check branch July 21, 2026 11:15

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-project composite action + script to resolve/validate a DT project UUID (with retry + soft-fail outputs).
  • Added dt-license-check composite action that paginates project components, enriches licenses from the DT catalog, and writes a grouped report to GITHUB_STEP_SUMMARY.
  • Added reusable workflow .github/workflows/license-check.yml to 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
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.

3 participants