mirror of
https://github.com/paperclipai/paperclip.git
synced 2026-11-11 21:59:38 +01:00
Separate GitHub bot opt-in and add review detail pages
Co-authored-by: Paperclip <noreply@paperclip.ing>
This commit is contained in:
1 parent
7c1d2503db
commit
7dcdbe7eb6
36 files changed
+647
-204
No files matched your search
@@ -38,6 +38,7 @@ import { materializeNativeInteractionResponses } from "../services/native-runtim
|
||||
import { toolAccessService } from "../services/tool-access.js";
|
||||
import { toolAccessPolicyService } from "../services/tool-access-policy.js";
|
||||
import { connectionIntentService } from "../services/connection-intents.js";
|
||||
import { instanceSettingsService } from "../services/instance-settings.js";
|
||||
import {
|
||||
getEmbeddedPostgresTestSupport,
|
||||
startEmbeddedPostgresTestDatabase,
|
||||
@@ -198,6 +199,29 @@ describeEmbeddedPostgres("connectionIntentService", () => {
|
||||
expect(serialized).not.toContain(claims.sub);
|
||||
});
|
||||
|
||||
it("discovers GitHub review bots independently from chat connectors", async () => {
|
||||
const settings = instanceSettingsService(db);
|
||||
const previous = await settings.getExperimental();
|
||||
const service = connectionIntentService(db);
|
||||
try {
|
||||
await settings.updateExperimental({ enableChatConnectors: false, enableGitHubReviewBots: true });
|
||||
expect((await service.search(claims, "github")).results).toEqual(expect.arrayContaining([
|
||||
expect.objectContaining({ service: "github-code-review-bot" }),
|
||||
expect.objectContaining({ service: "github" }),
|
||||
]));
|
||||
expect((await service.search(claims, "slack")).results.some(item =>
|
||||
item.methods.some(method => method.purpose === "channel"))).toBe(false);
|
||||
await settings.updateExperimental({ enableChatConnectors: true, enableGitHubReviewBots: false });
|
||||
expect((await service.search(claims, "github")).results.some(item =>
|
||||
item.service === "github-code-review-bot")).toBe(false);
|
||||
} finally {
|
||||
await settings.updateExperimental({
|
||||
enableChatConnectors: previous.enableChatConnectors,
|
||||
enableGitHubReviewBots: previous.enableGitHubReviewBots,
|
||||
});
|
||||
}
|
||||
});
|
||||
|
||||
it("creates one addressed request, resolves after install, and then reports ready for the responsible user", async () => {
|
||||
const service = connectionIntentService(db);
|
||||
const first = await service.request(claims, "notion");
|
||||
|
||||
@@ -16,6 +16,11 @@ describe("instance settings service", () => {
|
||||
const disabled = applyExperimentalSettingsPatch(enabled, { enableChatConnectors: false });
|
||||
expect(disabled).toMatchObject({ enableApps: true, enableChatConnectors: false });
|
||||
});
|
||||
it("keeps GitHub review bots independent across legacy normalization and persistence", () => {
|
||||
expect(normalizeExperimentalSettings({ enableChatConnectors: true })).toMatchObject({ enableChatConnectors: true, enableGitHubReviewBots: false });
|
||||
const saved = applyExperimentalSettingsPatch({}, { enableGitHubReviewBots: true });
|
||||
expect(normalizeExperimentalSettings(JSON.parse(JSON.stringify(saved)))).toMatchObject({ enableChatConnectors: false, enableGitHubReviewBots: true });
|
||||
});
|
||||
it("ignores retired experimental flags without resetting current settings", () => {
|
||||
expect(normalizeExperimentalSettings({
|
||||
enableEnvironments: true,
|
||||
@@ -48,6 +53,7 @@ describe("instance settings service", () => {
|
||||
enablePublicMcp: false,
|
||||
enableCombinedInboxTasks: false,
|
||||
enableChatConnectors: false,
|
||||
enableGitHubReviewBots: false,
|
||||
enableMemoryConnectors: false,
|
||||
enableConferenceRoomChat: false,
|
||||
enableClassicTaskInterface: false,
|
||||
|
||||
Reference in new issue
Block a user