Skip to content

Commit 6e3bc36

Browse files
daniel-lxsclaude
andauthored
Make the announcer source-control-neutral (#293)
The merged-PR announcer's enumeration already reads the provider-neutral taskPullRequests table, which every source-control provider's webhooks populate; only its eligibility gate forced a GitHub installation. The gate now requires any active repository, the manual-trigger requirement drops the github token for the neutral repository check, and the registry declares support for all source-control providers. The security/code-quality auditors and conflict resolver stay GitHub-only by declaration: the auditors read pullRequestFacts, which only the GitHub sync writes, and conflict resolution needs a list-open-PRs primitive no provider package has yet — both are real per-provider workstreams, not gate changes. Co-authored-by: Claude Fable 5 <noreply@anthropic.com>
1 parent f919d60 commit 6e3bc36

2 files changed

Lines changed: 9 additions & 5 deletions

File tree

packages/sdk/src/server/automations/announcer.ts

Lines changed: 6 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ import { SUMMARIZE_MERGED_PRS_SETTINGS_HASH } from '@roomote/types';
2121
import { SlackNotifier } from '@roomote/slack';
2222

2323
import { loadAutomationThreadFeedbackContext } from './automation-thread-feedback';
24-
import { hasActiveGitHubInstallation } from './github-deployment-scope';
24+
import { hasAnyActiveRepository } from './github-deployment-scope';
2525
import { buildAutomationRootSummaryMessage } from '../lib/manager-slack';
2626
import { isRunDue, resolveSlackWorkspaceTimezone } from './scheduling-utils';
2727
import {
@@ -55,7 +55,9 @@ const WINDOW_DAYS: Record<AnnouncerFrequency, number> = {
5555
const MAX_DETAIL_MESSAGE_CHARS = 3_000;
5656

5757
async function findEligibleDeployments(): Promise<DeploymentContext[]> {
58-
if (!(await hasActiveGitHubInstallation())) {
58+
// Merged-PR data comes from the provider-neutral taskPullRequests table,
59+
// so any active repository qualifies regardless of source-control provider.
60+
if (!(await hasAnyActiveRepository())) {
5961
return [];
6062
}
6163

@@ -224,7 +226,8 @@ export async function announcerJob(
224226
const eligibleDeployments = await findEligibleDeployments();
225227

226228
if (eligibleDeployments.length === 0) {
227-
result.skippedReason = 'GitHub and Slack must both be connected.';
229+
result.skippedReason =
230+
'An active repository and Slack must both be connected.';
228231
}
229232

230233
let processed = 0;

packages/types/src/background-automation-registry.ts

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -146,10 +146,11 @@ export const TRIGGERABLE_BACKGROUND_AUTOMATION_DESCRIPTORS = [
146146
label: 'Summarize Merged PRs',
147147
availability: 'stable',
148148
scheduleModes: DAILY_WEEKLY_SCHEDULE_MODES,
149-
manualTriggerRequirements: ['slack', 'github'],
149+
// Merged-PR summaries read the provider-neutral taskPullRequests table.
150+
manualTriggerRequirements: ['slack', 'repository'],
150151
usesManagerChannel: true,
151152
supportedCommunicationProviders: ['slack'],
152-
supportedSourceControlProviders: ['github'],
153+
supportedSourceControlProviders: sourceControlProviders,
153154
},
154155
{
155156
automationKey: 'manager_stats',

0 commit comments

Comments
 (0)