-
Notifications
You must be signed in to change notification settings - Fork 5
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create package evidence using cli #21
Conversation
This reverts commit bf36c53.
evidence/cli/flags.go
Outdated
|
||
// Unique evidence flags | ||
predicate = "predicate" | ||
predicateType = "predicate-type" | ||
subjectRepoPath = "subject-repo-path" | ||
subjectSha256 = "subject-sha256" | ||
key = "key" | ||
keyId = "key-name" | ||
KeyAlias = "key-alias" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No need to export this constant, can be keyAlias
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
"github.com/jfrog/jfrog-client-go/utils/log" | ||
) | ||
|
||
const leadArtifactQueryTemplate = `{ |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why putting a const if you dont use it as const?
Also, it is used only in one place just copy it to line 124
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
i tried to change it, but i think also is not bad to have it private const here since its too long and a bit confusing to have it directly inside the small method.
evidence/cli/command_package.go
Outdated
|
||
func (epc *evidencePackageCommand) validateEvidencePackageContext(ctx *components.Context) error { | ||
if !ctx.IsFlagSet(packageVersion) || assertValueProvided(ctx, packageVersion) != nil { | ||
return errorutils.CheckErrorf("'packageVersion' is a mandatory field for creating a Package evidence: --%s", packageVersion) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
In this command, and also in the existing build/release-bundle commands: we should not log the internal names of the variables - having packageVersion
or packageRepoName
in the logs is confusing.
Instead, we should mention only those names, which a client is supposed to use, for example:
--%s is a mandatory parameter for creating a Package evidence
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
evidence/model/graphql.go
Outdated
@@ -0,0 +1,26 @@ | |||
package model | |||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Sounds like metadata.go
and MetadataResponse
/ PackageVersionsResponse
.
(the "graphql" like "REST" is very generic - it can refer to anything)
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
done
No description provided.