ework-web 0.10.99 → 0.10.100
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/package.json +1 -1
- package/src/render/layout.ts +2 -0
- package/src/upstream-sync.ts +4 -1
- package/src/views/issueThread.ts +3 -0
package/package.json
CHANGED
package/src/render/layout.ts
CHANGED
|
@@ -5,6 +5,7 @@ export interface LayoutProps {
|
|
|
5
5
|
issueTitle: string;
|
|
6
6
|
repoPath: string;
|
|
7
7
|
issueNumber: number;
|
|
8
|
+
upstreamUrl?: string;
|
|
8
9
|
state: string;
|
|
9
10
|
totalComments: number;
|
|
10
11
|
descriptionHtml: string;
|
|
@@ -236,6 +237,7 @@ export function renderLayout(props: LayoutProps, inner: string, initialItems: st
|
|
|
236
237
|
<span style="opacity:.5">/</span>
|
|
237
238
|
<a href="${escapeAttr(repoIssuesHref)}" style="color:var(--header-text)">${escapeHtml(props.repoPath)}</a>
|
|
238
239
|
<span class="num">#${props.issueNumber}</span>
|
|
240
|
+
${props.upstreamUrl ? `<a href="${escapeAttr(props.upstreamUrl)}" target="_blank" rel="noopener" title="upstream" style="color:var(--header-text);text-decoration:none;font-size:.85em">↗</a>` : ""}
|
|
239
241
|
</header>
|
|
240
242
|
<div class="meta-bar">
|
|
241
243
|
<h1>${escapeHtml(props.issueTitle)}</h1>
|
package/src/upstream-sync.ts
CHANGED
|
@@ -123,7 +123,10 @@ export class UpstreamSync {
|
|
|
123
123
|
upstreamIssueNumber: gi.number,
|
|
124
124
|
}
|
|
125
125
|
);
|
|
126
|
-
|
|
126
|
+
// PRs the sandbox agent opens itself carry the ework-agent-pr marker;
|
|
127
|
+
// announcing them would wake the agent on its own artifact (feedback loop)
|
|
128
|
+
const agentAuthored = !!gi.pull_request && /<!--\s*ework-agent-pr\s*-->/.test(gi.body ?? "");
|
|
129
|
+
if (emit && !agentAuthored) {
|
|
127
130
|
const created = await getIssueByUpstreamNumber(this.project.id, gi.number);
|
|
128
131
|
if (created) void emitIssueEvent(this.project.id, created.id, "opened", this.origin);
|
|
129
132
|
}
|
package/src/views/issueThread.ts
CHANGED
|
@@ -157,6 +157,9 @@ export async function buildIssueThread(
|
|
|
157
157
|
{
|
|
158
158
|
title: `${issue.title} · ${owner}/${repo}#${number}`,
|
|
159
159
|
issueTitle: issue.title,
|
|
160
|
+
upstreamUrl: issue.upstream_issue_number && upstreamRefBase(project)
|
|
161
|
+
? `${upstreamRefBase(project)}/issues/${issue.upstream_issue_number}`
|
|
162
|
+
: undefined,
|
|
160
163
|
repoPath: `${owner}/${repo}`,
|
|
161
164
|
issueNumber: number,
|
|
162
165
|
state: issue.state,
|