-
Notifications
You must be signed in to change notification settings - Fork 6.3k
feat: Polish off UI changes for OCI support (#21685) #22410
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
Conversation
❌ Preview Environment deleted from BunnyshellAvailable commands (reply to this comment):
|
@keithchong can you fix the conflict? |
Signed-off-by: Keith Chong <kykchong@redhat.com>
f3bf703
to
c0b29a0
Compare
Signed-off-by: Keith Chong <kykchong@redhat.com>
@blakepettersson , I've updated this PR. |
Signed-off-by: Keith Chong <kykchong@redhat.com>
Signed-off-by: Keith Chong <kykchong@redhat.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!
Hi @agaudreault , could we get this in for 3.1? Release 3.1, since the main OCI feature PR was merged there. |
message += ' (' + revision.substring(0, 14) + ')'; | ||
} else { | ||
message += ' (' + revision.substring(0, 7) + ')'; | ||
} |
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.
The whole block can be simplified as (untested pseudo-code):
let revAbbrvLen = 7;
// Show "sha256: " plus the first 7 actual characters of the digest.
if (source.repoURL.startsWith('oci://') && revision.startsWith('sha256:')) {
revAbbrvLen = 14;
}
message += ' (' + revision.substring(0, 7) + ')';
@@ -12,7 +12,7 @@ export const Revision = ({repoUrl, revision, path, isForPath, children}: {repoUr | |||
if (url !== null && hasPath) { | |||
url += '/' + path; | |||
} | |||
const content = children || (isSHA(revision) ? revision.substr(0, 7) : revision); | |||
const content = children || (isSHA(revision) ? (revision.startsWith('sha256:') ? revision.substr(0, 14) : revision.substr(0, 7)) : revision); |
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.
Similarly, as above:
const content = children || (isSHA(revision) ? (revision.substr(0, revision.startsWith('sha256:') ? 14 : 7 ) : revision);
…j#22410) Signed-off-by: Keith Chong <kykchong@redhat.com> Signed-off-by: enneitex <etienne.divet@gmail.com>
DO NOT MERGE UNTIL OCI Beta PR is merged (There are merge conflicts)
Fixes part of #21685
Checklist: