An open-source, faster Devin alternative
TypeScript
web: show org name when a single GitHub connection is available (#793)
devin-ai-integration[bot]ef17b9c30a30
diff --git a/web/src/managed-agents/GitHub.tsx b/web/src/managed-agents/GitHub.tsxindex 3f72bfa9..4a788919 100644--- a/web/src/managed-agents/GitHub.tsx+++ b/web/src/managed-agents/GitHub.tsx@@ -42,7 +42,12 @@ export function ManagedProjectGitHub({const availableConnections = (status.data?.connections ?? []).filter((connection) => connection.state === 'active',)- const connectionId = selectedConnectionId || availableConnections[0]?.id || ''+ const connectionId =+ availableConnections.find(+ (connection) => connection.id === selectedConnectionId,+ )?.id ??+ availableConnections[0]?.id ??+ ''const attach = useMutation({mutationFn: () =>attachManagedGitHub({ projectId, environment, connectionId }),@@ -154,7 +159,11 @@ export function ManagedProjectGitHub({</option>))}</select>- ) : null}+ ) : (+ <span className="text-sm font-medium">+ {availableConnections[0].accountLogin}+ </span>+ )}<Buttondisabled={!connectionId || attach.isPending}onClick={() => attach.mutate()}