File tree Expand file tree Collapse file tree 2 files changed +13
-2
lines changed
Expand file tree Collapse file tree 2 files changed +13
-2
lines changed Original file line number Diff line number Diff line change @@ -265,6 +265,9 @@ export function Header() {
265265 />
266266 ) ) }
267267 < MenuItem
268+ onClick = { ( ) => {
269+ window . open ( githubLink , '_blank' , 'noopener, noreferrer' ) ;
270+ } }
268271 text = { t ( 'common.labels.version' ) }
269272 additionalText = { busolaVersion }
270273 icon = "inspect"
Original file line number Diff line number Diff line change @@ -6,6 +6,8 @@ const BUSOLA_GITHUB_LINKS = {
66 REPOSITORY : 'https://github.com/kyma-project/busola' ,
77 PULLS : 'https://github.com/kyma-project/busola/pull' ,
88 COMMITS : 'https://github.com/kyma-project/busola/commit' ,
9+ RELEASE : 'https://github.com/kyma-project/busola/releases/tag/' ,
10+ RELEASES : 'https://github.com/kyma-project/busola/releases/' ,
911} ;
1012
1113function createGithubLink ( version : string ) : string {
@@ -15,11 +17,17 @@ function createGithubLink(version: string): string {
1517 if ( version !== devVersion && version !== unknownVersion ) {
1618 if ( version . toString ( ) . startsWith ( 'PR-' ) ) {
1719 return `${ BUSOLA_GITHUB_LINKS . PULLS } /${ version . slice ( 3 ) } ` ;
18- } else if ( version . toString ( ) . startsWith ( 'v20' ) ) {
20+ } else if (
21+ version . toString ( ) . startsWith ( 'v20' ) &&
22+ version . toString ( ) . includes ( '-' )
23+ ) {
1924 return `${ BUSOLA_GITHUB_LINKS . COMMITS } /${ version . substring (
2025 version . length - 8 ,
2126 ) } `;
22- }
27+ } else if ( version . toString ( ) . startsWith ( 'v' ) ) {
28+ return `${ BUSOLA_GITHUB_LINKS . RELEASE } /${ version } ` ;
29+ } else if ( version . toString ( ) === 'latest' )
30+ return `${ BUSOLA_GITHUB_LINKS . RELEASES } ` ;
2331 return `${ BUSOLA_GITHUB_LINKS . COMMITS } /${ version } ` ;
2432 }
2533 }
You can’t perform that action at this time.
0 commit comments