- Add missing 'channels:join' and 'channels:manage' to required OAuth scopes
- Update scope validation to handle comma-separated scope format
- Include defaultChannel in 're_install_required' status response
- Ensures complete integration data is returned in all status cases
Fixes scope validation for existing integrations and missing default channel data in API responses.
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Add missing status field to GET /api/v2/slack/integration response
- Ensures 're_install_required' status reaches the UI for yellow button display
- Critical fix for scope validation feature to work end-to-end
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Create validateScopes helper to avoid code duplication
- Use shared function in both initiateOAuth and getIntegrationStatus
- Addresses code review feedback from greptile-apps[bot]
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Add deduplicateFilesByVersion helper function with informative logging
- Modify selectFilesForResponse to handle version-based deduplication
- Balance priority logic (dashboards over standalone created metrics) with deduplication
- Default missing version numbers to 1
- Add comprehensive tests for deduplication scenarios
- Preserve existing priority logic when no deduplication is needed
Fixes BUS-1434
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Fixed unit test failures in database, rerank, data-source, stored-values, and test-utils packages
- Moved unit tests from tests/ folders to be alongside source files (e.g., slack.ts -> slack.test.ts)
- Ensured all unit tests use mocks instead of real dependencies
- Added DATABASE_URL environment variable to test:unit scripts where needed
- Fixed mock implementations and test assertions
- All 52 unit tests now pass successfully
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Fixed AI package unit tests that were previously failing
- Updated database package.json with environment variables for tests
- Fixed snowflake adapter test issues in data-source package
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Removed empty test files from packages/rerank/tests/ and packages/stored-values/tests/
- All unit tests are now co-located with their source files
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>
- Added unit tests for database helper functions
- Added unit tests for mock helpers and environment helpers
- All test files now follow the convention of being alongside their source files
Co-Authored-By: Dallin Bentley <dallinbentley98@gmail.com>