paperclip-github-plugin 0.4.7 → 0.4.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +2 -2
- package/dist/manifest.js +1 -1
- package/dist/ui/index.js +225 -101
- package/dist/ui/index.js.map +2 -2
- package/dist/worker.js +22 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -33,8 +33,8 @@ The plugin adds a full in-host workflow instead of a one-off import script:
|
|
|
33
33
|
- a dashboard widget that shows readiness, sync status, and last-run results
|
|
34
34
|
- saved sync diagnostics that let operators inspect the latest per-issue failures, raw errors, and suggested next steps
|
|
35
35
|
- a project sidebar item that opens a live project-scoped Pull Requests page for the mapped repository and can show the open PR count through a lightweight badge read
|
|
36
|
-
- manual sync actions from global, project, and issue
|
|
37
|
-
- a GitHub detail tab on synced Paperclip issues that stays hidden for Paperclip issues with no linked GitHub issue
|
|
36
|
+
- manual sync actions from global, project, and issue surfaces
|
|
37
|
+
- a GitHub detail tab on synced Paperclip issues that stays hidden for Paperclip issues with no linked GitHub issue and includes GitHub-marked action buttons plus the GitHub issue creator with avatar
|
|
38
38
|
- GitHub link annotations on sync-generated status transition comments when the host supports comment annotations
|
|
39
39
|
|
|
40
40
|
## How it works
|
package/dist/manifest.js
CHANGED
|
@@ -511,7 +511,7 @@ var require2 = createRequire(import.meta.url);
|
|
|
511
511
|
var packageJson = require2("../package.json");
|
|
512
512
|
var DASHBOARD_WIDGET_CAPABILITY = "ui.dashboardWidget.register";
|
|
513
513
|
var SCHEDULE_TICK_CRON = "* * * * *";
|
|
514
|
-
var MANIFEST_VERSION = "0.4.
|
|
514
|
+
var MANIFEST_VERSION = "0.4.9"?.trim() || typeof packageJson.version === "string" && packageJson.version.trim() || process.env.npm_package_version?.trim() || "0.0.0-dev";
|
|
515
515
|
var manifest = {
|
|
516
516
|
id: "paperclip-github-plugin",
|
|
517
517
|
apiVersion: 1,
|
package/dist/ui/index.js
CHANGED
|
@@ -22868,6 +22868,12 @@ function LoadingIconButtonContent(props) {
|
|
|
22868
22868
|
function LoadingSkeleton(props) {
|
|
22869
22869
|
return /* @__PURE__ */ jsx2("span", { "aria-hidden": "true", className: ["ghsync__skeleton", props.className].filter(Boolean).join(" "), style: props.style });
|
|
22870
22870
|
}
|
|
22871
|
+
function GitHubButtonLabel(props) {
|
|
22872
|
+
return /* @__PURE__ */ jsxs2("span", { className: "ghsync__button-content", children: [
|
|
22873
|
+
/* @__PURE__ */ jsx2(GitHubMarkIcon, { className: "ghsync-prs-icon" }),
|
|
22874
|
+
/* @__PURE__ */ jsx2("span", { children: props.label })
|
|
22875
|
+
] });
|
|
22876
|
+
}
|
|
22871
22877
|
var PROJECT_PULL_REQUESTS_PAGE_ROUTE_PATH = "github-pull-requests";
|
|
22872
22878
|
var LIGHT_PALETTE = {
|
|
22873
22879
|
text: "#18181b",
|
|
@@ -26422,6 +26428,36 @@ var EXTENSION_SURFACE_STYLES = `
|
|
|
26422
26428
|
align-items: start;
|
|
26423
26429
|
}
|
|
26424
26430
|
|
|
26431
|
+
.ghsync-issue-detail__actions {
|
|
26432
|
+
display: flex;
|
|
26433
|
+
flex-wrap: wrap;
|
|
26434
|
+
gap: 8px;
|
|
26435
|
+
align-items: center;
|
|
26436
|
+
justify-content: flex-end;
|
|
26437
|
+
}
|
|
26438
|
+
|
|
26439
|
+
.ghsync-issue-detail__headline {
|
|
26440
|
+
display: grid;
|
|
26441
|
+
gap: 8px;
|
|
26442
|
+
min-width: 0;
|
|
26443
|
+
}
|
|
26444
|
+
|
|
26445
|
+
.ghsync-issue-detail__creator-row {
|
|
26446
|
+
display: flex;
|
|
26447
|
+
align-items: center;
|
|
26448
|
+
flex-wrap: wrap;
|
|
26449
|
+
gap: 8px;
|
|
26450
|
+
}
|
|
26451
|
+
|
|
26452
|
+
.ghsync-issue-detail__creator-label {
|
|
26453
|
+
color: var(--ghsync-muted);
|
|
26454
|
+
font-size: 11px;
|
|
26455
|
+
font-weight: 700;
|
|
26456
|
+
letter-spacing: 0.08em;
|
|
26457
|
+
line-height: 1;
|
|
26458
|
+
text-transform: uppercase;
|
|
26459
|
+
}
|
|
26460
|
+
|
|
26425
26461
|
.ghsync-extension-heading h3,
|
|
26426
26462
|
.ghsync-extension-heading h4 {
|
|
26427
26463
|
margin: 0;
|
|
@@ -27226,6 +27262,22 @@ function formatShortDateTime(value, fallback = "Unknown time") {
|
|
|
27226
27262
|
function pluralize(count, singular, plural = `${singular}s`) {
|
|
27227
27263
|
return `${count} ${count === 1 ? singular : plural}`;
|
|
27228
27264
|
}
|
|
27265
|
+
function resolvePreviewPersonLabels(person) {
|
|
27266
|
+
const displayHandle = person.handle.trim();
|
|
27267
|
+
const displayName = person.name.trim() || displayHandle || "Unknown user";
|
|
27268
|
+
const normalizedName = displayName.replace(/^@/, "").trim().toLowerCase();
|
|
27269
|
+
const normalizedHandle = displayHandle.replace(/^@/, "").trim().toLowerCase();
|
|
27270
|
+
if (displayHandle && normalizedName && normalizedHandle && normalizedName === normalizedHandle) {
|
|
27271
|
+
return {
|
|
27272
|
+
primary: displayHandle,
|
|
27273
|
+
secondary: null
|
|
27274
|
+
};
|
|
27275
|
+
}
|
|
27276
|
+
return {
|
|
27277
|
+
primary: displayName,
|
|
27278
|
+
secondary: displayHandle && displayHandle !== displayName ? displayHandle : null
|
|
27279
|
+
};
|
|
27280
|
+
}
|
|
27229
27281
|
function hashString(value) {
|
|
27230
27282
|
let hash = 0;
|
|
27231
27283
|
for (const character of value) {
|
|
@@ -28730,17 +28782,38 @@ function SyncDiagnosticsPanel(props) {
|
|
|
28730
28782
|
function PreviewAvatar(props) {
|
|
28731
28783
|
const backgroundColor = getPreviewAvatarColor(props.person.handle);
|
|
28732
28784
|
const className = props.stacked ? "ghsync-prs-avatar-stack__item" : "ghsync-prs-avatar";
|
|
28785
|
+
const avatarSizePx = props.size === "sm" ? 20 : 28;
|
|
28786
|
+
const fontSizePx = props.size === "sm" ? 10 : 11;
|
|
28787
|
+
const labels = resolvePreviewPersonLabels(props.person);
|
|
28788
|
+
const initialsSource = props.person.name.trim() || props.person.handle.replace(/^@/, "").trim();
|
|
28789
|
+
const title = labels.secondary ? `${labels.primary} (${labels.secondary})` : labels.primary;
|
|
28733
28790
|
return /* @__PURE__ */ jsx2(
|
|
28734
28791
|
"span",
|
|
28735
28792
|
{
|
|
28736
28793
|
className,
|
|
28737
|
-
style: {
|
|
28738
|
-
|
|
28794
|
+
style: {
|
|
28795
|
+
backgroundColor,
|
|
28796
|
+
width: avatarSizePx,
|
|
28797
|
+
height: avatarSizePx,
|
|
28798
|
+
fontSize: fontSizePx
|
|
28799
|
+
},
|
|
28800
|
+
title,
|
|
28739
28801
|
"aria-hidden": "true",
|
|
28740
|
-
children: props.person.avatarUrl ? /* @__PURE__ */ jsx2("img", { src: props.person.avatarUrl, alt: "", loading: "lazy" }) : getInitials(
|
|
28802
|
+
children: props.person.avatarUrl ? /* @__PURE__ */ jsx2("img", { src: props.person.avatarUrl, alt: "", loading: "lazy" }) : getInitials(initialsSource)
|
|
28741
28803
|
}
|
|
28742
28804
|
);
|
|
28743
28805
|
}
|
|
28806
|
+
function PreviewPersonCopy(props) {
|
|
28807
|
+
const labels = resolvePreviewPersonLabels(props.person);
|
|
28808
|
+
return /* @__PURE__ */ jsxs2("span", { className: "ghsync-prs-table__person-copy", children: [
|
|
28809
|
+
/* @__PURE__ */ jsx2("span", { className: "ghsync-prs-table__person-name", children: labels.primary }),
|
|
28810
|
+
labels.secondary ? /* @__PURE__ */ jsx2("span", { className: "ghsync-prs-table__person-handle", children: labels.secondary }) : null
|
|
28811
|
+
] });
|
|
28812
|
+
}
|
|
28813
|
+
function PreviewPersonInlineLabel(props) {
|
|
28814
|
+
const labels = resolvePreviewPersonLabels(props.person);
|
|
28815
|
+
return /* @__PURE__ */ jsx2("span", { children: labels.secondary ? `${labels.primary} (${labels.secondary})` : labels.primary });
|
|
28816
|
+
}
|
|
28744
28817
|
function PreviewMarkdown(props) {
|
|
28745
28818
|
return /* @__PURE__ */ jsx2("div", { className: "ghsync-prs-markdown paperclip-markdown prose prose-sm max-w-none break-words overflow-hidden", children: /* @__PURE__ */ jsx2(
|
|
28746
28819
|
Markdown,
|
|
@@ -29922,10 +29995,7 @@ function GitHubSyncProjectPullRequestsPage() {
|
|
|
29922
29995
|
rel: "noreferrer",
|
|
29923
29996
|
children: [
|
|
29924
29997
|
/* @__PURE__ */ jsx2(PreviewAvatar, { person: pullRequest.author }),
|
|
29925
|
-
/* @__PURE__ */
|
|
29926
|
-
/* @__PURE__ */ jsx2("span", { className: "ghsync-prs-table__person-name", children: pullRequest.author.name }),
|
|
29927
|
-
/* @__PURE__ */ jsx2("span", { className: "ghsync-prs-table__person-handle", children: pullRequest.author.handle })
|
|
29928
|
-
] })
|
|
29998
|
+
/* @__PURE__ */ jsx2(PreviewPersonCopy, { person: pullRequest.author })
|
|
29929
29999
|
]
|
|
29930
30000
|
}
|
|
29931
30001
|
) }),
|
|
@@ -30411,12 +30481,7 @@ function GitHubSyncProjectPullRequestsPage() {
|
|
|
30411
30481
|
/* @__PURE__ */ jsx2("span", { className: "ghsync-prs-meta__label", children: "Author" }),
|
|
30412
30482
|
/* @__PURE__ */ jsxs2("div", { className: "ghsync-prs-meta__value ghsync-prs-meta__value--stack", children: [
|
|
30413
30483
|
/* @__PURE__ */ jsx2(PreviewAvatar, { person: selectedPullRequest.author }),
|
|
30414
|
-
/* @__PURE__ */
|
|
30415
|
-
selectedPullRequest.author.name,
|
|
30416
|
-
" (",
|
|
30417
|
-
selectedPullRequest.author.handle,
|
|
30418
|
-
")"
|
|
30419
|
-
] })
|
|
30484
|
+
/* @__PURE__ */ jsx2(PreviewPersonInlineLabel, { person: selectedPullRequest.author })
|
|
30420
30485
|
] })
|
|
30421
30486
|
] }),
|
|
30422
30487
|
/* @__PURE__ */ jsxs2("div", { className: "ghsync-prs-meta__row", children: [
|
|
@@ -33133,10 +33198,9 @@ function PullRequestCopilotActionMenu(props) {
|
|
|
33133
33198
|
);
|
|
33134
33199
|
}
|
|
33135
33200
|
function GitHubSyncToolbarButtonSurface(props) {
|
|
33136
|
-
const
|
|
33137
|
-
const
|
|
33138
|
-
const
|
|
33139
|
-
const pluginIdFromLocation = getPluginIdFromLocation();
|
|
33201
|
+
const themeMode = useResolvedThemeMode();
|
|
33202
|
+
const theme = themeMode === "light" ? LIGHT_PALETTE : DARK_PALETTE;
|
|
33203
|
+
const themeVars = buildThemeVars(theme, themeMode);
|
|
33140
33204
|
const surfaceRef = useRef(null);
|
|
33141
33205
|
const resolvedIssue = useResolvedIssueId({
|
|
33142
33206
|
companyId: props.companyId,
|
|
@@ -33144,7 +33208,70 @@ function GitHubSyncToolbarButtonSurface(props) {
|
|
|
33144
33208
|
entityId: props.entityId,
|
|
33145
33209
|
entityType: props.entityType
|
|
33146
33210
|
});
|
|
33147
|
-
const
|
|
33211
|
+
const buttonController = useGitHubSyncButtonController({
|
|
33212
|
+
...props,
|
|
33213
|
+
resolvedIssueId: resolvedIssue.issueId
|
|
33214
|
+
});
|
|
33215
|
+
useEffect2(() => {
|
|
33216
|
+
if (!props.entityType) {
|
|
33217
|
+
return;
|
|
33218
|
+
}
|
|
33219
|
+
const hostWrapper = surfaceRef.current?.parentElement;
|
|
33220
|
+
if (!hostWrapper) {
|
|
33221
|
+
return;
|
|
33222
|
+
}
|
|
33223
|
+
const previousMarginLeft = hostWrapper.style.marginLeft;
|
|
33224
|
+
const previousMarginInlineStart = hostWrapper.style.marginInlineStart;
|
|
33225
|
+
hostWrapper.style.marginLeft = "auto";
|
|
33226
|
+
hostWrapper.style.marginInlineStart = "auto";
|
|
33227
|
+
return () => {
|
|
33228
|
+
hostWrapper.style.marginLeft = previousMarginLeft;
|
|
33229
|
+
hostWrapper.style.marginInlineStart = previousMarginInlineStart;
|
|
33230
|
+
};
|
|
33231
|
+
}, [props.entityType]);
|
|
33232
|
+
if (!buttonController.visible) {
|
|
33233
|
+
return null;
|
|
33234
|
+
}
|
|
33235
|
+
return /* @__PURE__ */ jsxs2(
|
|
33236
|
+
"div",
|
|
33237
|
+
{
|
|
33238
|
+
ref: surfaceRef,
|
|
33239
|
+
className: `ghsync-toolbar-button${props.entityType ? " ghsync-toolbar-button--entity" : ""}`,
|
|
33240
|
+
style: themeVars,
|
|
33241
|
+
title: buttonController.title,
|
|
33242
|
+
children: [
|
|
33243
|
+
/* @__PURE__ */ jsx2("style", { children: EXTENSION_SURFACE_STYLES }),
|
|
33244
|
+
/* @__PURE__ */ jsx2(
|
|
33245
|
+
"button",
|
|
33246
|
+
{
|
|
33247
|
+
type: "button",
|
|
33248
|
+
"data-slot": "button",
|
|
33249
|
+
"data-variant": "outline",
|
|
33250
|
+
"data-size": "sm",
|
|
33251
|
+
className: props.entityType ? HOST_ENTITY_BUTTON_CLASSNAME : HOST_GLOBAL_BUTTON_CLASSNAME,
|
|
33252
|
+
disabled: buttonController.disabled,
|
|
33253
|
+
onClick: buttonController.onClick,
|
|
33254
|
+
children: /* @__PURE__ */ jsx2(
|
|
33255
|
+
LoadingButtonContent,
|
|
33256
|
+
{
|
|
33257
|
+
busy: buttonController.busy,
|
|
33258
|
+
label: buttonController.label,
|
|
33259
|
+
busyLabel: buttonController.busyLabel,
|
|
33260
|
+
icon: /* @__PURE__ */ jsx2(GitHubMarkIcon, { className: "h-3.5 w-3.5" })
|
|
33261
|
+
}
|
|
33262
|
+
)
|
|
33263
|
+
}
|
|
33264
|
+
)
|
|
33265
|
+
]
|
|
33266
|
+
}
|
|
33267
|
+
);
|
|
33268
|
+
}
|
|
33269
|
+
function useGitHubSyncButtonController(props) {
|
|
33270
|
+
const toast = usePluginToast();
|
|
33271
|
+
const runSyncNow = usePluginAction("sync.runNow");
|
|
33272
|
+
const cancelSync = usePluginAction("sync.cancel");
|
|
33273
|
+
const pluginIdFromLocation = getPluginIdFromLocation();
|
|
33274
|
+
const effectiveEntityId = props.entityType === "issue" ? props.resolvedIssueId ?? "__ghsync_unresolved_issue__" : props.entityId;
|
|
33148
33275
|
const toolbarState = usePluginData("sync.toolbarState", {
|
|
33149
33276
|
...props.companyId ? { companyId: props.companyId } : {},
|
|
33150
33277
|
...effectiveEntityId ? { entityId: effectiveEntityId } : {},
|
|
@@ -33157,10 +33284,7 @@ function GitHubSyncToolbarButtonSurface(props) {
|
|
|
33157
33284
|
const [runningSync, setRunningSync] = useState2(false);
|
|
33158
33285
|
const [cancellingSync, setCancellingSync] = useState2(false);
|
|
33159
33286
|
const [syncStateOverride, setSyncStateOverride] = useState2(null);
|
|
33160
|
-
const themeMode = useResolvedThemeMode();
|
|
33161
33287
|
const boardAccessRequirement = usePaperclipBoardAccessRequirement();
|
|
33162
|
-
const theme = themeMode === "light" ? LIGHT_PALETTE : DARK_PALETTE;
|
|
33163
|
-
const themeVars = buildThemeVars(theme, themeMode);
|
|
33164
33288
|
const state = toolbarState.data ?? {
|
|
33165
33289
|
kind: props.entityType ?? "global",
|
|
33166
33290
|
visible: !props.entityType,
|
|
@@ -33192,9 +33316,7 @@ function GitHubSyncToolbarButtonSurface(props) {
|
|
|
33192
33316
|
disabled: toolbarButtonDisabled,
|
|
33193
33317
|
label: toolbarButtonLabel,
|
|
33194
33318
|
busyLabel: toolbarButtonBusyLabel,
|
|
33195
|
-
syncPersistedRunning
|
|
33196
|
-
syncStartPending,
|
|
33197
|
-
cancellationRequested
|
|
33319
|
+
syncPersistedRunning
|
|
33198
33320
|
} = toolbarButtonState;
|
|
33199
33321
|
const armSyncCompletionToast = useSyncCompletionToast(effectiveSyncState, toast);
|
|
33200
33322
|
useEffect2(() => {
|
|
@@ -33256,26 +33378,6 @@ function GitHubSyncToolbarButtonSurface(props) {
|
|
|
33256
33378
|
document.removeEventListener("visibilitychange", handleVisibilityChange);
|
|
33257
33379
|
};
|
|
33258
33380
|
}, [toolbarState.refresh, settingsRegistration.refresh, props.companyId, effectiveEntityId, props.entityType]);
|
|
33259
|
-
useEffect2(() => {
|
|
33260
|
-
if (!props.entityType) {
|
|
33261
|
-
return;
|
|
33262
|
-
}
|
|
33263
|
-
const hostWrapper = surfaceRef.current?.parentElement;
|
|
33264
|
-
if (!hostWrapper) {
|
|
33265
|
-
return;
|
|
33266
|
-
}
|
|
33267
|
-
const previousMarginLeft = hostWrapper.style.marginLeft;
|
|
33268
|
-
const previousMarginInlineStart = hostWrapper.style.marginInlineStart;
|
|
33269
|
-
hostWrapper.style.marginLeft = "auto";
|
|
33270
|
-
hostWrapper.style.marginInlineStart = "auto";
|
|
33271
|
-
return () => {
|
|
33272
|
-
hostWrapper.style.marginLeft = previousMarginLeft;
|
|
33273
|
-
hostWrapper.style.marginInlineStart = previousMarginInlineStart;
|
|
33274
|
-
};
|
|
33275
|
-
});
|
|
33276
|
-
if (!state.visible) {
|
|
33277
|
-
return null;
|
|
33278
|
-
}
|
|
33279
33381
|
async function handleRunSync() {
|
|
33280
33382
|
try {
|
|
33281
33383
|
if (!effectiveCanRun) {
|
|
@@ -33287,7 +33389,7 @@ function GitHubSyncToolbarButtonSurface(props) {
|
|
|
33287
33389
|
waitForCompletion: false,
|
|
33288
33390
|
...props.companyId ? { companyId: props.companyId } : {},
|
|
33289
33391
|
...props.entityType === "project" && props.entityId ? { projectId: props.entityId } : {},
|
|
33290
|
-
...props.entityType === "issue" &&
|
|
33392
|
+
...props.entityType === "issue" && props.resolvedIssueId ? { issueId: props.resolvedIssueId } : {},
|
|
33291
33393
|
...trustedPaperclipApiBaseUrl ? { paperclipApiBaseUrl: trustedPaperclipApiBaseUrl } : {}
|
|
33292
33394
|
});
|
|
33293
33395
|
const nextSyncState = result.syncState ?? EMPTY_SETTINGS.syncState;
|
|
@@ -33353,39 +33455,15 @@ function GitHubSyncToolbarButtonSurface(props) {
|
|
|
33353
33455
|
setCancellingSync(false);
|
|
33354
33456
|
}
|
|
33355
33457
|
}
|
|
33356
|
-
return
|
|
33357
|
-
|
|
33358
|
-
|
|
33359
|
-
|
|
33360
|
-
|
|
33361
|
-
|
|
33362
|
-
|
|
33363
|
-
|
|
33364
|
-
|
|
33365
|
-
/* @__PURE__ */ jsx2(
|
|
33366
|
-
"button",
|
|
33367
|
-
{
|
|
33368
|
-
type: "button",
|
|
33369
|
-
"data-slot": "button",
|
|
33370
|
-
"data-variant": "outline",
|
|
33371
|
-
"data-size": "sm",
|
|
33372
|
-
className: props.entityType ? HOST_ENTITY_BUTTON_CLASSNAME : HOST_GLOBAL_BUTTON_CLASSNAME,
|
|
33373
|
-
disabled: toolbarButtonDisabled,
|
|
33374
|
-
onClick: syncPersistedRunning && allowToolbarCancellation ? handleCancelSync : handleRunSync,
|
|
33375
|
-
children: /* @__PURE__ */ jsx2(
|
|
33376
|
-
LoadingButtonContent,
|
|
33377
|
-
{
|
|
33378
|
-
busy: toolbarButtonBusy,
|
|
33379
|
-
label: toolbarButtonLabel,
|
|
33380
|
-
busyLabel: toolbarButtonBusyLabel,
|
|
33381
|
-
icon: /* @__PURE__ */ jsx2(GitHubMarkIcon, { className: "h-3.5 w-3.5" })
|
|
33382
|
-
}
|
|
33383
|
-
)
|
|
33384
|
-
}
|
|
33385
|
-
)
|
|
33386
|
-
]
|
|
33387
|
-
}
|
|
33388
|
-
);
|
|
33458
|
+
return {
|
|
33459
|
+
visible: props.forceVisible ? true : state.visible,
|
|
33460
|
+
title: toolbarState.error?.message ?? effectiveMessage ?? "GitHub sync",
|
|
33461
|
+
busy: toolbarButtonBusy,
|
|
33462
|
+
disabled: toolbarButtonDisabled,
|
|
33463
|
+
label: toolbarButtonLabel,
|
|
33464
|
+
busyLabel: toolbarButtonBusyLabel,
|
|
33465
|
+
onClick: syncPersistedRunning && allowToolbarCancellation ? handleCancelSync : handleRunSync
|
|
33466
|
+
};
|
|
33389
33467
|
}
|
|
33390
33468
|
function GitHubSyncGlobalToolbarButton() {
|
|
33391
33469
|
const context = useHostContext();
|
|
@@ -33418,6 +33496,13 @@ function GitHubSyncIssueDetailTabContent(props) {
|
|
|
33418
33496
|
detailsError: Boolean(details.error),
|
|
33419
33497
|
issueDetails
|
|
33420
33498
|
});
|
|
33499
|
+
const issueSyncButton = useGitHubSyncButtonController({
|
|
33500
|
+
companyId: props.companyId,
|
|
33501
|
+
entityId: props.issueId,
|
|
33502
|
+
entityType: "issue",
|
|
33503
|
+
resolvedIssueId: props.issueId,
|
|
33504
|
+
forceVisible: true
|
|
33505
|
+
});
|
|
33421
33506
|
useEffect2(() => {
|
|
33422
33507
|
if (!props.companyId || !props.issueId) {
|
|
33423
33508
|
return;
|
|
@@ -33437,27 +33522,68 @@ function GitHubSyncIssueDetailTabContent(props) {
|
|
|
33437
33522
|
detailTabState === "error" && details.error ? /* @__PURE__ */ jsx2("p", { className: "ghsync-extension-empty", children: details.error.message }) : null,
|
|
33438
33523
|
detailTabState === "ready" && issueDetails ? /* @__PURE__ */ jsxs2(Fragment2, { children: [
|
|
33439
33524
|
/* @__PURE__ */ jsxs2("div", { className: "ghsync-extension-heading", children: [
|
|
33440
|
-
/* @__PURE__ */ jsxs2("div", { children: [
|
|
33525
|
+
/* @__PURE__ */ jsxs2("div", { className: "ghsync-issue-detail__headline", children: [
|
|
33441
33526
|
/* @__PURE__ */ jsxs2("h4", { children: [
|
|
33442
33527
|
"Issue #",
|
|
33443
33528
|
issueDetails.githubIssueNumber
|
|
33444
33529
|
] }),
|
|
33445
|
-
/* @__PURE__ */ jsx2("p", { children: formatGitHubRepositoryLabel(issueDetails.repositoryUrl) })
|
|
33530
|
+
/* @__PURE__ */ jsx2("p", { children: formatGitHubRepositoryLabel(issueDetails.repositoryUrl) }),
|
|
33531
|
+
issueDetails.creator ? /* @__PURE__ */ jsxs2("div", { className: "ghsync-issue-detail__creator-row", children: [
|
|
33532
|
+
/* @__PURE__ */ jsx2("span", { className: "ghsync-issue-detail__creator-label", children: "Creator" }),
|
|
33533
|
+
/* @__PURE__ */ jsxs2(
|
|
33534
|
+
"a",
|
|
33535
|
+
{
|
|
33536
|
+
href: issueDetails.creator.profileUrl,
|
|
33537
|
+
target: "_blank",
|
|
33538
|
+
rel: "noreferrer",
|
|
33539
|
+
className: "ghsync-prs-table__person ghsync-issue-detail__creator",
|
|
33540
|
+
children: [
|
|
33541
|
+
/* @__PURE__ */ jsx2(PreviewAvatar, { person: issueDetails.creator, size: "sm" }),
|
|
33542
|
+
/* @__PURE__ */ jsx2(PreviewPersonCopy, { person: issueDetails.creator })
|
|
33543
|
+
]
|
|
33544
|
+
}
|
|
33545
|
+
)
|
|
33546
|
+
] }) : null
|
|
33446
33547
|
] }),
|
|
33447
|
-
/* @__PURE__ */
|
|
33448
|
-
|
|
33449
|
-
|
|
33450
|
-
|
|
33451
|
-
|
|
33452
|
-
|
|
33453
|
-
|
|
33454
|
-
|
|
33455
|
-
|
|
33456
|
-
|
|
33457
|
-
|
|
33458
|
-
|
|
33459
|
-
|
|
33460
|
-
|
|
33548
|
+
/* @__PURE__ */ jsxs2("div", { className: "ghsync-issue-detail__actions", children: [
|
|
33549
|
+
issueSyncButton.visible ? /* @__PURE__ */ jsx2(
|
|
33550
|
+
"button",
|
|
33551
|
+
{
|
|
33552
|
+
type: "button",
|
|
33553
|
+
className: getPluginActionClassName({
|
|
33554
|
+
variant: "secondary",
|
|
33555
|
+
size: "sm",
|
|
33556
|
+
extraClassName: "ghsync-extension-link"
|
|
33557
|
+
}),
|
|
33558
|
+
disabled: issueSyncButton.disabled,
|
|
33559
|
+
onClick: issueSyncButton.onClick,
|
|
33560
|
+
title: issueSyncButton.title,
|
|
33561
|
+
children: /* @__PURE__ */ jsx2(
|
|
33562
|
+
LoadingButtonContent,
|
|
33563
|
+
{
|
|
33564
|
+
busy: issueSyncButton.busy,
|
|
33565
|
+
label: issueSyncButton.label,
|
|
33566
|
+
busyLabel: issueSyncButton.busyLabel,
|
|
33567
|
+
icon: /* @__PURE__ */ jsx2(GitHubMarkIcon, { className: "ghsync-prs-icon" })
|
|
33568
|
+
}
|
|
33569
|
+
)
|
|
33570
|
+
}
|
|
33571
|
+
) : null,
|
|
33572
|
+
/* @__PURE__ */ jsx2(
|
|
33573
|
+
"a",
|
|
33574
|
+
{
|
|
33575
|
+
href: issueDetails.githubIssueUrl,
|
|
33576
|
+
target: "_blank",
|
|
33577
|
+
rel: "noreferrer",
|
|
33578
|
+
className: getPluginActionClassName({
|
|
33579
|
+
variant: "secondary",
|
|
33580
|
+
size: "sm",
|
|
33581
|
+
extraClassName: "ghsync-extension-link"
|
|
33582
|
+
}),
|
|
33583
|
+
children: /* @__PURE__ */ jsx2(GitHubButtonLabel, { label: "Open on GitHub" })
|
|
33584
|
+
}
|
|
33585
|
+
)
|
|
33586
|
+
] })
|
|
33461
33587
|
] }),
|
|
33462
33588
|
/* @__PURE__ */ jsxs2("div", { className: "ghsync-extension-grid", children: [
|
|
33463
33589
|
/* @__PURE__ */ jsxs2("div", { className: "ghsync-extension-metric", children: [
|
|
@@ -33479,7 +33605,7 @@ function GitHubSyncIssueDetailTabContent(props) {
|
|
|
33479
33605
|
] }),
|
|
33480
33606
|
issueDetails.linkedPullRequestNumbers.length > 0 ? /* @__PURE__ */ jsxs2("div", { className: "ghsync-issue-detail__section", children: [
|
|
33481
33607
|
/* @__PURE__ */ jsx2("div", { className: "ghsync-issue-detail__section-heading", children: "Linked pull requests" }),
|
|
33482
|
-
/* @__PURE__ */ jsx2("div", { className: "ghsync-extension-links", children: issueDetails.linkedPullRequestNumbers.map((pullRequestNumber) => /* @__PURE__ */
|
|
33608
|
+
/* @__PURE__ */ jsx2("div", { className: "ghsync-extension-links", children: issueDetails.linkedPullRequestNumbers.map((pullRequestNumber) => /* @__PURE__ */ jsx2(
|
|
33483
33609
|
"a",
|
|
33484
33610
|
{
|
|
33485
33611
|
href: `${issueDetails.repositoryUrl}/pull/${pullRequestNumber}`,
|
|
@@ -33490,10 +33616,7 @@ function GitHubSyncIssueDetailTabContent(props) {
|
|
|
33490
33616
|
size: "sm",
|
|
33491
33617
|
extraClassName: "ghsync-extension-link"
|
|
33492
33618
|
}),
|
|
33493
|
-
children:
|
|
33494
|
-
"PR #",
|
|
33495
|
-
pullRequestNumber
|
|
33496
|
-
]
|
|
33619
|
+
children: /* @__PURE__ */ jsx2(GitHubButtonLabel, { label: `PR #${pullRequestNumber}` })
|
|
33497
33620
|
},
|
|
33498
33621
|
pullRequestNumber
|
|
33499
33622
|
)) })
|
|
@@ -33510,7 +33633,7 @@ function GitHubSyncIssueDetailTabContent(props) {
|
|
|
33510
33633
|
`${label.name}:${label.color ?? "none"}`
|
|
33511
33634
|
)) })
|
|
33512
33635
|
] }) : null,
|
|
33513
|
-
issueDetails.source !== "entity" ? /* @__PURE__ */ jsx2("div", { className: "ghsync-extension-note", children: "GitHub Sync recovered this link from older sync metadata. Run sync once to refresh GitHub state, labels, and linked PRs in this panel." }) : null
|
|
33636
|
+
issueDetails.source !== "entity" ? /* @__PURE__ */ jsx2("div", { className: "ghsync-extension-note", children: "GitHub Sync recovered this link from older sync metadata. Run sync once to refresh the creator, GitHub state, labels, and linked PRs in this panel." }) : null
|
|
33514
33637
|
] }) : null
|
|
33515
33638
|
] });
|
|
33516
33639
|
}
|
|
@@ -33581,7 +33704,7 @@ function GitHubSyncCommentAnnotation() {
|
|
|
33581
33704
|
size: "sm",
|
|
33582
33705
|
extraClassName: "ghsync-extension-link"
|
|
33583
33706
|
}),
|
|
33584
|
-
children: link3.label
|
|
33707
|
+
children: /* @__PURE__ */ jsx2(GitHubButtonLabel, { label: link3.label })
|
|
33585
33708
|
},
|
|
33586
33709
|
`${link3.type}:${link3.href}`
|
|
33587
33710
|
))
|
|
@@ -33602,6 +33725,7 @@ export {
|
|
|
33602
33725
|
index_default as default,
|
|
33603
33726
|
resolveGitHubIssueDetailTabState,
|
|
33604
33727
|
resolveOrCreateProject,
|
|
33728
|
+
resolvePreviewPersonLabels,
|
|
33605
33729
|
resolveSavedTokenUiState,
|
|
33606
33730
|
resolveToolbarButtonState,
|
|
33607
33731
|
syncGitHubTokenPropagationForAgents
|