Skip to content

Conversation

@ulrikandersen
Copy link
Contributor

@ulrikandersen ulrikandersen commented Dec 6, 2025

Summary

  • Add Azure DevOps as an alternative to GitHub for fetching OpenAPI specifications
  • Admin configures single provider at deployment via PROJECT_SOURCE_PROVIDER env var

Key Changes

  • Azure DevOps Client: REST API client with OAuth token refresh support
  • Provider Selection: Environment-based switching between GitHub and Azure DevOps
  • Blob Providers: Separate blob providers for each platform to fetch specification content
  • Pull Request Comments: Framna Docs will only comment on PRs when configured with GitHub

Screenshots

// todo

Configuration

GitHub (default)

PROJECT_SOURCE_PROVIDER=github
GITHUB_CLIENT_ID=...
GITHUB_CLIENT_SECRET=...
GITHUB_APP_ID=...
GITHUB_PRIVATE_KEY_BASE_64=...

Azure DevOps

PROJECT_SOURCE_PROVIDER=azure-devops
AZURE_ENTRA_ID_CLIENT_ID=...
AZURE_ENTRA_ID_CLIENT_SECRET=...
AZURE_ENTRA_ID_TENANT_ID=...
AZURE_DEVOPS_ORGANIZATION=your-organization

Open questions/issues

  • Could / should we allow both GitHub and Azure DevOps to be enabled concurrently in the same deployment?
  • Look into supporting the PR comment functionality with DevOps too.

@ulrikandersen ulrikandersen force-pushed the feature/azure-devops-support branch 2 times, most recently from d0fd954 to bbb1dcd Compare December 8, 2025 08:41
@github-actions
Copy link

github-actions bot commented Dec 8, 2025

⚠️ It looks like .env.example has changed. Remember to update the Setting Environment Variables article accordingly.

@ulrikandersen ulrikandersen force-pushed the feature/azure-devops-support branch 2 times, most recently from 25463fc to e2174a3 Compare December 8, 2025 08:49
Move repository-to-project mapping logic into a dedicated ProjectMapper
class. The mapper handles filtering, sorting, and all mapping transformations
with generic type support for provider-specific repository types.

This prepares the codebase for supporting multiple project source providers
by decoupling the mapping logic from the data source implementation.
@ulrikandersen ulrikandersen force-pushed the feature/azure-devops-support branch from e2174a3 to 7db919e Compare December 8, 2025 09:24
@ulrikandersen ulrikandersen changed the base branch from develop to feature/extract-project-mapper December 8, 2025 09:25
- Add Microsoft Entra ID authentication via next-auth
- Implement AzureDevOpsClient for REST API interactions
- Add AzureDevOpsProjectDataSource and AzureDevOpsRepositoryDataSource
- Create unified IBlobProvider interface for file content fetching
- Support binary image files in blob API
- Configure via PROJECT_SOURCE_PROVIDER env var (github or azure-devops)
Add comprehensive tests for ProjectMapper, Azure DevOps client, blob
providers, and repository data sources. Fix AzureDevOpsError prototype
chain to ensure instanceof checks work correctly.
Add provider configuration section explaining how to use either GitHub
or Azure DevOps as the project source provider.
@ulrikandersen ulrikandersen force-pushed the feature/azure-devops-support branch from 7db919e to cdef838 Compare December 8, 2025 09:31
Remove duplicated mapping code by having AzureDevOpsProjectDataSource
use the shared ProjectMapper class with Azure DevOps-specific URL builders.

- Update AzureDevOpsRepositoryWithRefs to extend RepositoryWithRefs
- Create azureDevOpsURLBuilders for Azure DevOps URL generation
- Reduce AzureDevOpsProjectDataSource from 270 to 57 lines
Microsoft Entra ID access tokens are JWTs that can exceed 2000
characters, which doesn't fit in VARCHAR(255).
@ulrikandersen ulrikandersen force-pushed the feature/azure-devops-support branch from b412054 to 3c06370 Compare December 8, 2025 13:37
@ulrikandersen ulrikandersen force-pushed the feature/extract-project-mapper branch 3 times, most recently from 3ce2d6b to 8a37284 Compare December 11, 2025 14:53
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants