diff --git a/apps/open-swe/src/routes/github/issue-webhook.ts b/apps/open-swe/src/routes/github/issue-webhook.ts index 394a941a..0ba94aa5 100644 --- a/apps/open-swe/src/routes/github/issue-webhook.ts +++ b/apps/open-swe/src/routes/github/issue-webhook.ts @@ -52,6 +52,20 @@ const getPayload = (body: string): Record | null => { } }; +const createDevMetadataComment = (runId: string, threadId: string) => { + return `
+ Dev Metadata + ${JSON.stringify( + { + runId, + threadId, + }, + null, + 2, + )} +
`; +}; + const getHeaders = ( c: Context, ): { @@ -179,7 +193,7 @@ webhooks.on("issues.labeled", async ({ payload }) => { owner: issueData.owner, repo: issueData.repo, issue_number: issueData.issueNumber, - body: `🤖 Open SWE has been triggered for this issue. Processing...\n\n${appUrlCommentText}`, + body: `🤖 Open SWE has been triggered for this issue. Processing...\n\n${appUrlCommentText}\n\n${createDevMetadataComment(run.run_id, threadId)}`, }, ); } catch (error) {