Skip to content

Github Enterprise has a different API endpoint compared to Free/Pro/teams version#1309

Open
ahmed-wajid wants to merge 4 commits intomher:masterfrom
ahmed-wajid:fix-github-enterprise-api-endpoint
Open

Github Enterprise has a different API endpoint compared to Free/Pro/teams version#1309
ahmed-wajid wants to merge 4 commits intomher:masterfrom
ahmed-wajid:fix-github-enterprise-api-endpoint

Conversation

@ahmed-wajid
Copy link
Copy Markdown
Contributor

Added an if conditional to switch the _OAUTH_API_URL if using a custom domain other than github.com.
Fixes: #1308

@ahmed-wajid
Copy link
Copy Markdown
Contributor Author

@mehr Could this be merged sometime soon? we have been living with basic auth meanwhile :(

@hermanocabra
Copy link
Copy Markdown

hermanocabra commented Feb 21, 2025

Can we merge this change? We would like to have this feature too. Thanks
@mher

@auvipy auvipy requested review from auvipy and Copilot August 12, 2025 17:05
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for GitHub Enterprise by implementing dynamic API endpoint selection based on the OAuth domain. The change allows Flower to work with both GitHub.com and GitHub Enterprise instances by using different API URL patterns for each.

  • Introduces conditional logic to set the correct API endpoint based on the OAuth domain
  • Updates documentation to explain GitHub Enterprise configuration
  • Replaces hardcoded API URL with a configurable variable

Reviewed Changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
flower/views/auth.py Adds conditional logic to set appropriate API endpoint for GitHub.com vs GitHub Enterprise domains
docs/auth.rst Documents the FLOWER_GITHUB_OAUTH_DOMAIN environment variable for GitHub Enterprise setup

Comment thread flower/views/auth.py Outdated
Comment thread flower/views/auth.py Outdated
@ahmed-wajid
Copy link
Copy Markdown
Contributor Author

@auvipy Could you please review and approve?

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.

OAuth2 workflow does not work with Github Enterprise Servers.

3 participants