Skip to content

Conversation

@mnsboev
Copy link
Contributor

@mnsboev mnsboev commented Jul 27, 2025

  • All tests passed. If this feature is not already covered by the tests, I added new tests.
  • All static analysis checks passed.
  • This pull request is on the dev branch.
  • I used gofmt for formatting the code before submitting the pull request.

Description
Add Summary Markdown Table for Create Evidence Command

This PR is part of a series of three that enhances the documentation for the "create evidence" command by introducing a summary markdown table.
jfrog-cli PR: jfrog/jfrog-cli#3042
jfrog-cli-artifactory PR: jfrog/jfrog-cli-artifactory#112

Summary
This addition aims to improve the user experience by providing a clear and concise overview of the evidence being created. The markdown table includes the following columns:

Evidence Subject: Links to the relevant evidence files, allowing users to easily access them.
Evidence Type: Specifies the type of evidence being recorded (e.g., in-toto).
Verification Status: Indicates whether the evidence has been verified, complete with visual status indicators (e.g., ✅ Verified).
Example Output
When the create evidence command is executed, users will see a collapsible section that looks like this:

🔎 Evidence

Evidence SubjectEvidence TypeVerification Status
📄 cli-sigstore-test/commons-1.0.0.txtin-toto✅ Verified

@ehl-jf ehl-jf merged commit 9cf424e into jfrog:dev Aug 4, 2025
6 of 7 checks passed

func GenerateEvidenceUrlByType(data EvidenceSummaryData, section summarySection) (string, error) {
switch data.SubjectType {
// Currently, it is not possible to generate a link to the evidence tab for packages in the Artifactory UI.
Copy link
Collaborator

Choose a reason for hiding this comment

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

I'm not ok with merging this comment on an open source.

}

func generateReleaseBundleEvidenceUrl(data EvidenceSummaryData, section summarySection) (string, error) {
if data.ReleaseBundleName == "" || data.ReleaseBundleVersion == "" {
Copy link
Collaborator

Choose a reason for hiding this comment

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

explain this use case? when do we find release bundle type without release bundle name and release bundle version

urlStr := fmt.Sprintf(releaseBundleEvidenceFormat,
StaticMarkdownConfig.GetPlatformUrl(),
data.ReleaseBundleName,
data.RepoKey,
Copy link
Collaborator

Choose a reason for hiding this comment

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

What is the repokey in this case?
-release-bundle-v2?

ReleaseBundleName string `json:"releaseBundleName"`
ReleaseBundleVersion string `json:"releaseBundleVersion"`
RepoKey string `json:"repoKey"`
CreatedAt time.Time `json:"createdAt"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

CreatedBy? ProviderId?


const evidenceHeaderSize = 3

type EvidenceSummaryData struct {
Copy link
Collaborator

Choose a reason for hiding this comment

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

Do we have to have it here?
It creates decoupling each time we will want to add a field we will have to go here as well.

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

Projects

None yet

Development

Successfully merging this pull request may close these issues.

4 participants