-
Notifications
You must be signed in to change notification settings - Fork 102
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
fix: add nil checks for some functions #327
Conversation
Signed-off-by: JasmineTang <jasminetang@microsoft.com>
Signed-off-by: JasmineTang <jasminetang@microsoft.com>
Codecov Report
@@ Coverage Diff @@
## main #327 +/- ##
==========================================
+ Coverage 72.42% 72.46% +0.04%
==========================================
Files 38 38
Lines 3615 3621 +6
==========================================
+ Hits 2618 2624 +6
Misses 738 738
Partials 259 259
Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here. |
…asmine/nilCheck
Signed-off-by: JasmineTang <jasminetang@microsoft.com>
Signed-off-by: JasmineTang <jasminetang@microsoft.com>
Signed-off-by: JasmineTang <jasminetang@microsoft.com>
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.
LGTM
…asmine/nilCheck
Signed-off-by: JasmineTang <jasminetang@microsoft.com>
Signed-off-by: JasmineTang <jasminetang@microsoft.com>
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.
LGTM
…asmine/nilCheck
extendedcopy.go
Outdated
// - If key is available in the predecessor's annotation and regex is not nil, | ||
// return the predecessor if the annotation value matches the regex. | ||
// - If key is available in the predecessor's annotation and regex is nil, | ||
// return the predecessor. | ||
// - If key is unavailable in the predecessor's annotation, the predecessor | ||
// will not be returned. |
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.
A predecessor is kept if the key is in its annotation and matches the regex if present.
Signed-off-by: JasmineTang <jasminetang@microsoft.com>
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.
LGTM
Add
nil
checks for functionsoras.WithTargetPlatform
,oras.FilterAnnotation
andoras.FilterArtifactType
.Resolves #318
Signed-off-by: JasmineTang jasminetang@microsoft.com