Skip to content

Commit aefd42c

Browse files
committed
Add respectLatest configuration to Launchpad types and config
1 parent ee5f866 commit aefd42c

File tree

3 files changed

+11
-15
lines changed

3 files changed

+11
-15
lines changed

buddy-bot.config.ts

Lines changed: 1 addition & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,6 @@
11
import type { BuddyBotConfig } from 'buddy-bot'
22

3-
// Extended configuration with nullable respectLatest
4-
interface ExtendedBuddyBotConfig extends BuddyBotConfig {
5-
packages?: {
6-
strategy?: string
7-
ignore?: string[]
8-
ignorePaths?: string[]
9-
respectLatest?: boolean | null // Nullable, defaults to true
10-
}
11-
}
12-
13-
const config: ExtendedBuddyBotConfig = {
3+
const config: BuddyBotConfig = {
144
repository: {
155
owner: 'stacksjs',
166
name: 'launchpad',
@@ -44,10 +34,6 @@ const config: ExtendedBuddyBotConfig = {
4434
// Example: 'packages/test-*/**', '**/*test-envs/**', 'apps/legacy/**'
4535
'packages/launchpad/test/fixtures/pkgx.yml', // Ignore test fixtures that use 'latest'
4636
],
47-
// Configuration for respecting 'latest' versions (nullable, defaults to true)
48-
respectLatest: process.env.BUDDY_BOT_RESPECT_LATEST === 'false' ? false :
49-
process.env.BUDDY_BOT_RESPECT_LATEST === 'true' ? true :
50-
null, // null means use default behavior (true)
5137
},
5238
verbose: false,
5339
}

packages/launchpad/src/config.ts

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,12 @@ export const defaultConfig: LaunchpadConfig = {
5151
useRegistry: true,
5252
installMethod: 'curl',
5353
installPath: getDefaultInstallPath(),
54+
// Buddy Bot configuration
55+
buddyBot: {
56+
respectLatest: process.env.BUDDY_BOT_RESPECT_LATEST === 'false' ? false :
57+
process.env.BUDDY_BOT_RESPECT_LATEST === 'true' ? true :
58+
null, // null means use default behavior (true)
59+
},
5460
services: {
5561
enabled: process.env.LAUNCHPAD_SERVICES_ENABLED !== 'false',
5662
dataDir: process.env.LAUNCHPAD_SERVICES_DATA_DIR || path.join(homedir(), '.local', 'share', 'launchpad', 'services'),

packages/launchpad/src/types.ts

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -66,6 +66,10 @@ export interface LaunchpadConfig {
6666
shellDeactivationMessage?: string
6767
useRegistry?: boolean
6868
installMethod?: string
69+
// Buddy Bot configuration
70+
buddyBot?: {
71+
respectLatest?: boolean | null // Nullable, defaults to true - don't create PRs for packages set to 'latest'
72+
}
6973
services?: {
7074
enabled?: boolean
7175
autoStart?: boolean

0 commit comments

Comments
 (0)