feat: Include run and thread IDs in the issue comment (#378)

This commit is contained in:
Brace Sproul 2025-07-09 17:45:19 -07:00 • committed by GitHub
parent 417c2e6650
commit fa10a3e42a
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -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 = (
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) {