Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
26 changes: 20 additions & 6 deletions .github/workflows/bump.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,18 @@ name: Bump NPM version and push git tag
on:
workflow_dispatch:
inputs:
version:
description: "Version to set (e.g., 1.2.3)"
version_type:
description: "Type of version bump"
required: true
type: choice
options:
- major
- minor
- patch
- premajor
- preminor
- prepatch
- prerelease

jobs:
bump:
Expand All @@ -25,9 +34,14 @@ jobs:
node-version-file: ".nvmrc"

- run: |
npm version ${{ inputs.version }} --no-git-tag-version
if [[ "${{ inputs.version_type }}" == "prerelease" || "${{ inputs.version_type }}" == "premajor" || "${{ inputs.version_type }}" == "preminor" || "${{ inputs.version_type }}" == "prepatch" ]]; then
npm version ${{ inputs.version_type }} --preid alpha --no-git-tag-version
else
npm version ${{ inputs.version_type }} --no-git-tag-version
fi
git add package.json package-lock.json
git commit -m "Bump version to ${{ inputs.version }} [skip ci]"
git tag "v${{ inputs.version }}"
VERSION=$(node -p "require('./package.json').version")
git commit -m "Bump version to $VERSION [skip ci]"
git tag "v$VERSION"
git push
git push origin "v${{ inputs.version }}"
git push origin "v$VERSION"
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ export const InsightCardRenderer = ({
if (spanCodeObjectId) {
url = url.concat(`?uiFind=${spanCodeObjectId}`);
}
window.open(url, "_blank", "noopener noreferrer");
openURLInDefaultBrowser(url);
return;
}

Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,8 @@
import { platform } from "../../../../../../../../../platform";
import { useConfigSelector } from "../../../../../../../../../store/config/useConfigSelector";
import { isString } from "../../../../../../../../../typeGuards/isString";
import { formatTimeDistance } from "../../../../../../../../../utils/formatTimeDistance";
import { getIdeLauncherLinkForSpan } from "../../../../../../../../../utils/getIdeLauncherLinkForSpan";
import { getInsightTypeInfo } from "../../../../../../../../../utils/getInsightTypeInfo";
import { Link } from "../../../../../../../../common/v3/Link";
import { NewTag } from "../../../../../../../../common/v3/NewTag";
Expand Down Expand Up @@ -53,10 +55,15 @@ export const InsightHeader = ({

const handleSpanLinkClick = () => {
if (spanInfo) {
onSpanLinkClick(spanInfo.spanCodeObjectId);
onSpanLinkClick();
}
};

const spanIdeLauncherLink =
platform === "Web" && spanInfo
? getIdeLauncherLinkForSpan(spanInfo)
: undefined;

return (
<s.Container>
<s.TitleRow>
Expand Down Expand Up @@ -95,7 +102,14 @@ export const InsightHeader = ({
{!scope?.span && spanInfo && (
<s.SpanInfoRow>
<Tooltip title={spanInfo.displayName}>
<Link onClick={handleSpanLinkClick}>{spanInfo.displayName}</Link>
<Link
onClick={handleSpanLinkClick}
href={spanIdeLauncherLink}
target={"_blank"}
rel={"noopener noreferrer"}
>
{spanInfo.displayName}
</Link>
</Tooltip>
<s.StyledCopyButton text={spanInfo.displayName} />
</s.SpanInfoRow>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,6 @@ import type { GenericCodeObjectInsight } from "../../../../../../../types";
export interface InsightHeaderProps {
insight: GenericCodeObjectInsight;
isAsync?: boolean;
onSpanLinkClick: (spanCodeObjectId: string) => void;
onSpanLinkClick: () => void;
lastUpdateTimer?: string | null;
}
1 change: 1 addition & 0 deletions src/types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -98,6 +98,7 @@ export interface SpanInfo {
spanCodeObjectId: string;
methodCodeObjectId: string | null;
kind: string | null;
uid?: string;
}

export interface SpanInstanceInfo {
Expand Down
16 changes: 16 additions & 0 deletions src/utils/getIdeLauncherLinkForSpan.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
import type { SpanInfo } from "../types";

export const getIdeLauncherLinkForSpan = (spanInfo: SpanInfo) => {
if (!spanInfo.uid) {
return;
}

const baseURL = `${window.location.origin}/ide-launcher`;
const url = new URL(baseURL);

url.searchParams.append("plugin.action", "GoToSpan");
url.searchParams.append("plugin.spanUid", spanInfo.uid);
url.searchParams.append("plugin.targetTab", "issues");

return url.toString();
};
Loading