mirror of
https://github.com/Sea-Haven-Industries/open-swe.git
synced 2026-10-03 17:53:20 +00:00
feat: Include run and thread IDs in the issue comment (#378)
This commit is contained in:
parent
417c2e6650
commit
fa10a3e42a
1 changed files with 15 additions and 1 deletions
|
|
@ -52,6 +52,20 @@ const getPayload = (body: string): Record<string, any> | null => {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
const createDevMetadataComment = (runId: string, threadId: string) => {
|
||||||
|
return `<details>
|
||||||
|
<summary>Dev Metadata</summary>
|
||||||
|
${JSON.stringify(
|
||||||
|
{
|
||||||
|
runId,
|
||||||
|
threadId,
|
||||||
|
},
|
||||||
|
null,
|
||||||
|
2,
|
||||||
|
)}
|
||||||
|
</details>`;
|
||||||
|
};
|
||||||
|
|
||||||
const getHeaders = (
|
const getHeaders = (
|
||||||
c: Context,
|
c: Context,
|
||||||
): {
|
): {
|
||||||
|
|
@ -179,7 +193,7 @@ webhooks.on("issues.labeled", async ({ payload }) => {
|
||||||
owner: issueData.owner,
|
owner: issueData.owner,
|
||||||
repo: issueData.repo,
|
repo: issueData.repo,
|
||||||
issue_number: issueData.issueNumber,
|
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) {
|
} catch (error) {
|
||||||
|
|
|
||||||
Loading…
Add table
Reference in a new issue