CLI-471 allow env vars for OIDC urls#2
Conversation
SummaryThis PR replaces three hardcoded OIDC configuration values with environment variables to support multiple SonarQube Cloud regions (US, EU, etc.). Specifically:
The changes are minimal and focused only on making these region-specific URLs configurable via GitHub repository variables. What reviewers should knowWhat changed: Only Key areas to review:
Non-obvious aspects:
|
There was a problem hiding this comment.
Good direction for multi-region support. There is one breaking-change issue in the agent config and the README needs to catch up with the new variables — both need to be addressed before this is safe to merge.
README.md still describes the OIDC audience as the hardcoded https://sonarcloud.io string (line 31) and the setup table only lists COPILOT_MCP_SONARQUBE_ORG and COPILOT_MCP_SONARQUBE_PROJECT_KEY. The three new variables (COPILOT_MCP_SONARQUBE_URL, COPILOT_MCP_SONARQUBE_OIDC_EXCHANGE_URL, and SONARQUBE_URL as a container env) are completely absent from the docs, so any user following the README will be missing required config with no error message to guide them.
In order to make the plugin work for SonarQube Cloud US region as well, we should not keep hardcoding the OIDC exchange URLs. Instead, they should be populated through Env variables.