Skip to content

Commit de417b5

Browse files
committed
chore: wip
1 parent fd17cdb commit de417b5

File tree

3 files changed

+26
-16
lines changed

3 files changed

+26
-16
lines changed

src/setup.ts

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -463,17 +463,17 @@ export class PluginManager {
463463
}
464464

465465
private async hasSlackWebhook(): Promise<boolean> {
466-
return process.env.SLACK_WEBHOOK_URL !== undefined
466+
return (process.env.SLACK_WEBHOOK_URL !== undefined && process.env.SLACK_WEBHOOK_URL !== '')
467467
|| fs.existsSync('.buddy/slack-webhook')
468468
}
469469

470470
private async hasJiraIntegration(): Promise<boolean> {
471-
return process.env.JIRA_API_TOKEN !== undefined
471+
return (process.env.JIRA_API_TOKEN !== undefined && process.env.JIRA_API_TOKEN !== '')
472472
|| fs.existsSync('.buddy/jira-config.json')
473473
}
474474

475475
private async hasDiscordWebhook(): Promise<boolean> {
476-
return process.env.DISCORD_WEBHOOK_URL !== undefined
476+
return (process.env.DISCORD_WEBHOOK_URL !== undefined && process.env.DISCORD_WEBHOOK_URL !== '')
477477
|| fs.existsSync('.buddy/discord-webhook')
478478
}
479479

test/plugin-architecture.test.ts

Lines changed: 22 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -55,18 +55,28 @@ describe('Integration Ecosystem & Plugin Architecture', () => {
5555
JIRA_PROJECT_KEY: process.env.JIRA_PROJECT_KEY,
5656
}
5757

58-
// Clean up test environment variables aggressively
59-
delete process.env.SLACK_WEBHOOK_URL
60-
delete process.env.DISCORD_WEBHOOK_URL
61-
delete process.env.JIRA_API_TOKEN
62-
delete process.env.JIRA_BASE_URL
63-
delete process.env.JIRA_PROJECT_KEY
64-
65-
// Also check for any variations that might exist in CI
66-
delete process.env.SLACK_WEBHOOK
67-
delete process.env.DISCORD_WEBHOOK
68-
delete process.env.JIRA_TOKEN
69-
delete process.env.JIRA_URL
58+
// SUPER aggressive cleanup - delete ALL possible environment variables that could trigger plugin discovery
59+
// Note: In GitHub Actions, env vars might be set but empty, so we delete them entirely
60+
const envVarsToDelete = [
61+
'SLACK_WEBHOOK_URL',
62+
'DISCORD_WEBHOOK_URL',
63+
'JIRA_API_TOKEN',
64+
'JIRA_BASE_URL',
65+
'JIRA_PROJECT_KEY',
66+
'SLACK_WEBHOOK',
67+
'DISCORD_WEBHOOK',
68+
'JIRA_TOKEN',
69+
'JIRA_URL',
70+
// Also check for other variations that might exist in different CI environments
71+
'SLACK_URL',
72+
'DISCORD_URL',
73+
'JIRA_ENDPOINT',
74+
'JIRA_HOST',
75+
]
76+
77+
envVarsToDelete.forEach((envVar) => {
78+
delete process.env[envVar]
79+
})
7080

7181
// Clean up any .buddy files that might exist (critical for plugin detection)
7282
if (fs.existsSync('.buddy')) {

test/respect-latest.test.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -80,7 +80,7 @@ describe('respectLatest functionality', () => {
8080
expect(shouldRespectVersion('^1.0.0')).toBe(false)
8181
})
8282

83-
it('should test dependency file respectLatest logic', async () => {
83+
it('should test dependency file respectLatest logic', async () => {
8484
// Test the dependency file respectLatest logic directly without file system operations
8585
// This avoids the file corruption issue in GitHub Actions environment
8686
const { updateDependencyFile, isDependencyFile } = await import('../src/utils/dependency-file-parser')

0 commit comments

Comments
 (0)