Skip to content

Conversation

@mnsboev
Copy link
Collaborator

@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.
  • Appropriate label is added to auto generate release notes.
  • I used gofmt for formatting the code before submitting the pull request.
  • PR description is clear and concise, and it includes the proposed solution/fix.

Description
Add evidence summary section 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-core PR: jfrog/jfrog-cli-core#1423
jfrog-cli PR: jfrog/jfrog-cli#3042

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

"regexp"
"strings"

clientLog "github.com/jfrog/jfrog-client-go/utils/log"
Copy link
Collaborator

Choose a reason for hiding this comment

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

why is it different than other places in the code?

CreatedAt string `json:"created_at"`
CreatedBy string `json:"created_by"`
Verified bool `json:"verified"`
ProviderId string `json:"provider_id"`
Copy link
Collaborator

Choose a reason for hiding this comment

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

Note to self, don't forget to add stage

SubjectType: commandsummary.SubjectTypeReleaseBundle,
ReleaseBundleName: c.releaseBundle,
ReleaseBundleVersion: c.releaseBundleVersion,
RepoKey: utils.BuildReleaseBundleRepoKey(c.project),
Copy link
Collaborator

Choose a reason for hiding this comment

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

Are those needed: CreatedAt? CreatedBy? ProviderId?

Verified: response.Verified,
DisplayName: displayName,
SubjectType: commandsummary.SubjectTypePackage,
RepoKey: c.packageService.GetPackageRepoName(),
Copy link
Collaborator

Choose a reason for hiding this comment

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

CreatedAt? CreatedBy? ProviderId?


func (c *createEvidenceCustom) recordSummary(response *model.CreateResponse) {
commandSummary := commandsummary.EvidenceSummaryData{
Subject: c.subjectRepoPath,
Copy link
Collaborator

Choose a reason for hiding this comment

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

RepoKey? CreatedAt? CreatedBy? ProviderId?

BuildName: c.buildName,
BuildNumber: c.buildNumber,
BuildTimestamp: timestamp,
RepoKey: utils.BuildBuildInfoRepoKey(c.project),
Copy link
Collaborator

Choose a reason for hiding this comment

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

CreatedBy? CreatedAt? ProviderId?

@mnsboev mnsboev force-pushed the create-evidence-summary branch from 7fbbd16 to 8f52f88 Compare August 5, 2025 09:06
@mnsboev mnsboev merged commit 48a7097 into jfrog:main Aug 5, 2025
10 of 11 checks passed
naveenku-jfrog pushed a commit to naveenku-jfrog/jfrog-cli-artifactory that referenced this pull request Aug 13, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

new feature Automatically generated release notes

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants