From 4e52be54f81c6227918c6f09b03f866fe0051490 Mon Sep 17 00:00:00 2001 From: bracesproul Date: Mon, 30 Jun 2025 17:33:29 -0600 Subject: [PATCH] feat: Add auth access callout in open swe app url comment --- apps/open-swe/src/routes/github/issue-webhook.ts | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/apps/open-swe/src/routes/github/issue-webhook.ts b/apps/open-swe/src/routes/github/issue-webhook.ts index 492cd466..ad6ae190 100644 --- a/apps/open-swe/src/routes/github/issue-webhook.ts +++ b/apps/open-swe/src/routes/github/issue-webhook.ts @@ -151,13 +151,16 @@ webhooks.on("issues.labeled", async ({ payload }) => { logger.info("Creating comment..."); const appUrl = getOpenSweAppUrl(threadId); + const appUrlCommentText = appUrl + ? `View run in Open SWE [here](${appUrl}) (this URL will only work for @${issueData.userLogin})` + : ""; await octokit.request( "POST /repos/{owner}/{repo}/issues/{issue_number}/comments", { owner: issueData.owner, repo: issueData.repo, issue_number: issueData.issueNumber, - body: `🤖 Open SWE has been triggered for this issue. Processing...\n\n${appUrl ? `View run in Open SWE [here](${appUrl})` : ""}`, + body: `🤖 Open SWE has been triggered for this issue. Processing...\n\n${appUrlCommentText}`, }, ); } catch (error) {