Unverified 提交 e8b93e32 authored 作者: Will Chen's avatar Will Chen 提交者: GitHub

Label pro (#1440)

<!-- CURSOR_SUMMARY --> > [!NOTE] > Conditionally appends the `pro` label to prefilled GitHub issue URLs for Dyad Pro users. > > - **Help dialog issue links**: > - For `Report a Bug`: build `labels` array starting with `bug`, append `pro` when `isDyadProUser` is true; pass labels via `labels=${labels}`. > - For `Session Report`: build `labels` array starting with `support`, append `pro` when `isDyadProUser` is true; pass labels via `labels=${labels}`. > > <sup>Written by [Cursor Bugbot](https://cursor.com/dashboard?tab=bugbot) for commit 1b0928f201ff9f38284445ee2f29ae2966a59403. This will update automatically on new commits. Configure [here](https://cursor.com/dashboard?tab=bugbot).</sup> <!-- /CURSOR_SUMMARY -->
上级 2272c6d2
......@@ -110,7 +110,11 @@ ${debugInfo.logs.slice(-3_500) || "No logs available"}
// Create the GitHub issue URL with the pre-filled body
const encodedBody = encodeURIComponent(issueBody);
const encodedTitle = encodeURIComponent("[bug] <WRITE TITLE HERE>");
const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=bug,filed-from-app&body=${encodedBody}`;
const labels = ["bug"];
if (isDyadProUser) {
labels.push("pro");
}
const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=${labels}&body=${encodedBody}`;
// Open the pre-filled GitHub issue page
IpcClient.getInstance().openExternalUrl(githubIssueUrl);
......@@ -230,7 +234,11 @@ Session ID: ${sessionId}
const encodedBody = encodeURIComponent(issueBody);
const encodedTitle = encodeURIComponent("[session report] <add title>");
const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=support&body=${encodedBody}`;
const labels = ["support"];
if (isDyadProUser) {
labels.push("pro");
}
const githubIssueUrl = `https://github.com/dyad-sh/dyad/issues/new?title=${encodedTitle}&labels=${labels}&body=${encodedBody}`;
IpcClient.getInstance().openExternalUrl(githubIssueUrl);
handleClose();
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论